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: enforce function name matching in linter #9408

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Nov 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

Description of change

ESLint has a func-name-matching rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.
@Trott Trott added the tools Issues and PRs related to the tools directory. label Nov 1, 2016
Copy link
Contributor

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

LGTM, I'm surprised it passes as-is.

@jasnell
Copy link
Member

jasnell commented Nov 2, 2016

hmm.. I believe I've seen a couple of cases in the recent function naming PRs that could violate this but in theory, LGTM

@gibfahn
Copy link
Member

gibfahn commented Nov 2, 2016

@jasnell Then I guess we just need to make sure we run the linter on those PRs before we merge them?

Trott added a commit to Trott/io.js that referenced this pull request Nov 4, 2016
ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

PR-URL: nodejs#9408
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
@Trott
Copy link
Member Author

Trott commented Nov 4, 2016

Landed in 7537718

@Trott Trott closed this Nov 4, 2016
evanlucas pushed a commit that referenced this pull request Nov 7, 2016
ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

PR-URL: #9408
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
@MylesBorins
Copy link
Contributor

@Trott do you want to manually backport this rule + fixes to v4 and v6?

@Trott
Copy link
Member Author

Trott commented Nov 22, 2016

@thealphanerd Unless you think otherwise, I think it's OK if this doesn't land in v4 and v6. I'll change the labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants