Skip to content

Commit

Permalink
tools: add BigInt to globals
Browse files Browse the repository at this point in the history
PR-URL: #21237
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
seishun authored and targos committed Jun 11, 2018
1 parent 02b4047 commit 22bb173
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ module.exports = {
'node-core/no-unescaped-regexp-dot': 'error',
},
globals: {
BigInt: false,
COUNTER_HTTP_CLIENT_REQUEST: false,
COUNTER_HTTP_CLIENT_RESPONSE: false,
COUNTER_HTTP_SERVER_REQUEST: false,
Expand Down
1 change: 0 additions & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ Stats.prototype._checkModeProperty = function(property) {
return false; // Some types are not available on Windows
}
if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof
// eslint-disable-next-line no-undef
return (this.mode & BigInt(S_IFMT)) === BigInt(property);
}
return (this.mode & S_IFMT) === property;
Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-fs-stat-bigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ function verifyStats(bigintStats, numStats) {
`difference of ${key}.getTime() should < 2.\n` +
`Number version ${time}, BigInt version ${time2}n`);
} else if (key === 'mode') {
// eslint-disable-next-line no-undef
assert.strictEqual(bigintStats[key], BigInt(val));
assert.strictEqual(
bigintStats.isBlockDevice(),
Expand Down Expand Up @@ -65,7 +64,6 @@ function verifyStats(bigintStats, numStats) {
assert.strictEqual(bigintStats[key], undefined);
assert.strictEqual(numStats[key], undefined);
} else if (Number.isSafeInteger(val)) {
// eslint-disable-next-line no-undef
assert.strictEqual(bigintStats[key], BigInt(val));
} else {
assert(
Expand Down

0 comments on commit 22bb173

Please sign in to comment.