-
Notifications
You must be signed in to change notification settings - Fork 21
/
.eslintrc.json
99 lines (99 loc) · 3.46 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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react/recommended",
"plugin:deprecation/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "import", "react", "deprecation"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
"@typescript-eslint/consistent-type-imports": [
"warn",
{ "prefer": "no-type-imports" }
],
"@typescript-eslint/default-param-last": "warn",
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{ "overrides": { "constructors": "no-public" } }
],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-imports": "warn",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/restrict-template-expressions": [
"warn",
{
"allowNumber": true,
"allowBoolean": true,
"allowNullish": true
}
],
"accessor-pairs": "error",
"default-case-last": "error",
"default-case": "error",
"grouped-accessor-pairs": "warn",
"import/order": "warn",
"no-await-in-loop": "error",
"no-eval": "error",
"no-implicit-coercion": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-undef-init": "error",
"no-unmodified-loop-condition": "error",
"no-unused-vars": "off",
"no-useless-call": "error",
"no-useless-concat": "warn",
"no-var": "error",
"no-void": ["error", { "allowAsStatement": true }],
"prefer-const": "error",
"radix": "error",
"react/no-unescaped-entities": ["warn", { "forbid": [">", "\\", "}"] }],
"yoda": "warn"
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/restrict-template-expressions": "off"
}
}
]
}