question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

editor.codeActionsOnSave with "source.organizeImports", "source.fixAll" not always applied

See original GitHub issue

From https://github.com/Microsoft/vscode/issues/67482

Repo

  1. In VS Code, set:
  "editor.codeActionsOnSave": {
            "source.organizeImports": true,
            "source.fixAll": true
        }
  1. 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:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Maximaximumcommented, Jun 29, 2019

The issue is still relevant. @mjbvz could you please reopen it?

3reactions
Kjagdcommented, Mar 6, 2019

Related:

Due to the change of applying fixAll first (https://github.com/Microsoft/vscode/commit/f0d1dbcd2c976ce9e7d845d01a61992b6a5f2d5f), I’m having issues with the output of organizeImports 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 like fixAll to run last.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found