-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
173 lines (173 loc) · 3.91 KB
/
.eslintrc.yml
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
170
171
172
173
env:
es2021: true
browser: false
jest: true
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 13 # This could also be 'latest'
sourceType: module
ecmaFeatures:
jsx: false
project:
- "./tsconfig.json"
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- airbnb
- plugin:jsdoc/recommended
plugins:
- "@typescript-eslint"
- import
- jsdoc
settings:
import/resolver:
node:
extensions:
- ".js"
- ".ts"
typescript: {}
rules:
"@typescript-eslint/brace-style":
- error
"@typescript-eslint/comma-dangle":
- error
- always-multiline
"@typescript-eslint/consistent-type-definitions":
- error
- interface
"@typescript-eslint/keyword-spacing":
- error
"@typescript-eslint/member-delimiter-style":
- error
"@typescript-eslint/method-signature-style":
- warn
- method
"@typescript-eslint/naming-convention":
- warn
- selector: default
format:
- camelCase
- PascalCase
- UPPER_CASE
leadingUnderscore: allow
trailingUnderscore: forbid
filter:
regex: "[- ]"
match: false
- selector:
- enumMember
format:
- UPPER_CASE
- selector:
- property
- parameter
- parameterProperty
format:
- camelCase
- PascalCase
leadingUnderscore: allow
trailingUnderscore: forbid
filter:
regex: "[- ]"
match: false
- selector: typeLike
format:
- PascalCase
"@typescript-eslint/no-duplicate-imports":
- error
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-floating-promises":
- error
"@typescript-eslint/no-misused-promises":
- error
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-shadow":
- error
"@typescript-eslint/no-unnecessary-condition":
- error
- allowConstantLoopConditions: true
"@typescript-eslint/no-unnecessary-boolean-literal-compare":
- error
"@typescript-eslint/no-unused-expressions":
- error
"@typescript-eslint/no-unused-vars":
- error
"@typescript-eslint/no-use-before-define":
- error
"@typescript-eslint/prefer-nullish-coalescing":
- warn
"@typescript-eslint/quotes":
- error
- single
- avoidEscape: true
"@typescript-eslint/semi":
- error
"@typescript-eslint/space-before-function-paren":
- error
- anonymous: never
named: never
asyncArrow: always
"@typescript-eslint/switch-exhaustiveness-check":
- error
"@typescript-eslint/type-annotation-spacing":
- warn
- before: false
after: true
overrides:
arrow:
before: true
brace-style: "off"
camelcase: "off"
class-methods-use-this: "off"
comma-dangle:
- error
- always-multiline
keyword-spacing: "off"
no-await-in-loop: "off"
no-duplicate-imports: "off"
no-restricted-syntax: "off"
no-shadow: "off"
no-unused-expressions: "off"
no-unused-vars: "off"
no-use-before-define: "off"
quotes: "off"
semi: "off"
space-before-function-paren: "off"
implicit-arrow-linebreak: "off"
import/extensions:
- error
- ignorePackages # maybe always?
- js: never
mjs: never
jsx: never
ts: never
mts: never
tsx: never
import/no-unresolved:
- 2
- ignore:
- ".js"
import/prefer-default-export: "off"
indent:
- error
- 2
- CallExpression:
arguments: first
FunctionDeclaration:
parameters: first
FunctionExpression:
parameters: first
SwitchCase: 1
VariableDeclarator: first
jsdoc/tag-lines: "off"
max-classes-per-file: "off"
max-len:
- warn
- code: 100
tabWidth: 2
no-console: "off"
no-underscore-dangle: "off"
prefer-arrow-callback:
- error