lib: enforce use of BigInt from primordials

PR-URL: https://github.com/nodejs/node/pull/30882
Refs: https://github.com/nodejs/node/issues/30697
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
Michaël Zasso authored and Myles Borins committed 2019-12-13 10:50:41 -05:00
1 parent 5203ffb2f4
commit 71c6d44efa
3 files changed
+4

No files matched your search

+2
View File
@@ -11,6 +11,8 @@ rules:
- error
- name: Array
message: "Use `const { Array } = primordials;` instead of the global."
- name: BigInt
message: "Use `const { BigInt } = primordials;` instead of the global."
- name: Boolean
message: "Use `const { Boolean } = primordials;` instead of the global."
- name: JSON
+1
View File
@@ -1,6 +1,7 @@
'use strict';
const {
BigInt,
MathFloor,
Number,
} = primordials;
+1
View File
@@ -2,6 +2,7 @@
const {
ArrayIsArray,
BigInt,
DateNow,
Number,
NumberIsFinite,