Skip to content

Commit b58972a

Browse files
Trottgibfahn
authored andcommitted
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: #12711 Backport-PR-URL: #13774 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 95731fe commit b58972a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.eslintrc.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ rules:
9292
eol-last: 2
9393
func-call-spacing: 2
9494
func-name-matching: 2
95+
func-style: [2, declaration, {allowArrowFunctions: true}]
9596
indent: [2, 2, {ArrayExpression: first,
9697
CallExpression: {arguments: first},
9798
MemberExpression: 1,

0 commit comments

Comments
 (0)