Skip to content

Commit b744bd9

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 b744bd9

Some content is hidden

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

63 files changed

+1963
-396
lines changed

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

-1
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

-1
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

-1
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/fs/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Stats.prototype._checkModeProperty = function(property) {
276276
property === S_IFSOCK)) {
277277
return false; // Some types are not available on Windows
278278
}
279-
if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof
279+
if (typeof this.mode === 'bigint') {
280280
return (this.mode & BigInt(S_IFMT)) === BigInt(property);
281281
}
282282
return (this.mode & S_IFMT) === property;

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

-5
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

-3
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

+3-10
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

+1-1
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

+15-3
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

+8-1
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

+6-5
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

+1-2
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

+11-1
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

+14-2
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

+1-3
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

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)