Skip to content

Commit ed8fc7e

Browse files
committed
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 <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 63a0f4c commit ed8fc7e

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
@@ -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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,6 @@ function groupArrayElements(ctx, output, value) {
10371037
let order = 'padStart';
10381038
if (value !== undefined) {
10391039
for (let i = 0; i < output.length; i++) {
1040-
// eslint-disable-next-line valid-typeof
10411040
if (typeof value[i] !== 'number' && typeof value[i] !== 'bigint') {
10421041
order = 'padEnd';
10431042
break;
@@ -1112,7 +1111,6 @@ function formatPrimitive(fn, value, ctx) {
11121111
}
11131112
if (typeof value === 'number')
11141113
return formatNumber(fn, value);
1115-
// eslint-disable-next-line valid-typeof
11161114
if (typeof value === 'bigint')
11171115
return formatBigInt(fn, value);
11181116
if (typeof value === 'boolean')
@@ -1575,7 +1573,6 @@ function formatWithOptions(inspectOptions, ...args) {
15751573
const tempArg = args[++a];
15761574
if (typeof tempArg === 'number') {
15771575
tempStr = formatNumber(stylizeNoColor, tempArg);
1578-
// eslint-disable-next-line valid-typeof
15791576
} else if (typeof tempArg === 'bigint') {
15801577
tempStr = `${tempArg}n`;
15811578
} else {
@@ -1607,7 +1604,6 @@ function formatWithOptions(inspectOptions, ...args) {
16071604
break;
16081605
case 100: // 'd'
16091606
const tempNum = args[++a];
1610-
// eslint-disable-next-line valid-typeof
16111607
if (typeof tempNum === 'bigint') {
16121608
tempStr = `${tempNum}n`;
16131609
} else if (typeof tempNum === 'symbol') {
@@ -1631,7 +1627,6 @@ function formatWithOptions(inspectOptions, ...args) {
16311627
}
16321628
case 105: // 'i'
16331629
const tempInteger = args[++a];
1634-
// eslint-disable-next-line valid-typeof
16351630
if (typeof tempInteger === 'bigint') {
16361631
tempStr = `${tempInteger}n`;
16371632
} 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)