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

Ignore auto fixable rules while typing #655

Closed
amannn opened this issue Apr 10, 2019 · 7 comments
Closed

Ignore auto fixable rules while typing #655

amannn opened this issue Apr 10, 2019 · 7 comments
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@amannn
Copy link

amannn commented Apr 10, 2019

The eslint integration for atom has a feature that allows to ignore auto fixable rules while typing (AtomLinter/linter-eslint#894). I find this to be very useful for stylistic errors like the ones from prettier.

If you have "Auto Fix On Save" enabled, the code will be taken care of anyway afterwards. Therefore I think there's no need to report them while typing. Of course this probably needs to be configurable.

Note that this is not only about prettier, but about auto fixable rules in general.

@dbaeumer dbaeumer added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Apr 11, 2019
@dbaeumer dbaeumer added this to the On Deck milestone Apr 11, 2019
@golopot
Copy link

golopot commented May 7, 2019

Does "while typing" mean that the warnings are suppressed only in a short period after keystroke? I kind of want the warning to be suppressed always.

@amannn
Copy link
Author

amannn commented May 7, 2019

"While typing" means until you save, so no matter if you're actually typing or not. As they are fixed on save you never really get them reported.

@golopot
Copy link

golopot commented May 7, 2019

A variant approach is to ignore "layout" rules while typing. Layout rules are those with meta.type === "layout". Meta.type is documented here.

@SHxKM
Copy link

SHxKM commented Jul 10, 2019

+1. It's very annoying to get a huge block of red squiggly lines just because I've just opened a <div (typo intended) that I've created.

@SHxKM
Copy link

SHxKM commented Jul 11, 2019

My other issue #711 was closed as a dupe of this one, so I'm posting the more detailed proposal here. From my issue OP:

My proposal is to implement one of the following options:

A) don't display any warnings (and possibly errors) in the editor, but do fix those on save.

or:

B) Add an option to add a time delay between the last character typed, and the appearance of warnings/errors

or:

C) Add an option to only display warnings and errors on save

A, B, C all solve the same problem: For .vue files for example, the editor is instantly filled with warnings/errors as soon as I open a new <div> tag because it's already recognizing a few rules that are broken with this temporary state. This is aesthetically unpleasant, and honestly sometimes distressing to see over and over again.

Setting eslint.quiet: true hides the warnings, but also ignores them, which means they aren't fixed on save.

Would this be complicated to implement? am I missing some setting?

@dbaeumer
Copy link
Member

#755 requests to make the rules configurable as well.

@dbaeumer
Copy link
Member

Dups #267

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2019
@dbaeumer dbaeumer removed this from the Backlog milestone Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

4 participants