mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
tools: require function declarations
Except for arrow functions, require function declarations instead of function expressions via linting. This is the predominant style in our code base (77 instances of expressions to 2344 instances of declarations). PR-URL: https://github.com/nodejs/node/pull/12711 Backport-PR-URL: https://github.com/nodejs/node/pull/13774 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
1 parent
7e6a956a29
commit
3d564a4ed1
1 file changed
+1
@@ -92,6 +92,7 @@ rules:
|
||||
eol-last: 2
|
||||
func-call-spacing: 2
|
||||
func-name-matching: 2
|
||||
func-style: [2, declaration, {allowArrowFunctions: true}]
|
||||
indent: [2, 2, {ArrayExpression: first,
|
||||
CallExpression: {arguments: first},
|
||||
MemberExpression: 1,
|
||||
|
||||
Reference in new issue
Block a user