Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update eslint to latest #28173

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/process/bench-hrtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ function main({ n, type }) {
break;
}

// eslint-disable-next-line valid-typeof
assert.ok(Array.isArray(noDead) || typeof noDead === 'bigint');
}
1 change: 0 additions & 1 deletion lib/internal/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function checkBounds(buf, offset, byteLength) {

function checkInt(value, min, max, buf, offset, byteLength) {
if (value > max || value < min) {
// eslint-disable-next-line valid-typeof
const n = typeof min === 'bigint' ? 'n' : '';
let range;
if (byteLength > 3) {
Expand Down
1 change: 0 additions & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,6 @@ E('ERR_OUT_OF_RANGE',
let received;
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
received = addNumericalSeparator(String(input));
// eslint-disable-next-line valid-typeof
} else if (typeof input === 'bigint') {
received = String(input);
if (input > 2n ** 32n || input < -(2n ** 32n)) {
Expand Down
5 changes: 0 additions & 5 deletions lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,6 @@ function groupArrayElements(ctx, output, value) {
let order = 'padStart';
if (value !== undefined) {
for (let i = 0; i < output.length; i++) {
// eslint-disable-next-line valid-typeof
if (typeof value[i] !== 'number' && typeof value[i] !== 'bigint') {
order = 'padEnd';
break;
Expand Down Expand Up @@ -1112,7 +1111,6 @@ function formatPrimitive(fn, value, ctx) {
}
if (typeof value === 'number')
return formatNumber(fn, value);
// eslint-disable-next-line valid-typeof
if (typeof value === 'bigint')
return formatBigInt(fn, value);
if (typeof value === 'boolean')
Expand Down Expand Up @@ -1575,7 +1573,6 @@ function formatWithOptions(inspectOptions, ...args) {
const tempArg = args[++a];
if (typeof tempArg === 'number') {
tempStr = formatNumber(stylizeNoColor, tempArg);
// eslint-disable-next-line valid-typeof
} else if (typeof tempArg === 'bigint') {
tempStr = `${tempArg}n`;
} else {
Expand Down Expand Up @@ -1607,7 +1604,6 @@ function formatWithOptions(inspectOptions, ...args) {
break;
case 100: // 'd'
const tempNum = args[++a];
// eslint-disable-next-line valid-typeof
if (typeof tempNum === 'bigint') {
tempStr = `${tempNum}n`;
} else if (typeof tempNum === 'symbol') {
Expand All @@ -1631,7 +1627,6 @@ function formatWithOptions(inspectOptions, ...args) {
}
case 105: // 'i'
const tempInteger = args[++a];
// eslint-disable-next-line valid-typeof
if (typeof tempInteger === 'bigint') {
tempStr = `${tempInteger}n`;
} else if (typeof tempInteger === 'symbol') {
Expand Down
3 changes: 0 additions & 3 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ const pwdCommand = isWindows ?


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

Expand Down
13 changes: 3 additions & 10 deletions tools/node_modules/eslint/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/node_modules/eslint/bin/eslint.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion tools/node_modules/eslint/lib/cli-engine/cli-engine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions tools/node_modules/eslint/lib/cli-engine/config-array-factory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions tools/node_modules/eslint/lib/cli-engine/formatters/junit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions tools/node_modules/eslint/lib/linter/linter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions tools/node_modules/eslint/lib/linter/node-event-generator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading