-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
chore: don't fix TS code actions on save in vscode #60897
base: main
Are you sure you want to change the base?
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 |
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