-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy path.eslintrc.json
109 lines (109 loc) · 3.4 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended-legacy",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:deprecation/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"react-hooks",
"deprecation"
],
"env": {
"browser": true,
"es2021": true
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"rules": {
"prefer-spread": "off",
"no-unused-vars": "off",
"no-return-await": "off",
"security/detect-object-injection": "off",
"eqeqeq": "error",
"require-await": "error",
"no-console": "error",
"import/no-default-export": "error",
"import/no-duplicates": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{"allowExpressions": true}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": true,
"ts-nocheck": true
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
],
"leadingUnderscore": "allow",
"filter": {
"regex": "^aria-label$",
"match": false
}
}
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/return-await": [
"error",
"in-try-catch"
],
"@typescript-eslint/consistent-type-imports": [
"error",
{"fixStyle": "inline-type-imports"}
],
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ "allowConstantLoopConditions": true }
],
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error"
}
}