mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
5203ffb2f4
commit
71c6d44efa
3 files changed
+4
No files matched your search
@@ -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,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
BigInt,
|
||||
MathFloor,
|
||||
Number,
|
||||
} = primordials;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
ArrayIsArray,
|
||||
BigInt,
|
||||
DateNow,
|
||||
Number,
|
||||
NumberIsFinite,
|
||||
|
||||
Reference in new issue
Block a user