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.

Add "fix" severity level

See original GitHub issue

ESLint is smart enough to auto fix some of the code. The problem is, in order to do so, the related rule must be marked as "warn" or "error", which can pollute the code with unnecessary warnings. For example: indent - good rule, but produces too much warnings/errors, that can be solved easily with CI (let’s ignore prettier for this example).

My proposition is to have additional "fix" level that does not produce an error/warning, but is still auto fixed when running with --fix.

One possible problem would be if the user configures non-fixable rule as "fix" - what would happen then? Maybe then it should not be a severity level, but something else that suppresses the error/warning? Or simply interpret is as "off"?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TehShrikecommented, Jun 19, 2019

I’m looking for a solution to this problem as well.

I don’t want to see visual warnings in my IDE for things that eslint is going to automatically fix for me as soon as I hit the save button.

I currently solve this by putting my fixable rules in one config file, and the rules that I want to affect my IDE in another config file. This is pretty jankety.

0reactions
kaicataldocommented, Jun 19, 2019

Feel free to open a new issue with a proposal if this is something you’d like to advocate for. My comments above still stand!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change inspection severity | IntelliJ IDEA Documentation
Click any inspection and select Edit severities from the list of severity levels. In the Severities Editor dialog, click the Add button and...
Read more >
Defect Severity and Priority in Testing with Examples and ...
A defect with low priority indicates that there is definitely an issue, but it doesn't have to be fixed to match the “exit”...
Read more >
Database Engine Error Severities - SQL Server - Microsoft Learn
The following table lists and describes the severity levels of the errors raised by the SQL Server Database Engine.
Read more >
Severity levels: Definition & Examples - Kaseya HelpDesk
Technical support requests within a severity level are generally processed ... Kaseya technical support cannot guarantee a fixed problem resolution period ...
Read more >
There should be an `info` severity level · Issue #9340 - GitHub
With ESLint, I set rules such as line length (max-len) to 'warn' because they're helpful to see (i.e. in your editor) but not...
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