Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,test: make argument linting more stringent #6720

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 12, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

test tools

Description of change

The custom linting rule for argument alignment in multi-line function
calls previously ignored template strings in an effort to avoid false
positives. This isn't really necessary. Enforce for template strings and
adjust whitespace in three tests to abide. (Insert "The test abides"
joke of your choosing here.)

@Trott Trott added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels May 12, 2016
@Trott
Copy link
Member Author

Trott commented May 15, 2016

@Trott
Copy link
Member Author

Trott commented May 15, 2016

/cc @silverwind

@silverwind
Copy link
Contributor

No accompaning rule change? Seems a bit pointless if you don't enforce the style. Note that I'm not really a fan of the alignment at (, but if it's the dominant style right now, so be it.

@Trott
Copy link
Member Author

Trott commented May 15, 2016

@silverwind There is a change to tools/eslint-rules/align-function-arguments.js in this PR.

@silverwind
Copy link
Contributor

Ah, totally missed that. LGTM.

@@ -32,8 +32,7 @@ function checkArgumentAlignment(context, node) {
'ArrowFunctionExpression',
'CallExpression',
'FunctionExpression',
'ObjectExpression',
'TemplateLiteral'
'ObjectExpression'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nittiest of nitpicks but if you leave the comma, the diff is one line shorter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a supporter of the final-line dangling-comma but don't see it too much in the code base here. Happy to add an instance! And...

...done!

@bnoordhuis
Copy link
Member

LGTM

The custom linting rule for argument alignment in multi-line function
calls previously ignored template strings in an effort to avoid false
positives. This isn't really necessary. Enforce for template strings and
adjust whitespace in three tests to abide. (Insert "The test abides"
joke of your choosing here.)
@Trott
Copy link
Member Author

Trott commented May 16, 2016

Only CI failure is an unrelated known-flaky (with a possible fix pending in another PR, woot).

Trott added a commit to Trott/io.js that referenced this pull request May 16, 2016
The custom linting rule for argument alignment in multi-line function
calls previously ignored template strings in an effort to avoid false
positives. This isn't really necessary. Enforce for template strings and
adjust whitespace in three tests to abide. (Insert "The test abides"
joke of your choosing here.)

PR-URL: nodejs#6720
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@Trott
Copy link
Member Author

Trott commented May 16, 2016

Landed in d73e189

@Trott Trott closed this May 16, 2016
evanlucas pushed a commit that referenced this pull request May 17, 2016
The custom linting rule for argument alignment in multi-line function
calls previously ignored template strings in an effort to avoid false
positives. This isn't really necessary. Enforce for template strings and
adjust whitespace in three tests to abide. (Insert "The test abides"
joke of your choosing here.)

PR-URL: #6720
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@Trott Trott deleted the literal branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants