chore: don't fix TS code actions on save in vscode#60897
chore: don't fix TS code actions on save in vscode#60897kirkwaiblinger wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
|
Relates to #37332 |
|
Honestly I don't understand why this quick fix is even eligible for an on save action... If it were me, I'd probably fix that instead |
Do you mean dead code branch deletion in general? |
|
Yes, though probably there are others? I use auto fix for high quality lints (e.g. let -> var in eslint), but I can't imagine wanting my code deleted on save |
Well, this quick fix is coming from TS itself, not from the linter. I don't really have any context to speak to TS's intentions around quick fix, I can only speak for (typescript-)eslint, so I can't really chime in with anything intelligent here. Closing this PR. |
|
Oh, I don't think the PR was a problem, I was just looking past it to "if this is a good behavior, shouldn't it be the default too". |
Oh, I see - my motivation is completely agnostic as to whether it's a good behavior. I just think it's categorically best to avoid applying autofixes in the editor that aren't validated in CI, in order to keep diffs free of unrelated changes 🤷♂️. Feel free to reopen if you like! I've changed my |
|
Doesn't seem like this is going anywhere, and I'd like to clear out my open PRs |
For contributors who have "source.fixAll" enabled at a user level, spurious changes occur when saving files. For example, when I save the
checker.ts, I get this diff:Therefore, explicitly setting "source.fixAll.ts": "never" would be beneficial to contributors