tools: enable ESLint no-loss-of-precision rule

PR-URL: https://github.com/nodejs/node/pull/41463
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
This commit is contained in:
Rich Trott committed 2022-01-13 17:11:11 -08:00
1 parent 775bfd1579
commit 94abcbde8b
5 files changed
+6

No files matched your search

+2
View File
@@ -19,10 +19,12 @@ testNumber(-1233);
testNumber(986583);
testNumber(-976675);
/* eslint-disable no-loss-of-precision */
testNumber(
98765432213456789876546896323445679887645323232436587988766545658);
testNumber(
-4350987086545760976737453646576078997096876957864353245245769809);
/* eslint-enable no-loss-of-precision */
testNumber(Number.MIN_SAFE_INTEGER);
testNumber(Number.MAX_SAFE_INTEGER);
testNumber(Number.MAX_SAFE_INTEGER + 10);