GeezerVison is showing github.com — tools: add BigInt to globals · nodejs/node@7f70fe8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .eslintrc.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -243,6 +243,7 @@ module.exports = { |
243 | 243 | 'node-core/no-unescaped-regexp-dot': 'error', |
244 | 244 | }, |
245 | 245 | globals: { |
| 246 | + BigInt: false, |
246 | 247 | COUNTER_HTTP_CLIENT_REQUEST: false, |
247 | 248 | COUNTER_HTTP_CLIENT_RESPONSE: false, |
248 | 249 | COUNTER_HTTP_SERVER_REQUEST: false, |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/internal/fs/utils.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -160,7 +160,6 @@ Stats.prototype._checkModeProperty = function(property) { |
160 | 160 | return false; // Some types are not available on Windows |
161 | 161 | } |
162 | 162 | if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof |
163 | | - // eslint-disable-next-line no-undef |
164 | 163 | return (this.mode & BigInt(S_IFMT)) === BigInt(property); |
165 | 164 | } |
166 | 165 | return (this.mode & S_IFMT) === property; |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-fs-stat-bigint.js -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,6 @@ function verifyStats(bigintStats, numStats) { |
31 | 31 | `difference of ${key}.getTime() should < 2.\n` + |
32 | 32 | `Number version ${time}, BigInt version ${time2}n`); |
33 | 33 | } else if (key === 'mode') { |
34 | | - // eslint-disable-next-line no-undef |
35 | 34 | assert.strictEqual(bigintStats[key], BigInt(val)); |
36 | 35 | assert.strictEqual( |
37 | 36 | bigintStats.isBlockDevice(), |
@@ -65,7 +64,6 @@ function verifyStats(bigintStats, numStats) { |
65 | 64 | assert.strictEqual(bigintStats[key], undefined); |
66 | 65 | assert.strictEqual(numStats[key], undefined); |
67 | 66 | } else if (Number.isSafeInteger(val)) { |
68 | | - // eslint-disable-next-line no-undef |
69 | 67 | assert.strictEqual(bigintStats[key], BigInt(val)); |
70 | 68 | } else { |
71 | 69 | assert( |
|