Skip to content
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

Support new eslint suggestions API #806

Closed
wdoug opened this issue Nov 22, 2019 · 2 comments · Fixed by #814
Closed

Support new eslint suggestions API #806

wdoug opened this issue Nov 22, 2019 · 2 comments · Fixed by #814
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@wdoug
Copy link

wdoug commented Nov 22, 2019

Eslint has a new Suggestions API that was initially described in this RFC, and recently merged and released in eslint 6.7.0.

The suggestions API provides information for users to manually apply fixes for lint issues that don't have enough context to be auto-fixable. I think we'll want to have vscode-eslint support suggestions as a Quick Fix. Here is an example of how it would work:

new RegExp("*\.js", "u")
//           ^^
//           ├ Remove the `\`. This maintains the current functionality. (no-useless-escape)
//           └ Replace the `\` with `\\` to include the actual backslash character. (no-useless-escape)
@dbaeumer
Copy link
Member

I agree that adopting this in ESLint makes sense. However for auto fix on save there can't be an additional UI and for single error fixing we would simply provide both fixes as a code action.

@dbaeumer
Copy link
Member

This would be a good candidate for a PR.

@dbaeumer dbaeumer added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Nov 25, 2019
@dbaeumer dbaeumer added this to the On Deck milestone Nov 25, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 2, 2020
@dbaeumer dbaeumer removed this from the On Deck milestone Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants