Skip to content

Commit

Permalink
ESLint: Simplify exclude for "no-restricted-syntax" rule (#1867)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed May 18, 2019
1 parent ad2110e commit 0e72b35
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .eslintrc.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 0e72b35

Please sign in to comment.