-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
118 lines (118 loc) · 3.02 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
110
111
112
113
114
115
116
117
118
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"overrides": [
{
"files": ["*.js", "*.d.ts"],
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"rules": {}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint"],
"rules": {
"semi": ["warn", "never"],
"prefer-const": "warn",
"no-mixed-spaces-and-tabs": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true }],
"@typescript-eslint/array-type": ["warn", { "default": "array-simple" }],
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/consistent-indexed-object-style": ["warn", "record"],
"@typescript-eslint/consistent-generic-constructors": "warn",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "class",
"format": ["PascalCase"]
},
{
"selector": ["classProperty", "classMethod"],
"format": ["camelCase"]
},
{
"selector": ["classProperty", "classMethod"],
"filter": {
"regex": "^_.*$",
"match": true
},
"prefix": ["_"],
"format": ["camelCase"]
},
{
"selector": "typeProperty",
"format": null
},
{
"selector": "variable",
"modifiers": ["const"],
"format": null
},
{
"selector": "variable",
"modifiers": ["const", "destructured"],
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const", "global"],
"format": ["UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const", "global"],
"filter": {
"regex": "^_.*$",
"match": true
},
"prefix": ["_"],
"format": ["UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const", "global"],
"types": ["function"],
"format": ["camelCase", "UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const", "global", "exported"],
"format": ["camelCase", "UPPER_CASE"]
},
{ "selector": "variableLike", "format": ["camelCase"] },
{ "selector": "interface", "format": ["PascalCase"] },
{
"selector": "interface",
"modifiers": ["exported"],
"format": ["PascalCase"],
"prefix": ["I"]
},
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "objectLiteralProperty", "format": null },
{ "selector": "default", "format": ["camelCase"] }
],
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}