I'm totally new to eslint configurations. I'm using tslint for typescript for quite a while now so I'm familiar with the concept.
eslint uses for many rules a syntax like
"no-cond-assign": [2, "always"]
or just
"no-constant-condition": 2
What does the number mean? The documentation is pretty huge and I'm not able to google or find it in the docs on the fly
I defines the severity of a rule. Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "3"). Documentation: https://eslint.org/docs/user-guide/configuring/rules.
ESLint can call out logic errors, such as update code in a for loop that iterates in the wrong direction. It can also call your attention to unused code, such as empty block statements which can indicate something like an incomplete refactoring process.
Keep in mind that we have over 200 rules, and that is daunting both for end users and the ESLint team (who has to maintain them).
I've found it myself by using another number than 0,1 or 2. I defines the severity of a rule.
Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "3").
Documentation: https://eslint.org/docs/user-guide/configuring/rules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With