Skip to content

Commit

Permalink
lib: enforce use of BigInt from primordials
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
targos authored and MylesBorins committed Dec 13, 2019
1 parent 5203ffb commit 71c6d44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/internal/buffer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const {
BigInt,
MathFloor,
Number,
} = primordials;
Expand Down
1 change: 1 addition & 0 deletions lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const {
ArrayIsArray,
BigInt,
DateNow,
Number,
NumberIsFinite,
Expand Down

0 comments on commit 71c6d44

Please sign in to comment.