You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
Hey,
I'm not sure if this should be added to #211 or if that's a different issue
The rule max-statements-per-line (with the default max: 1) complains on if (v) { console.log(); }.
These braces are added when the rule curly is present with "all" or "multi", "consistent" (when the else has multiple statements within its braces).
I'm expecting the rule to accept the block because it contains only a single statement.
Validations
Describe the bug
Hey,
I'm not sure if this should be added to #211 or if that's a different issue
The rule
max-statements-per-line
(with the defaultmax: 1
) complains onif (v) { console.log(); }
.These braces are added when the rule
curly
is present with"all"
or"multi", "consistent"
(when theelse
has multiple statements within its braces).I'm expecting the rule to accept the block because it contains only a single statement.
Reproduction:
Reproduction
https://stackblitz.com/edit/github-pwcljb?file=eslint.config.js
(It doesn't show in Stackblitz because the file keeps getting formatted on save...)
Contributes
The text was updated successfully, but these errors were encountered: