`max-statements-per-line` error should indicate how many statements it found
See original GitHub issueWhat version are you using? 2.11.0
What did you do?
Set max-statements-per-line
to $N, and lint a line that had > $N statements on it.
What happened? Got “This line has too many statements. Maximum allowed is $N”
What did you expect to happen? When N is 1, I’d expect “This line has 2 statements. Maximum allowed is 1”
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
ESLint rule to require one variable declaration statement per ...
The rules you list only apply to single statements (i.e. things where it's invalid to put a ; in the middle).
Read more >max-lines-per-function - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Consider adding exception to S122 for one-line conditionals
The gist is that a user posted that they like to have short one-line conditionals ( if(!a) { b = c; } )...
Read more >How To Fix Syntaxerror: Multiple Statements Found While ...
Sometimes this error may be caused by the invalid function calling or defining or invalid variable declaration, which you can resolve by putting ......
Read more >Code Issues - Embold Help Center
Similarly, any defect or bug found in the code leads to code issues. ... This change should not cause compiler errors but it...
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
I think this could really help with debugging, both for end users and for us if someone reports a bug with the rule. I’m 👍 on this.
Thanks, that did it. PR incoming.