Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: add BigInt to globals #21237

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tools: add BigInt to globals
  • Loading branch information
seishun committed Jun 9, 2018
commit aa291270a6983e4a92925610f00f8a39353ba667
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