-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
feat: introduce new deprecated types for rules #19238
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
It doesn't seem that this is implemented? |
|
I updated the OP with the correct issue and corrected the messages in the rules. |
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
[x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
This implements the additional deprecated metadata RFC and closes #18061.
The checklist from the RFC:
Internal Changes:
External Changes:
I also investigated the impact for third-party plugins.
Generally there are only a few deprecated rules and most are stylistic rules.
An overview for plugins with some deprecated rules:
jsx-*
shebang
imports-first
component-tags-order
,no-invalid-model-keys
,no-ref-object-destructure
,no-setup-props-destructure
,script-setup-uses-vars
,v-on-function-call
svelte/@typescript-eslint/no-unnecessary-condition
functional-parameters
Plugins without deprecated rules:
Is there anything you'd like reviewers to focus on?
Some notes for the changes:
DeprecateInfo
as it is part of the rule but its documentation has no type anywhere and the type documentation is required forusedDeprecatedRules
in NodeJS API Documentation. I chose to use a separate page with a short intro about the deprecated format and detailing the new format. This document could also detail future tools using the deprecated information.meta.deprecated
property for the ruleindent-legacy
is not updated as it is used for a test case inlegacy-eslint
andCLIEngine
which I assume to be frozen (but I still updated it for other frozen rules)eslint-stylistic
(e.g. rules replaced bypadding-line-between-statements
)rule.meta.deprecated
were left untouched as objects are truthy (e.g. inrule.macro.html
).