@cenk1cenk2/eslint-config 2.7.59 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.js +1 -1
- package/CHANGELOG.md +19 -0
- package/base.js +152 -0
- package/eslint.config.js +9 -0
- package/import-strict.js +12 -13
- package/import.js +16 -48
- package/jsconfig.json +7 -0
- package/package.json +12 -8
- package/react-typescript.js +19 -17
- package/react.js +59 -57
- package/release.config.js +2 -2
- package/svelte-typescript.js +23 -18
- package/typescript-dynamic.js +28 -26
- package/typescript.js +229 -307
- package/utils.js +15 -17
- package/vue-typescript.js +8 -11
- package/vue.js +24 -25
- package/constants.js +0 -3
- package/index.js +0 -141
package/typescript.js
CHANGED
|
@@ -1,336 +1,258 @@
|
|
|
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
|
-
multiline: {
|
|
43
|
-
delimiter: 'none',
|
|
44
|
-
requireLast: true
|
|
45
|
-
},
|
|
46
|
-
singleline: {
|
|
47
|
-
delimiter: 'comma',
|
|
48
|
-
requireLast: false
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
53
|
-
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
54
|
-
'@typescript-eslint/brace-style': [
|
|
55
|
-
'error',
|
|
56
|
-
'1tbs',
|
|
57
|
-
{
|
|
58
|
-
allowSingleLine: true
|
|
1
|
+
import StylisticPlugin from '@stylistic/eslint-plugin'
|
|
2
|
+
import TypescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
|
|
3
|
+
|
|
4
|
+
import base from './base.js'
|
|
5
|
+
|
|
6
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
7
|
+
export default [
|
|
8
|
+
...base,
|
|
9
|
+
{
|
|
10
|
+
files: ['*.ts', '*.tsx'],
|
|
11
|
+
plugins: {
|
|
12
|
+
'stylestic': StylisticPlugin,
|
|
13
|
+
'@typescript-eslint': TypescriptEslintPlugin
|
|
14
|
+
},
|
|
15
|
+
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'],
|
|
16
|
+
parserOptions: {},
|
|
17
|
+
rules: {
|
|
18
|
+
// this is a bit buggy at the moment
|
|
19
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
20
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
allowExpressions: false,
|
|
24
|
+
allowTypedFunctionExpressions: true,
|
|
25
|
+
allowHigherOrderFunctions: true,
|
|
26
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
27
|
+
allowConciseArrowFunctionExpressionsStartingWithVoid: false
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
31
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
32
|
+
'error',
|
|
33
|
+
{
|
|
34
|
+
accessibility: 'explicit',
|
|
35
|
+
overrides: {
|
|
36
|
+
accessors: 'off',
|
|
37
|
+
constructors: 'no-public',
|
|
38
|
+
methods: 'explicit',
|
|
39
|
+
properties: 'off',
|
|
40
|
+
parameterProperties: 'off'
|
|
59
41
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
45
|
+
'@typescript-eslint/member-ordering': [
|
|
46
|
+
'warn',
|
|
47
|
+
{
|
|
48
|
+
default: [
|
|
49
|
+
// Index signature
|
|
50
|
+
'signature',
|
|
67
51
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
// Fields
|
|
53
|
+
'public-static-field',
|
|
54
|
+
'protected-static-field',
|
|
55
|
+
'private-static-field',
|
|
72
56
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
57
|
+
'public-instance-field',
|
|
58
|
+
'public-decorated-field',
|
|
59
|
+
'protected-instance-field',
|
|
60
|
+
'protected-decorated-field',
|
|
61
|
+
'private-instance-field',
|
|
62
|
+
'private-decorated-field',
|
|
79
63
|
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
'public-abstract-field',
|
|
65
|
+
'protected-abstract-field',
|
|
82
66
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
67
|
+
'public-field',
|
|
68
|
+
'protected-field',
|
|
69
|
+
'private-field',
|
|
86
70
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
'static-field',
|
|
72
|
+
'instance-field',
|
|
73
|
+
'abstract-field',
|
|
90
74
|
|
|
91
|
-
|
|
75
|
+
'decorated-field',
|
|
92
76
|
|
|
93
|
-
|
|
77
|
+
'field',
|
|
94
78
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
79
|
+
// Constructors
|
|
80
|
+
'public-constructor',
|
|
81
|
+
'protected-constructor',
|
|
82
|
+
'private-constructor',
|
|
99
83
|
|
|
100
|
-
|
|
84
|
+
'constructor',
|
|
101
85
|
|
|
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
|
-
|
|
86
|
+
// Getters
|
|
87
|
+
// 'public-static-get',
|
|
88
|
+
// 'protected-static-get',
|
|
89
|
+
// 'private-static-get',
|
|
90
|
+
//
|
|
91
|
+
// 'public-instance-get',
|
|
92
|
+
// 'public-decorated-get',
|
|
93
|
+
// 'protected-instance-get',
|
|
94
|
+
// 'protected-decorated-get',
|
|
95
|
+
// 'private-instance-get',
|
|
96
|
+
// 'private-decorated-get',
|
|
97
|
+
//
|
|
98
|
+
// 'public-abstract-get',
|
|
99
|
+
// 'protected-abstract-get',
|
|
100
|
+
// 'private-abstract-get',
|
|
101
|
+
//
|
|
102
|
+
// 'public-get',
|
|
103
|
+
// 'protected-get',
|
|
104
|
+
// 'private-get',
|
|
105
|
+
//
|
|
106
|
+
// 'static-get',
|
|
107
|
+
// 'instance-get',
|
|
108
|
+
// 'abstract-get',
|
|
109
|
+
//
|
|
110
|
+
// 'decorated-get',
|
|
127
111
|
|
|
128
|
-
|
|
112
|
+
// 'get',
|
|
129
113
|
|
|
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
|
-
|
|
114
|
+
// Setters
|
|
115
|
+
// 'public-static-set',
|
|
116
|
+
// 'protected-static-set',
|
|
117
|
+
// 'private-static-set',
|
|
118
|
+
//
|
|
119
|
+
// 'public-instance-set',
|
|
120
|
+
// 'public-decorated-set',
|
|
121
|
+
// 'protected-instance-set',
|
|
122
|
+
// 'protected-decorated-set',
|
|
123
|
+
// 'private-instance-set',
|
|
124
|
+
// 'private-decorated-set',
|
|
125
|
+
//
|
|
126
|
+
// 'public-abstract-set',
|
|
127
|
+
// 'protected-abstract-set',
|
|
128
|
+
// 'private-abstract-set',
|
|
129
|
+
//
|
|
130
|
+
// 'public-set',
|
|
131
|
+
// 'protected-set',
|
|
132
|
+
// 'private-set',
|
|
133
|
+
//
|
|
134
|
+
// 'static-set',
|
|
135
|
+
// 'instance-set',
|
|
136
|
+
// 'abstract-set',
|
|
137
|
+
//
|
|
138
|
+
// 'decorated-set',
|
|
155
139
|
|
|
156
|
-
|
|
140
|
+
// 'set',
|
|
157
141
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
142
|
+
// Methods
|
|
143
|
+
// 'public-static-method',
|
|
144
|
+
// 'protected-static-method',
|
|
145
|
+
// 'private-static-method',
|
|
146
|
+
//
|
|
147
|
+
// 'public-instance-method',
|
|
148
|
+
// 'protected-instance-method',
|
|
149
|
+
// 'private-instance-method',
|
|
150
|
+
'static-method',
|
|
167
151
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
152
|
+
'public-method',
|
|
153
|
+
// 'public-decorated-method',
|
|
154
|
+
'protected-method',
|
|
155
|
+
// 'protected-decorated-method',
|
|
156
|
+
'private-method',
|
|
157
|
+
// 'private-decorated-method',
|
|
174
158
|
|
|
175
|
-
|
|
176
|
-
|
|
159
|
+
'public-abstract-method',
|
|
160
|
+
'protected-abstract-method',
|
|
177
161
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
162
|
+
// 'instance-method',
|
|
163
|
+
// 'decorated-method',
|
|
164
|
+
'abstract-method',
|
|
181
165
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
166
|
+
'method'
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
171
|
+
camelcase: 'off',
|
|
172
|
+
'@typescript-eslint/naming-convention': [
|
|
173
|
+
'error',
|
|
174
|
+
{
|
|
175
|
+
selector: 'default',
|
|
176
|
+
format: ['camelCase', 'PascalCase']
|
|
177
|
+
},
|
|
194
178
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
179
|
+
{
|
|
180
|
+
selector: 'variable',
|
|
181
|
+
modifiers: ['const'],
|
|
182
|
+
format: ['camelCase', 'UPPER_CASE', 'PascalCase']
|
|
183
|
+
},
|
|
200
184
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
185
|
+
{
|
|
186
|
+
selector: 'variable',
|
|
187
|
+
format: ['camelCase']
|
|
188
|
+
},
|
|
205
189
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
190
|
+
{
|
|
191
|
+
selector: 'function',
|
|
192
|
+
format: ['camelCase', 'PascalCase']
|
|
193
|
+
},
|
|
210
194
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
195
|
+
{
|
|
196
|
+
selector: 'parameter',
|
|
197
|
+
format: ['camelCase', 'PascalCase'],
|
|
198
|
+
modifiers: ['unused'],
|
|
199
|
+
leadingUnderscore: 'require'
|
|
200
|
+
},
|
|
217
201
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
202
|
+
{
|
|
203
|
+
selector: 'parameter',
|
|
204
|
+
format: ['camelCase', 'PascalCase']
|
|
205
|
+
},
|
|
222
206
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
207
|
+
{
|
|
208
|
+
selector: 'property',
|
|
209
|
+
format: ['camelCase', 'UPPER_CASE', 'snake_case']
|
|
210
|
+
},
|
|
227
211
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
212
|
+
{
|
|
213
|
+
selector: 'memberLike',
|
|
214
|
+
modifiers: ['private'],
|
|
215
|
+
format: ['camelCase']
|
|
216
|
+
},
|
|
233
217
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
218
|
+
{
|
|
219
|
+
selector: 'enumMember',
|
|
220
|
+
format: ['UPPER_CASE', 'camelCase']
|
|
221
|
+
},
|
|
238
222
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
'@typescript-eslint/consistent-indexed-object-style': [ 'error', 'record' ],
|
|
273
|
-
'@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
|
|
274
|
-
'@typescript-eslint/consistent-type-definitions': [ 'error', 'interface' ],
|
|
275
|
-
'@typescript-eslint/method-signature-style': [ 'error', 'property' ],
|
|
276
|
-
'@typescript-eslint/no-empty-interface': [
|
|
277
|
-
'error',
|
|
278
|
-
{
|
|
279
|
-
allowSingleExtends: true
|
|
280
|
-
}
|
|
281
|
-
],
|
|
282
|
-
'@typescript-eslint/no-extra-non-null-assertion': [ 'error' ],
|
|
283
|
-
'@typescript-eslint/no-extraneous-class': [
|
|
284
|
-
'error',
|
|
285
|
-
{
|
|
286
|
-
allowConstructorOnly: true,
|
|
287
|
-
allowEmpty: false,
|
|
288
|
-
allowStaticOnly: true,
|
|
289
|
-
allowWithDecorator: true
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
'@typescript-eslint/no-inferrable-types': 'error',
|
|
293
|
-
'@typescript-eslint/no-misused-new': 'error',
|
|
294
|
-
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
295
|
-
'keyword-spacing': 'off',
|
|
296
|
-
'@typescript-eslint/keyword-spacing': [ 'error' ],
|
|
297
|
-
'lines-between-class-members': 'off',
|
|
298
|
-
'@typescript-eslint/lines-between-class-members': [ 'off' ],
|
|
299
|
-
'padding-line-between-statements': 'off',
|
|
300
|
-
'@typescript-eslint/padding-line-between-statements': [
|
|
301
|
-
'error',
|
|
302
|
-
{
|
|
303
|
-
blankLine: 'always',
|
|
304
|
-
prev: '*',
|
|
305
|
-
next: 'return'
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
blankLine: 'always',
|
|
309
|
-
prev: [ 'const', 'let', 'var' ],
|
|
310
|
-
next: '*'
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
blankLine: 'any',
|
|
314
|
-
prev: [ 'const', 'let', 'var' ],
|
|
315
|
-
next: [ 'const', 'let', 'var' ]
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
blankLine: 'always',
|
|
319
|
-
prev: [ 'case', 'default' ],
|
|
320
|
-
next: '*'
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
blankLine: 'always',
|
|
324
|
-
prev: '*',
|
|
325
|
-
next: [ 'interface', 'type' ]
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
blankLine: 'always',
|
|
329
|
-
prev: '*',
|
|
330
|
-
next: [ 'function', 'if', 'try', 'break', 'class', 'for', 'while', 'do' ]
|
|
331
|
-
}
|
|
332
|
-
]
|
|
333
|
-
}
|
|
223
|
+
{
|
|
224
|
+
selector: 'typeLike',
|
|
225
|
+
format: ['PascalCase']
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
'@typescript-eslint/prefer-for-of': 'warn',
|
|
229
|
+
'@typescript-eslint/prefer-function-type': 'error',
|
|
230
|
+
'@typescript-eslint/unified-signatures': 'error',
|
|
231
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
232
|
+
'@typescript-eslint/array-type': ['error', { default: 'array' } ],
|
|
233
|
+
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
|
|
234
|
+
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
|
|
235
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
236
|
+
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
237
|
+
'@typescript-eslint/no-empty-object-type': [
|
|
238
|
+
'error',
|
|
239
|
+
{
|
|
240
|
+
allowInterfaces: 'with-single-extends'
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
'@typescript-eslint/no-extra-non-null-assertion': ['error'],
|
|
244
|
+
'@typescript-eslint/no-extraneous-class': [
|
|
245
|
+
'error',
|
|
246
|
+
{
|
|
247
|
+
allowConstructorOnly: true,
|
|
248
|
+
allowEmpty: false,
|
|
249
|
+
allowStaticOnly: true,
|
|
250
|
+
allowWithDecorator: true
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
'@typescript-eslint/no-inferrable-types': 'error',
|
|
254
|
+
'@typescript-eslint/no-misused-new': 'error',
|
|
255
|
+
'@typescript-eslint/prefer-enum-initializers': 'error'
|
|
334
256
|
}
|
|
335
|
-
|
|
336
|
-
|
|
257
|
+
}
|
|
258
|
+
]
|
package/utils.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const { ALL_KNOWN_JAVASCRIPT_FILE_EXTENSIONS } = require('./constants')
|
|
1
|
+
import { loadTsConfig } from 'load-tsconfig'
|
|
2
|
+
import ImportPlugin from 'eslint-plugin-import'
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* @param {{ paths?: string[] tsconfig?: string, tsconfigDir?: string}} options
|
|
5
|
+
* @param {{ paths?: string[], tsconfig?: string, tsconfigDir?: string}} options
|
|
7
6
|
* @returns {import("eslint").Linter.Config['rules']}
|
|
8
7
|
*/
|
|
9
|
-
function generateImportGroups
|
|
10
|
-
const defaults = [
|
|
8
|
+
export function generateImportGroups(options) {
|
|
9
|
+
const defaults = ['@cenk1cenk2', '@cenk1cenk2-*']
|
|
11
10
|
|
|
12
|
-
options.paths = Array.isArray(options.paths) ? [
|
|
11
|
+
options.paths = Array.isArray(options.paths) ? [...options.paths, ...defaults] : defaults
|
|
13
12
|
|
|
14
13
|
/** @type {string[]} */
|
|
15
14
|
let tsConfigPaths = []
|
|
@@ -55,10 +54,10 @@ function generateImportGroups (options) {
|
|
|
55
54
|
]
|
|
56
55
|
}, [])
|
|
57
56
|
],
|
|
58
|
-
pathGroupsExcludedImportTypes: [
|
|
57
|
+
pathGroupsExcludedImportTypes: ['builtin'],
|
|
59
58
|
groups: [
|
|
60
|
-
[
|
|
61
|
-
[
|
|
59
|
+
['builtin', 'external'],
|
|
60
|
+
['index', 'parent', 'sibling']
|
|
62
61
|
],
|
|
63
62
|
'newlines-between': 'always',
|
|
64
63
|
alphabetize: {
|
|
@@ -71,17 +70,16 @@ function generateImportGroups (options) {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
|
-
* @param {{ paths?: string[] tsconfig?: string, tsconfigDir?: string}} options
|
|
75
|
-
* @returns {import("eslint").Linter.
|
|
73
|
+
* @param {{ paths?: string[], tsconfig?: string, tsconfigDir?: string}} options
|
|
74
|
+
* @returns {import("eslint").Linter.Config[]}
|
|
76
75
|
*/
|
|
77
|
-
function generateImportGroupsWithOverride
|
|
76
|
+
export function generateImportGroupsWithOverride(options) {
|
|
78
77
|
return [
|
|
79
78
|
{
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
plugins: {
|
|
80
|
+
import: ImportPlugin
|
|
81
|
+
},
|
|
82
82
|
rules: generateImportGroups(options)
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
module.exports = { generateImportGroups, generateImportGroupsWithOverride }
|
package/vue-typescript.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.Config} */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
2
|
+
export default [
|
|
3
|
+
{
|
|
4
|
+
files: ['*.vue'],
|
|
5
|
+
extends: ['./index', '@nuxtjs/eslint-config-typescript/index'],
|
|
6
|
+
rules: {}
|
|
7
|
+
}
|
|
8
|
+
]
|