Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upProposal: one statement per line #798
Comments
feross
added
the
enhancement
label
Feb 21, 2017
This comment has been minimized.
This comment has been minimized.
|
ACK, provided the following is possible: for (var i = 0; i < length; ++i) bar++ |
This comment has been minimized.
This comment has been minimized.
|
Yea it is, that's good example too. |
This comment has been minimized.
This comment has been minimized.
|
I think this is decent. Interested in ecosystem impact. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Mar 22, 2017
•
|
FWIW, in CoffeeScript, I write my early terminations like |
This comment has been minimized.
This comment has been minimized.
|
This rule would disrupt the way that too many people write code and it doesn't prevent bugs or improve code consistency enough to justify the cost to users, in my opinion. Here are the results of the test suite: 24% breakage.
|
feross
closed this
Apr 4, 2017
This comment has been minimized.
This comment has been minimized.
|
@feross what were some of those failures? OOI |
This comment has been minimized.
This comment has been minimized.
|
I'm assuming for-loops would be a big part of this
…On Wed, Apr 5, 2017 at 3:19 AM Daniel Cousens ***@***.***> wrote:
@feross <https://github.com/feross> what were some of those failures? OOI
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#798 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWleqtzrMdl9-BvQFqcDykCS5fbX90mks5rsuwFgaJpZM4MHuWA>
.
|
This comment has been minimized.
This comment has been minimized.
|
@dcousens I can't remember... From memory, things like: if (condition) { foo() } else { bar() }And certain for loops. |
tunnckoCore commentedFeb 21, 2017
•
edited
Digging more and more in ESLint rules, i found some good ones which enforces good style and more readable code. This issue is for max-statements-per-line rule - not fixable.
Suggested configuration.
{ "max-statements-per-line": ["error", { "max": 1 }] }Invalid
Valid
Semicolon in
foris required, since it will be autofixed by other rule to