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.

`max-statements-per-line` error should indicate how many statements it found

See original GitHub issue

What 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:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, May 30, 2016

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.

1reaction
ljharbcommented, Sep 2, 2016

Thanks, that did it. PR incoming.

Read more comments on GitHub >

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

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