-
-
Notifications
You must be signed in to change notification settings - Fork 461
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
Run eslint --fix AFTER prettier on save #1277
Comments
Unfortunately, this is not possible. The order of operations is controlled by VS Code and formatting is not exposed as a code action. There are multiple issues in vscode about this and hopefully they will resolve soon. One example is here: microsoft/vscode#90220 |
The march VS Code update allows specifying an array to order codeActionsOnSave: https://code.visualstudio.com/updates/v1_44#_explicit-ordering-for-code-actions-on-save |
So this and #870 (comment) gave me an idea for an extension, what if we could run 'Format Document' as a Checkout https://github.com/rohit-gohri/vscode-format-code-action/ This registers a custom codeAction: I'm running eslint after prettier with these settings:
and these extensions:
I hope this helps anyone coming here. Might help in #716 and microsoft/vscode#87096 too |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the solution you'd like
Due to company constraints, I'd like to run
eslint --fix
AFTER this extension runs Prettier.Now that the prettier eslint integration is deprecated, is there a recommended way to do this? It looks like this has been brought up in the past: #14
Describe alternatives you've considered
I'm using this configuration, however it runs eslint FIRST & then Prettier:
The text was updated successfully, but these errors were encountered: