-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
94 lines (94 loc) · 3.31 KB
/
.eslintrc.json
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["plugin:@typescript-eslint/recommended", "plugin:promise/recommended", "prettier", "react-app", "plugin:testing-library/react"],
"globals": {},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["prettier", "@typescript-eslint", "react", "jest", "promise", "simple-import-sort", "testing-library"],
"rules": {
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"jest/prefer-expect-assertions": "off",
"jest/no-focused-tests": "error",
"jsx-quotes": ["error", "prefer-double"],
"max-len": ["error", 150],
"no-unused-vars": "off",
"no-var": "error",
"promise/always-return": "off",
"promise/catch-or-return": "off",
"react/boolean-prop-naming": ["error", { "rule": "^(can|is|has)[A-Z]([A-Za-z0-9]?)+" }],
"react/forbid-component-props": ["error", { "forbid": ["style"] }],
"react/destructuring-assignment": ["error", "always"],
"react/jsx-sort-props": ["error", { "ignoreCase": true }],
"react/no-access-state-in-setstate": "error",
"react/no-children-prop": "error",
"react/no-deprecated": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "error",
"react/no-redundant-should-component-update": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-unknown-property": "error",
"react/no-unsafe": "error",
"react/no-unused-state": "error",
"react/no-will-update-set-state": "error",
"react/prefer-stateless-function": ["error", { "ignorePureComponents": false }],
"react/prop-types": "off",
"react/void-dom-elements-no-children": "error",
"require-await": "error",
"promise/no-return-wrap": "off",
"simple-import-sort/imports": [
"error",
{
"groups": [
["^react", "^@?\\w"],
// Internal packages.
["^(components|containers|core|services|testing|utils)(/.*|$)"],
// Side effect imports.
["^\\u0000"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports.
["^.+\\.s?css$"]
]
}
],
// Not a useful rule, often fires in non-test code
"testing-library/render-result-naming-convention": "off",
"testing-library/no-node-access": "off",
"testing-library/prefer-screen-queries": "off",
"testing-library/no-container": "off",
"testing-library/prefer-find-by": "off"
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"]
}
}
}
}