Skip to content
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

Disable or remove specific code action/fixes/refactoring #37332

Open
5 tasks done
heroboy opened this issue Mar 11, 2020 · 6 comments
Open
5 tasks done

Disable or remove specific code action/fixes/refactoring #37332

heroboy opened this issue Mar 11, 2020 · 6 comments
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@heroboy
Copy link

heroboy commented Mar 11, 2020

Search Terms

Suggestion

microsoft/vscode#92305

Because when some code action is available, there will be a icon shows on the code editing area.
If some fixes I always not want, it's annoying that the clickable icon will show every time my cursor move on the code or select some code or some other actions. Especially when the current line left is not white spaces, the icon will show at previous line and cover the privious line code.

For example, I always want use require in js file not import.

And maybe some visual effect like the dash underline, the show fixes button in the popup tip, the dimmed color text should be removed, when the relate code action is disabled. Because these hint there are problems in my code but actually not.

Use Cases

Examples

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
@RyanCavanaugh RyanCavanaugh added In Discussion Not yet reached consensus Suggestion An idea for TypeScript labels Mar 11, 2020
@RyanCavanaugh
Copy link
Member

@mjbvz is there any editor-side support for this?

@mjbvz
Copy link
Contributor

mjbvz commented Mar 11, 2020

We don't have a UI for managing suggestions/actions. For now, this would likely be provided using a setting that VS Code could pass to TS

I believe there are two parts to this request:

@heroboy
Copy link
Author

heroboy commented Apr 9, 2020

like this

"editor.codeActionsOnSave": [
    "source.organizeImports",
    "source.fixAll"
]

what about:

"editor.codeActionsNotShow": [
    "source.organizeImports",
    "source.fixAll"
]

@orassayag
Copy link

I would like an option to remove this:
Untitled

@JakeJohnson05
Copy link

Is there any progress with this feature? I would like to remove SOME but not all VSCode suggestions.

@PowerWeb5
Copy link

This would help avoid the auto deletion of unreachable code like occurs with Prettier + ESLint in VSCode, if could just disable that single code action, while still allowing other Prettier formatting to occur, like mentioned in microsoft/vscode#109530.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

6 participants