-
Notifications
You must be signed in to change notification settings - Fork 163
/
.eslintrc.yaml
56 lines (48 loc) · 1.53 KB
/
.eslintrc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:react/recommended
- plugin:react-hooks/recommended
plugins:
- "@typescript-eslint"
- react
- react-hooks
parser: "@typescript-eslint/parser"
globals:
page: true
browser: true
context: true
jestPuppeteer: true
BASE_URL: true
rules:
# Code quality rules
eqeqeq: error
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }]
"@typescript-eslint/no-explicit-any": off # Allow explicit any to make incremental TypeScript adoption easier.
no-unused-vars: off
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }]
no-use-before-define: off
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }]
"@typescript-eslint/no-var-requires": off # Remove this override once all files use ES6 style imports.
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