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

Fix all of same type, and fix all in file #16

Open
EliteMasterEric opened this issue Aug 20, 2021 · 1 comment
Open

Fix all of same type, and fix all in file #16

EliteMasterEric opened this issue Aug 20, 2021 · 1 comment

Comments

@EliteMasterEric
Copy link

ESLint has functionality which provides the following additional quickfixes:

  • Perform quick fix for all instances of this issue in this file. For example, "Fix all instances of StringLiteral in this file"
  • Perform quick fix for all auto-fixable issues in this file. Titled "Fix all auto-fixable issues"

I tried to implement this myself but couldn't figure out how the ESLint extension is structured. I think this line may have something to do with it:

https://github.com/microsoft/vscode-eslint/blob/3aef00d9320a00890beec9f3f8160d5f82a47626/server/src/eslintServer.ts#L2100

@AlexHaxe
Copy link
Member

parts of your request are already available: if your cursor selection includes multiple instances of e.g. single quote issues then invoking a quick fix will apply to all of them (if you can find the one yellow lightbulb that will appear next to the first occurrence)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants