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 <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>
  • Loading branch information
targos committed Dec 13, 2019
1 parent afa9a72 commit 923d8bc
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
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
@@ -1,6 +1,7 @@
'use strict';

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

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

0 comments on commit 923d8bc

Please sign in to comment.