Vscode-eslint: Autofix broken

Created on 18 Apr 2016  Â·  8Comments  Â·  Source: microsoft/vscode-eslint

Last friday its worked for me like a cahrm, but today without restart it wont show lightbulb with fix actions on error and if i search fix all command and trigger it i get:
No handler found for the command: 'eslint.executeAutofix'. An extension might be missing an activation event.

And nothing fixed. Its sad :(

All other seems working, ide/pc restart not helped, extension reinstall same.

shav@shav-OptiPlex-3020:~$ uname -a
Linux shav-OptiPlex-3020 3.16.0-70-generic #90~14.04.1-Ubuntu SMP Wed Apr 6 22:56:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
shav@shav-OptiPlex-3020:~$ eslint --v
v2.7.0

vscode 1.0.0, eslint plugin - latest.

bug

All 8 comments

@RootMale does eslint signal any errors in the file. Would you be able to share the workspace showing the problem ?

eslint server.js --fix

server.js
20:1 warning Line 20 exceeds the maximum line length of 120 max-len
47:1 error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype guard-for-in
73:5 error Closing curly brace should be on the same line as opening curly brace or on the line after the previous block brace-style

✖ 3 problems (2 errors, 1 warning)

All fixed from console like a charm.

Soory for some desinformation, looks like some fixes works. If you click at end of some errors there is a bulb with fix action and it works, but however as was mentioned ctrl+shift+p -> eslint execute autofix fails with error mentioned in beginning.

@RootMale thanls. Actually this got broken by me merging back in the PR. We will into it.

The idea here is that the action got moved into the code action UI. We are also working on a general language agnostic actions to trigger all code actions for program files. I released a new version of ESLint which removed the global eslint fix action

capture

But why? Its cool feature. Do you know its hard to find this damn small bulb sometimes if you just wanna fix all what can be fixed.

@RootMale pls see https://github.com/Microsoft/vscode/issues/5650. I want to avoid that we have actions per language / linter. That would be bad UI and VSCode has all information to provide a generic action for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

singleghost picture singleghost  Â·  20Comments

empz picture empz  Â·  66Comments

nicobarray picture nicobarray  Â·  75Comments

kasvtv picture kasvtv  Â·  107Comments

danielberndt picture danielberndt  Â·  22Comments