-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Conversation
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.
There was a problem hiding this 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.
hmm.. I believe I've seen a couple of cases in the recent function naming PRs that could violate this but in theory, LGTM |
@jasnell Then I guess we just need to make sure we run the linter on those PRs before we merge them? |
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>
Landed in 7537718 |
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>
@Trott do you want to manually backport this rule + fixes to v4 and v6? |
@thealphanerd Unless you think otherwise, I think it's OK if this doesn't land in v4 and v6. I'll change the labels. |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
tools
Description of change
ESLint has a
func-name-matching
rule that requires that function namesmatch 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.