forked from plexinc/papr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
169 lines (169 loc) · 5.25 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"env": {
"jest": true
},
"extends": [
"eslint:recommended",
"standard",
"plugin:import/recommended",
"plugin:promise/recommended",
"prettier"
],
"overrides": [
{
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:import/typescript"
],
"files": ["*.ts"],
"parserOptions": {
"project": [
"./tsconfig.json",
"./tests/ts/tsconfig.json",
"./tests/ts-nodenext/tsconfig.json"
],
"sourceType": "module",
"tsconfigRootDir": "."
},
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 5,
"ts-expect-error": "allow-with-description",
"ts-ignore": true,
"ts-nocheck": false,
"ts-check": true
}
],
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"@typescript-eslint/consistent-indexed-object-style": ["error"],
"@typescript-eslint/consistent-type-assertions": [
"warn",
{
"assertionStyle": "as"
}
],
"@typescript-eslint/consistent-type-definitions": ["error"],
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true,
"allowHigherOrderFunctions": true
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeParameter",
"format": ["PascalCase"],
"custom": {
"match": true,
"regex": "^[A-Z][A-Za-z]+$"
}
}
],
"@typescript-eslint/no-dynamic-delete": "warn",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-extra-parens": ["error", "functions"],
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/quotes": [
"error",
"single",
{
"allowTemplateLiterals": true
}
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/semi": "error",
"@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"indent": "off"
}
},
{
"files": ["**.test.ts"],
"rules": {
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/unbound-method": "off",
"no-unused-expressions": "off"
}
},
{
"files": ["tests/**"],
"rules": {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"rules": {
"import/no-named-as-default-member": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
}
}
],
"no-use-before-define": "warn",
"sort-keys": "warn"
}
}