GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — tools: lint for function argument alignment by Trott · Pull Request #6390 · nodejs/node Conversation
Member
Checklist
Affected core subsystem(s)tools test Description of changeIn function calls that span multiple lines, apply a custom lint rule to With this rule, the following code will be flagged as an error by the The following code will not be flagged as an error by the linter:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
2 tasks done
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // For now, don't bother trying to validate potentially complicating things | ||
| // like closures. Different people will have very different ideas and it's | ||
| // probably best to implement configuration options. | ||
| if (args.some((node) => { return ignoreTypes.indexOf(node.type) !== -1; })) { |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
if (args.some((node) => ignoreTypes.includes(node.type))) {?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
At least for the moment, that will break on CI. For faster results, the VM that runs the linter uses the system Node.js (currently 5.x) and doesn't compile from source. 5.x does not have Array.prototype.includes().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Although I could get rid of the braces and return keyword... is "no braces for arrow functions where they can be omitted" a style we want to standardize on? ESLint has a built-in rule for that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I prefer the short form because why many words when can terse, right? @jbergstroem Are there any downsides to upgrading the node that runs the linter to v6?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM with a suggestion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: nodejs#6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: nodejs#6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If braces are not required for an arrow function body, omit them. Refs: nodejs#6390 (diff)
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: #6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: #6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
|
@Trott you know the drill 📦 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: nodejs#7100 Refs: nodejs#6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: nodejs#7100
Refs: nodejs#6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: #7100 Refs: #6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: #7100
Refs: #6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: #7100 Refs: #6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: #7100
Refs: #6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
In preparation for a lint rule enforcing function argument alignment, adjust function arguments to be aligned. PR-URL: #7100 Refs: #6390 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Imran Iqbal <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ryan Graham <[email protected]>
In function calls that span multiple lines, apply a custom lint rule to
enforce argument alignment.
With this rule, the following code will be flagged as an error by the
linter because the arguments on the second line start in a different
column than on the first line:
myFunction(a, b,
c, d);
The following code will not be flagged as an error by the linter:
myFunction(a, b,
c, d);
PR-URL: #7100
Refs: #6390
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Imran Iqbal <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ryan Graham <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.