Skip to content

Commit d4ea392

Browse files
committed
lib: enforce use of BigInt from primordials
PR-URL: #30882 Refs: #30697 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
1 parent 22df5dc commit d4ea392

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

lib/.eslintrc.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ rules:
1111
- error
1212
- name: Array
1313
message: "Use `const { Array } = primordials;` instead of the global."
14+
- name: BigInt
15+
message: "Use `const { BigInt } = primordials;` instead of the global."
1416
- name: Boolean
1517
message: "Use `const { Boolean } = primordials;` instead of the global."
1618
- name: JSON

lib/internal/buffer.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const {
4+
BigInt,
45
MathFloor,
56
Number,
67
} = primordials;

lib/internal/fs/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
ArrayIsArray,
5+
BigInt,
56
DateNow,
67
Number,
78
NumberIsFinite,

0 commit comments

Comments
 (0)