Skip to content

Commit 023c75e

Browse files
BridgeARtargos
authored andcommitted
tools: update eslint
This updates eslint from v6.0.0-alpha.2 to v6.0.1 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. PR-URL: #28173 Reviewed-By: MichaΓ«l Zasso <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
1 parent 3c047b3 commit 023c75e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1962
-395
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
@@ -1039,7 +1039,6 @@ E('ERR_OUT_OF_RANGE',
10391039
let received;
10401040
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
10411041
received = addNumericalSeparator(String(input));
1042-
// eslint-disable-next-line valid-typeof
10431042
} else if (typeof input === 'bigint') {
10441043
received = String(input);
10451044
if (input > 2n ** 32n || input < -(2n ** 32n)) {

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,6 @@ function groupArrayElements(ctx, output, value) {
10121012
let order = 'padStart';
10131013
if (value !== undefined) {
10141014
for (let i = 0; i < output.length; i++) {
1015-
// eslint-disable-next-line valid-typeof
10161015
if (typeof value[i] !== 'number' && typeof value[i] !== 'bigint') {
10171016
order = 'padEnd';
10181017
break;
@@ -1087,7 +1086,6 @@ function formatPrimitive(fn, value, ctx) {
10871086
}
10881087
if (typeof value === 'number')
10891088
return formatNumber(fn, value);
1090-
// eslint-disable-next-line valid-typeof
10911089
if (typeof value === 'bigint')
10921090
return formatBigInt(fn, value);
10931091
if (typeof value === 'boolean')
@@ -1550,7 +1548,6 @@ function formatWithOptions(inspectOptions, ...args) {
15501548
const tempArg = args[++a];
15511549
if (typeof tempArg === 'number') {
15521550
tempStr = formatNumber(stylizeNoColor, tempArg);
1553-
// eslint-disable-next-line valid-typeof
15541551
} else if (typeof tempArg === 'bigint') {
15551552
tempStr = `${tempArg}n`;
15561553
} else {
@@ -1582,7 +1579,6 @@ function formatWithOptions(inspectOptions, ...args) {
15821579
break;
15831580
case 100: // 'd'
15841581
const tempNum = args[++a];
1585-
// eslint-disable-next-line valid-typeof
15861582
if (typeof tempNum === 'bigint') {
15871583
tempStr = `${tempNum}n`;
15881584
} else if (typeof tempNum === 'symbol') {
@@ -1606,7 +1602,6 @@ function formatWithOptions(inspectOptions, ...args) {
16061602
}
16071603
case 105: // 'i'
16081604
const tempInteger = args[++a];
1609-
// eslint-disable-next-line valid-typeof
16101605
if (typeof tempInteger === 'bigint') {
16111606
tempStr = `${tempInteger}n`;
16121607
} 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: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žtools/node_modules/eslint/bin/eslint.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/cli-engine/cascading-config-array-factory.js

Lines changed: 15 additions & 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/cli-engine/cli-engine.js

Lines changed: 8 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/config-array-factory.js

Lines changed: 6 additions & 5 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/config-array.js

Lines changed: 1 addition & 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.

0 commit comments

Comments
Β (0)