-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc
76 lines (76 loc) · 2.05 KB
/
.eslintrc
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"extends": ["airbnb", "prettier"],
"parser": "babel-eslint",
"parserOptions": {
// Only ESLint 6.2.0 and later support ES2020.
"ecmaVersion": 2020
},
"env": {
"browser": true,
"node": true,
"jest/globals": true
},
"plugins": ["react", "react-hooks", "testing-library", "jest-dom", "jest"],
"rules": {
"no-underscore-dangle": [
"error",
{
"allow": [
"_id"
]
}
],
"jsx-a11y/anchor-is-valid": [
"warn",
{
"components": [
"Link"
],
"specialLink": [
"hrefLeft",
"hrefRight"
],
"aspects": [
"invalidHref",
"preferButton"
]
}
],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
// testing-library
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debug": "warn",
"testing-library/no-dom-import": "off",
// jest-dom
"jest-dom/prefer-checked": "error",
"jest-dom/prefer-enabled-disabled": "error",
"jest-dom/prefer-required": "error",
"jest-dom/prefer-to-have-attribute": "error",
// react hooks
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-one-expression-per-line": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": false, "peerDependencies": false}],
"no-use-before-define": [
"error", {
"functions": false,
"classes": false
}
],
"max-len": ["error", { "code": 250 }],
"no-param-reassign": "off",
"no-nested-ternary": "off",
"no-shadow": "off",
"no-extend-native": "off",
"no-plusplus": "off"
}
}