diff --git a/.eslintrc.yml b/.eslintrc.yml index 7fc9a1faf7..7396ccdd0d 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -262,7 +262,13 @@ rules: no-nested-ternary: off no-new-object: error no-plusplus: off - no-restricted-syntax: off + no-restricted-syntax: + - error + - selector: 'FunctionDeclaration[async=true]' + message: > + async functions are not allowed outside of the test suite because + older versions of NodeJS do not support them without additional + runtime dependencies. Instead, use explicit Promises. no-tabs: error no-ternary: off no-underscore-dangle: off @@ -370,13 +376,6 @@ rules: yield-star-spacing: off overrides: - - files: "*" - excludedFiles: "**/__tests__/**" + - files: "**/__tests__/**" rules: - no-restricted-syntax: - - error - - selector: 'FunctionDeclaration[async=true]' - message: > - async functions are not allowed outside of the test suite because - older versions of NodeJS do not support them without additional - runtime dependencies. Instead, use explicit Promises. + no-restricted-syntax: off