-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
.eslintrc.yml
166 lines (128 loc) · 3.74 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
root: true
parser: '@typescript-eslint/parser'
settings:
import/parsers:
'@typescript-eslint/parser': [ '.ts' ]
env:
browser: true
node: true
mocha: true
es2022: true
globals:
NodeJS: true
KOISHI_CONFIG: true
extends:
- standard
- plugin:@typescript-eslint/recommended
- plugin:prettier/recommended
plugins:
- '@typescript-eslint'
rules:
prettier/prettier:
- error
- printWidth: 80
- tabWidth: 4
array-callback-return: off
comma-dangle:
- error
- never
dot-notation: off
generator-star-spacing:
- error
- before
max-len:
- warn
- 160
multiline-ternary: off
no-callback-literal: off
no-mixed-operators: off
no-use-before-define: off
no-return-assign: off
no-sequences: off
no-useless-escape: off
one-var: off
operator-linebreak:
- error
- after
- overrides:
'?': before
':': before
quotes:
- error
- single
- avoidEscape: true
allowTemplateLiterals: true
sort-imports:
- warn
- ignoreCase: true
ignoreDeclarationSort: true
valid-typeof: off
yield-star-spacing:
- error
- after
# typescript
import/export: off
'@typescript-eslint/array-type': error
default-param-last: off
'@typescript-eslint/default-param-last': error
func-call-spacing: off
'@typescript-eslint/func-call-spacing': error
keyword-spacing: off
'@typescript-eslint/keyword-spacing': error
camelcase: off
'@typescript-eslint/naming-convention':
- warn
# group selectors
- selector: default
format: [ camelCase, UPPER_CASE ]
leadingUnderscore: allow
- selector: [ variableLike, memberLike ]
format: [ camelCase, UPPER_CASE, PascalCase ]
leadingUnderscore: allow
- selector: [ typeLike ]
format: [ PascalCase ]
# selectors
- selector: [ function ]
format: [ camelCase, PascalCase ]
- selector: [ enum ]
format: [ UPPER_CASE, PascalCase ]
- selector: [ typeParameter ]
format: [ PascalCase ]
- selector: [ objectLiteralProperty ]
format: null
- selector: [ typeProperty ]
format: null
- selector: [ typeMethod ]
format: null
# https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
no-redeclare: off
# https://typescript-eslint.io/docs/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
no-undef: off
# https://stackoverflow.com/questions/71626119/eslint-and-prettier-indent-conflict
indent: off
no-unused-vars: off
'@typescript-eslint/no-unused-vars':
- error
- args: none
no-dupe-class-members: off
'@typescript-eslint/no-dupe-class-members': error
# https://github.com/typescript-eslint/typescript-eslint/issues/239
no-inner-declarations: off
no-useless-constructor: off
node/no-callback-literal: off
quote-props: off
semi: off
'@typescript-eslint/semi':
- error
- never
'@typescript-eslint/member-delimiter-style':
- error
- multiline:
delimiter: none
space-before-function-paren: off
'@typescript-eslint/space-before-function-paren':
- error
- anonymous: always
asyncArrow: always
named: never
'@typescript-eslint/type-annotation-spacing': error