-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
90 lines (90 loc) · 2.64 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
{
"extends": [
"./lints/basic.js",
"./lints/react.js",
"./lints/ts.js"
],
"plugins": ["jsx-a11y"],
"parserOptions": {
"allowImportExportEverywhere": false,
"ecmaFeatures": {
"globalReturn": false,
"impliedStrict": true,
"jsx": true
},
"ecmaVersion": 2018,
"project": "./tsconfig.json",
"requireConfigFile": false,
"sourceType": "module"
},
"rules": {
"max-lines": ["warn", 500],
"max-lines-per-function": ["warn", 100],
"no-else-return": "off",
"no-param-reassign": [
"error",
{ "props": true, "ignorePropertyModificationsFor": ["draft", "acc"] }
],
"react/jsx-props-no-spreading": "off",
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/no-implicit-any-catch": "warn",
"@typescript-eslint/no-magic-numbers": [
"warn",
{
"ignore": [0, 1],
"ignoreArrayIndexes": true,
"ignoreEnums": true,
"ignoreNumericLiteralTypes": true,
"ignoreReadonlyClassProperties": true
}
],
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/require-array-sort-compare": [
"error",
{
"ignoreStringArrays": true
}
],
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/no-autofocus": "warn"
},
"overrides": [
{
"files": ["*.stories.tsx", "*.stories.ts"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"import/no-default-export": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"jsx-a11y/interactive-supports-focus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-static-element-interactions": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.test.ts", "*.test.tsx"],
"rules": {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"import/first": "off",
"max-classes-per-file": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-nested-callbacks": "off",
"jsx-a11y/interactive-supports-focus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/no-static-element-interactions": "off"
}
}
]
}