question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow specifying a subset of rules to be autofixed on save

See original GitHub issue

With 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
dbaeumercommented, Oct 1, 2021

2.2.0 will ship with a new setting eslint.codeActionOnSave.rules to customize the rules used while running code action on save.

1reaction
pablobirukovcommented, Nov 18, 2019

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found