editor.codeActionsOnSave with "source.organizeImports", "source.fixAll" not always applied
See original GitHub issueFrom https://github.com/Microsoft/vscode/issues/67482
Repo
- In VS Code, set:
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll": true
}
- Try saving a file with imports and tslint fixable problems (such as missing semicolons)
Bug Fix all is often not run on save
See https://github.com/Microsoft/vscode/issues/67482#issuecomment-458765199 for explanation of root cause
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Understanding ESlint, Prettier, Typescript, VScode Config
So question is why use prettier when it isn't doing the formatting in "source.fixAll.eslint" setting and when it is doing the formatting, it...
Read more >February 2019 (version 1.32) - Visual Studio Code
Editor - Fix All Source Action allows you to fix on save, improved column selection. Languages - No reload required when installing TypeScript...
Read more >vscode.CodeActionKind - Haxe externs for Visual Studio Code
Source code actions apply to the entire file. They must be explicitly requested and will not show in the normal lightbulb menu. Source...
Read more >Optimizing VS Code for Angular - Packt Subscription
Configuring your project automatically · Install the Angular VS Code task: npm i -g mrm-task-angular-vscode. Copy · Apply the Angular VS Code configuration:...
Read more >typescript-language-server - npm
Go to Source Definition; Apply Workspace Edits; Apply Code Action; Apply Refactoring; Organize Imports; Rename File.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue is still relevant. @mjbvz could you please reopen it?
Related:
Due to the change of applying
fixAll
first (https://github.com/Microsoft/vscode/commit/f0d1dbcd2c976ce9e7d845d01a61992b6a5f2d5f), I’m having issues with the output oforganizeImports
being formatted differently (disrespecting line length, and adding semicolons). While it would be nice if the organize action was following the same linting rules, in this case I would likefixAll
to run last.