From 791a56fa7309d7f3e15a9c8847cd5f0cb25e32d4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Apr 2017 17:27:55 -0700 Subject: [PATCH] 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). --- .eslintrc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index e60260aaaa8dc3..8cf566a03f9d22 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -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,