Skip to content

Commit 0f116e5

Browse files
committed
tools: update eslint
This updates eslint from v6.0.0-alpha.2 to v6.0.0-rc.0. This also removes eslint-disable comments about `bigint` typeof checks. Those would otherwise have caused linting errors now that `bigint` is accepted as valid entry.
1 parent 10a346e commit 0f116e5

File tree

40 files changed

+1531
-213
lines changed

40 files changed

+1531
-213
lines changed

β€Žbenchmark/process/bench-hrtime.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ function main({ n, type }) {
3737
break;
3838
}
3939

40-
// eslint-disable-next-line valid-typeof
4140
assert.ok(Array.isArray(noDead) || typeof noDead === 'bigint');
4241
}

β€Žlib/internal/buffer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ function checkBounds(buf, offset, byteLength) {
4343

4444
function checkInt(value, min, max, buf, offset, byteLength) {
4545
if (value > max || value < min) {
46-
// eslint-disable-next-line valid-typeof
4746
const n = typeof min === 'bigint' ? 'n' : '';
4847
let range;
4948
if (byteLength > 3) {

β€Žlib/internal/errors.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,6 @@ E('ERR_OUT_OF_RANGE',
10441044
let received;
10451045
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
10461046
received = addNumericalSeparator(String(input));
1047-
// eslint-disable-next-line valid-typeof
10481047
} else if (typeof input === 'bigint') {
10491048
received = String(input);
10501049
if (input > 2n ** 32n || input < -(2n ** 32n)) {

β€Žlib/internal/util/inspect.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,6 @@ function formatPrimitive(fn, value, ctx) {
11121112
}
11131113
if (typeof value === 'number')
11141114
return formatNumber(fn, value);
1115-
// eslint-disable-next-line valid-typeof
11161115
if (typeof value === 'bigint')
11171116
return formatBigInt(fn, value);
11181117
if (typeof value === 'boolean')
@@ -1575,7 +1574,6 @@ function formatWithOptions(inspectOptions, ...args) {
15751574
const tempArg = args[++a];
15761575
if (typeof tempArg === 'number') {
15771576
tempStr = formatNumber(stylizeNoColor, tempArg);
1578-
// eslint-disable-next-line valid-typeof
15791577
} else if (typeof tempArg === 'bigint') {
15801578
tempStr = `${tempArg}n`;
15811579
} else {
@@ -1607,7 +1605,6 @@ function formatWithOptions(inspectOptions, ...args) {
16071605
break;
16081606
case 100: // 'd'
16091607
const tempNum = args[++a];
1610-
// eslint-disable-next-line valid-typeof
16111608
if (typeof tempNum === 'bigint') {
16121609
tempStr = `${tempNum}n`;
16131610
} else if (typeof tempNum === 'symbol') {
@@ -1631,7 +1628,6 @@ function formatWithOptions(inspectOptions, ...args) {
16311628
}
16321629
case 105: // 'i'
16331630
const tempInteger = args[++a];
1634-
// eslint-disable-next-line valid-typeof
16351631
if (typeof tempInteger === 'bigint') {
16361632
tempStr = `${tempInteger}n`;
16371633
} else if (typeof tempInteger === 'symbol') {

β€Žtest/common/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,6 @@ const pwdCommand = isWindows ?
239239

240240

241241
function platformTimeout(ms) {
242-
// ESLint will not support 'bigint' in valid-typeof until it reaches stage 4.
243-
// See https://github.com/eslint/eslint/pull/9636.
244-
// eslint-disable-next-line valid-typeof
245242
const multipliers = typeof ms === 'bigint' ?
246243
{ two: 2n, four: 4n, seven: 7n } : { two: 2, four: 4, seven: 7 };
247244

β€Žtools/node_modules/eslint/README.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/cli-engine/config-array/override-tester.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/cli-engine/formatters/junit.js

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/linter/linter.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/linter/node-event-generator.js

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/rule-tester/rule-tester.js

Lines changed: 26 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/rules/arrow-parens.js

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/rules/no-octal.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/lib/rules/no-restricted-imports.js

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)