-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
docs: update to eslint v9 in custom-rule-tutorial #18383
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
parserOptions: { ecmaVersion: 2015 } | ||
languageOptions: { ecmaVersion: 2015 } |
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.
We should update the same in the example project that is linked from the tutorial:
const ruleTester = new RuleTester({ | |
// Must use at least ecmaVersion 2015 because | |
// that's when `const` variable were introduced. | |
parserOptions: { ecmaVersion: 2015 } | |
}); |
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.
We should probably also update all references to ESLint v8 (e.g, devDependencies, peerDependencies) to ESLint v9.
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.
@@ -1,5 +1,6 @@ | |||
{ | |||
"name": "eslint-plugin-example", | |||
"private": true, |
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.
I also added this property - to avoid it being published unexpectedly.
Few more places to update to v9:
eslint/docs/src/extend/custom-rule-tutorial.md Lines 382 to 385 in 005ee25
eslint/docs/src/extend/custom-rule-tutorial.md Lines 394 to 396 in 005ee25
|
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.
LGTM, thanks!
fixes #18382
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?