-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement fixable rules when possible #115
Comments
Most rules won't be fixable, but that will still be nice for the few ones benefiting from this. |
* Create a fixer for no-is-array Part of #115 * Check fix is defined
Note that some rules will have subtle changes that mean we can't autofix, for example handling undefined arguments: |
Here's a first pass of rules we could probably write fixers for: (moved to first comment) |
|
|
Btw, Btw, it is part of ES 5.1, not of ES 6. |
Also adds fixers for: * `no-error-shorthand` * `no-load-shorthand` * `no-unload-shorthand` Add 'load' and 'unload' to `no-event-shorthand`. See #115
Also adds fixers for: * `no-error-shorthand` * `no-load-shorthand` * `no-unload-shorthand` Add 'load' and 'unload' to `no-event-shorthand`. See #115
Also fix copy/paste error in valid cases. Part of #115
Also fix copy/paste error in valid cases. Part of #115
Also fix copy/paste error in valid cases. Part of #115
Also fix copy/paste error in valid cases. Part of #115
* Pass context to fixers * Add fixer for no-proxy Part of #115
Rules that can't be auto-fixed can be implemented as suggestions. The message can be used to explain the limitations of the fix. |
Some of the rules could be fixed quite easily. For instance, migrating from
$.isArray()
toArray.isArray
is straightforward.It would be great if such rules could be implemented as fixable, so that ESLint can fix them automatically.
Ed: Adding checklist here so it comes up in the task list:
The text was updated successfully, but these errors were encountered: