Skip to content

Commit

Permalink
tools: require function declarations
Browse files Browse the repository at this point in the history
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: nodejs#12711
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
  • Loading branch information
Trott authored and Olivier Martin committed May 6, 2017
1 parent adb6f19 commit 2d1bf1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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,
Expand Down

0 comments on commit 2d1bf1f

Please sign in to comment.