Allow specifying a subset of rules to be autofixed on save
See original GitHub issueWith eslint.autoFixOnSave
on, ESLint applies all the fixes to a file while I only need just few of them to be applied automatically and have ability to decide whether the rest is ignored or fixed via Quick Fix.
It might be achieved via supporting boolean | string[]
as a value for autoFixOnSave
, as it was done in older version of TSLint plugin.
I’d be happy to send a PR if you consider this change useful
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:18 (9 by maintainers)
Top Results From Across the Web
How To Enable Linting on Save with Visual Studio Code and ...
Learn how to lint your code on every file save using ESLint rules and VS Code settings.
Read more >ESLint: How to specify rules that can be auto-fixed (using
I had the same task to do: auto fix eslint issues by the rule. Looks like there is no way to do it,...
Read more >Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >Editing e-books — calibre 6.10.0 documentation
Subsetting embedded fonts. Smartening punctuation. Transforming CSS properties. Removing unused CSS rules. Fixing HTML. Beautifying files.
Read more >Basic Usage :: RuboCop Docs
A replacement for ruby -w (a subset of its linting capabilities) ... RuboCop comes with a preconfigured set of rules for each of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.2.0 will ship with a new setting
eslint.codeActionOnSave.rules
to customize the rules used while running code action on save.@dbaeumer I, personally, don’t think this is a desirable behavior of the plugin.
I don’t see the right place for another eslintrc file. It does not belong to version control, as it’s an IDE-specific and even if we use the same IDE, some people prefer having different set of rules they want to be auto fixed.
Also, some people store their .vscode/ configs in non-project VCS and I can imagine such set up with an extra file being problematic