-
-
Couldn't load subscription status.
- Fork 83
New: Allow plugins to define rule replacements #77
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
Conversation
|
Hi @mykhalov!, thanks for the Pull Request The first commit message isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
|
Hi @mykhalov!, thanks for the Pull Request The first commit message isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
|
|
||
| ## Detailed Design | ||
|
|
||
| When reading plugin definition, look for `"replacements"` property next to `"rules"`: |
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 section should explain how you plan to implement this. Please look at the ESLint code and figure out which files would need to change. There are plenty of examples of already-merged RFCs in this repo to see what is expected.
|
|
||
| ## Alternatives | ||
|
|
||
| None at the moment. |
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.
There’s really no other alternatives? What about plug-ins themselves continuing to ship a rule that always reports that the rule is replaced by another rule?
|
|
||
| ## Open Questions | ||
|
|
||
| None at the moment. |
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.
None?
|
|
||
| ## Help Needed | ||
|
|
||
| None at the moment. |
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.
Does this mean you already know how to implement this change?
|
After digging into eslint and eslintrc source code it seems like there is a great effort required to provide a dynamic list of replacements vs reading from a JSON config as ESLint currently does. That effort doesn't seem to match the would-be benefit for development experience. |
|
Thanks @mykhalov. |
Summary
Provide better error message for removed rules by allowing plugins to define rule replacements.
Related Issues
Adding deprecation message to ESLint itself (#1549).