-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
refactor: switch to eslint v9, eslint-config-eslint v10 #604
Conversation
"n/no-unsupported-features/es-syntax": ["error", { | ||
version: ">=16.0.0", | ||
ignores: ["modules"] | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This override is apparently no longer needed with the latest version of eslint-plugin-n.
@@ -160,7 +157,7 @@ export const Syntax = (function() { | |||
} | |||
|
|||
for (key in VisitorKeys) { | |||
if (Object.hasOwnProperty.call(VisitorKeys, key)) { | |||
if (Object.hasOwn(VisitorKeys, key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reported by prefer-object-has-own
.
@@ -27,7 +27,7 @@ const SUPPORTED_VERSIONS = [ | |||
* @returns {number} The latest ECMAScript version. | |||
*/ | |||
export function getLatestEcmaVersion() { | |||
return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1]; | |||
return SUPPORTED_VERSIONS.at(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reported by unicorn/prefer-at
.
"lint": "eslint . --report-unused-disable-directives", | ||
"lint": "eslint .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--report-unused-disable-directives
CLI flag is no longer needed because it is set to "error"
in the config.
let result = tester.getExpectedResult(code, { | ||
const result = tester.getExpectedResult(code, { | ||
loc: true, | ||
range: true, | ||
tokens: true | ||
}); | ||
|
||
JSON.stringify(result).to(testResultFilename); | ||
result = null; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reported by no-useless-assignment
.
Switches to using eslint v9 and eslint-config-eslint v10 to lint this project.
Marked as
refactor
as it has changes in the production code.