-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to ESLint 9, flatconfig and Node.js 18 (#173)
Upgrade the eslint dependency. Change the documentation and tests to use the new configuration format. Also, upgrade Node.js in the build pipeline. > When ESLint v10.0.0 is released (end of 2024 or early 2025 in all likelihood), the eslintrc configuration system will be completely removed. https://eslint.org/blog/2023/10/flat-config-rollout-plans/#eslintrc-removed-in-eslint-v10.0.0 * Describe and test the usage only with flatconfig. It'll be the only config format soon. Who needs to retain `.eslintrc` can stay with eslint 8. * ESLint 9 supports only Node.js `^18.18.0 || ^20.9.0 || >=21.1.0`. * The formatter `eslint-tap` works, but because it doesn't follow the NPM package naming convention `eslint-formatter-*`, it has to be specified using a path to the script with the main exports.
- Loading branch information
Showing
7 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = [ | ||
{ | ||
rules: { | ||
'no-alert': 1, | ||
'camelcase': 2 | ||
} | ||
} | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
'use strict'; | ||
module.exports = function (context) { | ||
return { | ||
CallExpression(node) { | ||
if (node.callee.name === 'alert') { | ||
context.report(node, 'testing custom rules.'); | ||
module.exports = { | ||
create(context) { | ||
return { | ||
CallExpression(node) { | ||
if (node.callee.name === 'alert') { | ||
context.report(node, 'testing custom rules.'); | ||
} | ||
} | ||
} | ||
}; | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters