-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* eslint-disable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */ | ||
|
||
/** | ||
* @fileoverview Main Espree file that converts Acorn into Esprima output. | ||
* | ||
|
@@ -57,7 +55,6 @@ | |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
/* eslint-enable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */ | ||
|
||
import * as acorn from "acorn"; | ||
import jsx from "acorn-jsx"; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This was reported by |
||
types[key] = key; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This was reported by |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,11 +42,11 @@ | |
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"c8": "^7.11.0", | ||
"chai": "^4.3.6", | ||
"eslint": "^8.44.0", | ||
"eslint-config-eslint": "^9.0.0", | ||
"eslint": "^9.1.1", | ||
"eslint-config-eslint": "^10.0.0", | ||
"eslint-release": "^3.2.0", | ||
"esprima-fb": "^8001.2001.0-dev-harmony-fb", | ||
"globals": "^13.20.0", | ||
"globals": "^15.1.0", | ||
"lint-staged": "^13.2.0", | ||
"mocha": "^9.2.2", | ||
"npm-run-all": "^4.1.5", | ||
|
@@ -70,7 +70,7 @@ | |
"build:debug": "npm run build -- -m", | ||
"build:docs": "node tools/sync-docs.js", | ||
"build:update-version": "node tools/update-version.js", | ||
"lint": "eslint . --report-unused-disable-directives", | ||
"lint": "eslint .", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"lint:fix": "npm run lint -- --fix", | ||
"prepublishOnly": "npm run build:update-version && npm run build", | ||
"pretest": "npm run build", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,14 +70,13 @@ const testFiles = getTestFilenames(FIXTURES_DIR), | |
libraryFiles.forEach(filename => { | ||
const testResultFilename = `${path.resolve(__dirname, "..", LIBRARIES_DIR, filename)}.result.json`, | ||
code = shelljs.cat(path.resolve(LIBRARIES_DIR, filename)); | ||
let result = tester.getExpectedResult(code, { | ||
const result = tester.getExpectedResult(code, { | ||
loc: true, | ||
range: true, | ||
tokens: true | ||
}); | ||
|
||
JSON.stringify(result).to(testResultFilename); | ||
result = null; | ||
}); | ||
Comment on lines
-73
to
80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was reported by |
||
|
||
// update all tests in ecma-features | ||
|
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.