-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1665: Update eslint rules
- Loading branch information
Showing
58 changed files
with
1,155 additions
and
1,654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist/* | ||
docs/* | ||
node_modules/* | ||
dev-server.js | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
extends: | ||
- eslint:recommended | ||
- plugin:react/recommended | ||
- plugin:react-hooks/recommended | ||
|
||
plugins: | ||
- react | ||
- react-hooks | ||
|
||
parser: "@babel/eslint-parser" | ||
|
||
globals: | ||
page: true | ||
browser: true | ||
context: true | ||
jestPuppeteer: true | ||
BASE_URL: true | ||
|
||
rules: | ||
# Code quality rules | ||
no-unused-vars: ["error", { "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }] | ||
no-use-before-define: ["error", { "functions": false }] | ||
prefer-const: ["error", {"destructuring": "all"}] | ||
react/no-array-index-key: error | ||
react/prop-types: off # Remove this override once all props have been typed using PropTypes or TypeScript. | ||
|
||
# Code style rules | ||
arrow-parens: ["error", "always"] | ||
no-unneeded-ternary: ["error", { "defaultAssignment": true }] | ||
operator-linebreak: ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }] | ||
quote-props: ["error", "as-needed"] | ||
|
||
parserOptions: | ||
ecmaVersion: 6 | ||
sourceType: module | ||
ecmaFeatures: | ||
modules: true | ||
|
||
env: | ||
es6: true | ||
browser: true | ||
node: true | ||
jest: true | ||
|
||
settings: | ||
react: | ||
version: detect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.