@cenk1cenk2/eslint-config 2.2.0 → 2.2.4
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/CHANGELOG.md +28 -0
- package/index.js +11 -1
- package/package.json +1 -1
- package/typescript-dynamic.js +8 -9
- package/typescript.js +90 -65
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [2.2.4](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.3...v2.2.4) (2022-01-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* finalize configuration ([7e2151b](https://github.com/cenk1cenk2/eslint-config/commit/7e2151b17b9135257cc642401d0201b71e598023))
|
|
7
|
+
|
|
8
|
+
## [2.2.3](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.2...v2.2.3) (2022-01-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* move to dynamic ([84491e0](https://github.com/cenk1cenk2/eslint-config/commit/84491e0376487ed9730772d6cfdeceb5f3b5e210))
|
|
14
|
+
|
|
15
|
+
## [2.2.2](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.1...v2.2.2) (2022-01-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* move dotnotation to dynamic ([9947c13](https://github.com/cenk1cenk2/eslint-config/commit/9947c13c493b85d5043cc45dfdfa510cb717eeee))
|
|
21
|
+
|
|
22
|
+
## [2.2.1](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.0...v2.2.1) (2022-01-30)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* issue with typescript rule ([bbcade0](https://github.com/cenk1cenk2/eslint-config/commit/bbcade03a7772bee5b4edb0326ccc1541a485d44))
|
|
28
|
+
|
|
1
29
|
# [2.2.0](https://github.com/cenk1cenk2/eslint-config/compare/v2.1.0...v2.2.0) (2022-01-30)
|
|
2
30
|
|
|
3
31
|
|
package/index.js
CHANGED
|
@@ -107,7 +107,7 @@ module.exports = {
|
|
|
107
107
|
'valid-typeof': 'warn',
|
|
108
108
|
'arrow-parens': [ 'error', 'always' ],
|
|
109
109
|
'keyword-spacing': 'error',
|
|
110
|
-
'lines-between-class-members': '
|
|
110
|
+
'lines-between-class-members': 'off',
|
|
111
111
|
'padding-line-between-statements': [
|
|
112
112
|
'error',
|
|
113
113
|
{
|
|
@@ -120,10 +120,20 @@ module.exports = {
|
|
|
120
120
|
prev: [ 'const', 'let', 'var' ],
|
|
121
121
|
next: '*'
|
|
122
122
|
},
|
|
123
|
+
{
|
|
124
|
+
blankLine: 'any',
|
|
125
|
+
prev: [ 'const', 'let', 'var' ],
|
|
126
|
+
next: [ 'const', 'let', 'var' ]
|
|
127
|
+
},
|
|
123
128
|
{
|
|
124
129
|
blankLine: 'always',
|
|
125
130
|
prev: [ 'case', 'default' ],
|
|
126
131
|
next: '*'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
blankLine: 'always',
|
|
135
|
+
prev: '*',
|
|
136
|
+
next: [ 'function', 'if', 'try', 'break', 'class', 'for', 'while', 'do' ]
|
|
127
137
|
}
|
|
128
138
|
]
|
|
129
139
|
}
|
package/package.json
CHANGED
package/typescript-dynamic.js
CHANGED
|
@@ -6,20 +6,19 @@ module.exports = {
|
|
|
6
6
|
files: [ '*.ts', '*.tsx' ],
|
|
7
7
|
parserOptions: {
|
|
8
8
|
ecmaVersion: 'latest',
|
|
9
|
-
sourceType: 'module'
|
|
9
|
+
sourceType: 'module',
|
|
10
|
+
project: 'tsconfig.json'
|
|
10
11
|
},
|
|
11
12
|
rules: {
|
|
12
13
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
13
14
|
'@typescript-eslint/return-await': [ 'error', 'never' ],
|
|
14
15
|
'@typescript-eslint/await-thenable': 'error',
|
|
15
|
-
'
|
|
16
|
-
'@typescript-eslint/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
]
|
|
16
|
+
'dot-notation': 'off',
|
|
17
|
+
'@typescript-eslint/dot-notation': [ 'error' ],
|
|
18
|
+
'no-throw-literal': 'off',
|
|
19
|
+
'@typescript-eslint/no-throw-literal': [ 'error' ],
|
|
20
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
21
|
+
'@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: false } ]
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
]
|
package/typescript.js
CHANGED
|
@@ -26,9 +26,16 @@ module.exports = {
|
|
|
26
26
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
27
27
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
28
28
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
29
|
-
'
|
|
29
|
+
'error',
|
|
30
30
|
{
|
|
31
|
-
accessibility: 'explicit'
|
|
31
|
+
accessibility: 'explicit',
|
|
32
|
+
overrides: {
|
|
33
|
+
accessors: 'off',
|
|
34
|
+
constructors: 'no-public',
|
|
35
|
+
methods: 'explicit',
|
|
36
|
+
properties: 'off',
|
|
37
|
+
parameterProperties: 'off'
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
],
|
|
34
41
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
@@ -41,7 +48,7 @@ module.exports = {
|
|
|
41
48
|
},
|
|
42
49
|
singleline: {
|
|
43
50
|
delimiter: 'comma',
|
|
44
|
-
requireLast:
|
|
51
|
+
requireLast: false
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
54
|
],
|
|
@@ -97,60 +104,60 @@ module.exports = {
|
|
|
97
104
|
'constructor',
|
|
98
105
|
|
|
99
106
|
// Getters
|
|
100
|
-
'public-static-get',
|
|
101
|
-
'protected-static-get',
|
|
102
|
-
'private-static-get',
|
|
103
|
-
|
|
104
|
-
'public-instance-get',
|
|
105
|
-
'public-decorated-get',
|
|
106
|
-
'protected-instance-get',
|
|
107
|
-
'protected-decorated-get',
|
|
108
|
-
'private-instance-get',
|
|
109
|
-
'private-decorated-get',
|
|
110
|
-
|
|
111
|
-
'public-abstract-get',
|
|
112
|
-
'protected-abstract-get',
|
|
113
|
-
'private-abstract-get',
|
|
114
|
-
|
|
115
|
-
'public-get',
|
|
116
|
-
'protected-get',
|
|
117
|
-
'private-get',
|
|
118
|
-
|
|
119
|
-
'static-get',
|
|
120
|
-
'instance-get',
|
|
121
|
-
'abstract-get',
|
|
122
|
-
|
|
123
|
-
'decorated-get',
|
|
124
|
-
|
|
125
|
-
'get',
|
|
107
|
+
// 'public-static-get',
|
|
108
|
+
// 'protected-static-get',
|
|
109
|
+
// 'private-static-get',
|
|
110
|
+
//
|
|
111
|
+
// 'public-instance-get',
|
|
112
|
+
// 'public-decorated-get',
|
|
113
|
+
// 'protected-instance-get',
|
|
114
|
+
// 'protected-decorated-get',
|
|
115
|
+
// 'private-instance-get',
|
|
116
|
+
// 'private-decorated-get',
|
|
117
|
+
//
|
|
118
|
+
// 'public-abstract-get',
|
|
119
|
+
// 'protected-abstract-get',
|
|
120
|
+
// 'private-abstract-get',
|
|
121
|
+
//
|
|
122
|
+
// 'public-get',
|
|
123
|
+
// 'protected-get',
|
|
124
|
+
// 'private-get',
|
|
125
|
+
//
|
|
126
|
+
// 'static-get',
|
|
127
|
+
// 'instance-get',
|
|
128
|
+
// 'abstract-get',
|
|
129
|
+
//
|
|
130
|
+
// 'decorated-get',
|
|
131
|
+
|
|
132
|
+
// 'get',
|
|
126
133
|
|
|
127
134
|
// Setters
|
|
128
|
-
'public-static-set',
|
|
129
|
-
'protected-static-set',
|
|
130
|
-
'private-static-set',
|
|
131
|
-
|
|
132
|
-
'public-instance-set',
|
|
133
|
-
'public-decorated-set',
|
|
134
|
-
'protected-instance-set',
|
|
135
|
-
'protected-decorated-set',
|
|
136
|
-
'private-instance-set',
|
|
137
|
-
'private-decorated-set',
|
|
138
|
-
|
|
139
|
-
'public-abstract-set',
|
|
140
|
-
'protected-abstract-set',
|
|
141
|
-
'private-abstract-set',
|
|
142
|
-
|
|
143
|
-
'public-set',
|
|
144
|
-
'protected-set',
|
|
145
|
-
'private-set',
|
|
146
|
-
|
|
147
|
-
'static-set',
|
|
148
|
-
'instance-set',
|
|
149
|
-
'abstract-set',
|
|
150
|
-
|
|
151
|
-
'decorated-set',
|
|
152
|
-
|
|
153
|
-
'set',
|
|
135
|
+
// 'public-static-set',
|
|
136
|
+
// 'protected-static-set',
|
|
137
|
+
// 'private-static-set',
|
|
138
|
+
//
|
|
139
|
+
// 'public-instance-set',
|
|
140
|
+
// 'public-decorated-set',
|
|
141
|
+
// 'protected-instance-set',
|
|
142
|
+
// 'protected-decorated-set',
|
|
143
|
+
// 'private-instance-set',
|
|
144
|
+
// 'private-decorated-set',
|
|
145
|
+
//
|
|
146
|
+
// 'public-abstract-set',
|
|
147
|
+
// 'protected-abstract-set',
|
|
148
|
+
// 'private-abstract-set',
|
|
149
|
+
//
|
|
150
|
+
// 'public-set',
|
|
151
|
+
// 'protected-set',
|
|
152
|
+
// 'private-set',
|
|
153
|
+
//
|
|
154
|
+
// 'static-set',
|
|
155
|
+
// 'instance-set',
|
|
156
|
+
// 'abstract-set',
|
|
157
|
+
//
|
|
158
|
+
// 'decorated-set',
|
|
159
|
+
|
|
160
|
+
// 'set',
|
|
154
161
|
|
|
155
162
|
// Methods
|
|
156
163
|
'public-static-method',
|
|
@@ -232,6 +239,13 @@ module.exports = {
|
|
|
232
239
|
{
|
|
233
240
|
selector: 'typeLike',
|
|
234
241
|
format: [ 'PascalCase' ]
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
{
|
|
245
|
+
selector: 'parameter',
|
|
246
|
+
format: [ 'camelCase', 'PascalCase' ],
|
|
247
|
+
modifiers: [ 'unused' ],
|
|
248
|
+
leadingUnderscore: 'require'
|
|
235
249
|
}
|
|
236
250
|
],
|
|
237
251
|
'@typescript-eslint/no-parameter-properties': 'off',
|
|
@@ -261,11 +275,17 @@ module.exports = {
|
|
|
261
275
|
'@typescript-eslint/semi': [ 'error', 'never' ],
|
|
262
276
|
'@typescript-eslint/unified-signatures': 'error',
|
|
263
277
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
264
|
-
'@typescript-eslint/array-type': [ 'error', 'array' ],
|
|
278
|
+
'@typescript-eslint/array-type': [ 'error', { default: 'array' } ],
|
|
265
279
|
'@typescript-eslint/consistent-indexed-object-style': [ 'error', 'record' ],
|
|
266
|
-
'@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow
|
|
280
|
+
'@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
|
|
267
281
|
'@typescript-eslint/consistent-type-definitions': [ 'error', 'interface' ],
|
|
268
|
-
'@typescript-eslint/consistent-type-imports': [
|
|
282
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
283
|
+
'error',
|
|
284
|
+
{
|
|
285
|
+
prefer: 'type-imports',
|
|
286
|
+
disallowTypeAnnotations: true
|
|
287
|
+
}
|
|
288
|
+
],
|
|
269
289
|
'@typescript-eslint/method-signature-style': [ 'error', 'property' ],
|
|
270
290
|
'@typescript-eslint/no-empty-interface': [
|
|
271
291
|
'error',
|
|
@@ -286,14 +306,10 @@ module.exports = {
|
|
|
286
306
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
287
307
|
'@typescript-eslint/no-misused-new': 'error',
|
|
288
308
|
'@typescript-eslint/prefer-enum-initializers': 'error',
|
|
289
|
-
'dot-notation': 'off',
|
|
290
|
-
'@typescript-eslint/dot-notation': [ 'error' ],
|
|
291
309
|
'keyword-spacing': 'off',
|
|
292
310
|
'@typescript-eslint/keyword-spacing': [ 'error' ],
|
|
293
311
|
'lines-between-class-members': 'off',
|
|
294
|
-
'@typescript-eslint/lines-between-class-members': [ '
|
|
295
|
-
'no-throw-literal': 'off',
|
|
296
|
-
'@typescript-eslint/no-throw-literal': [ 'error' ],
|
|
312
|
+
'@typescript-eslint/lines-between-class-members': [ 'off' ],
|
|
297
313
|
'padding-line-between-statements': 'off',
|
|
298
314
|
'@typescript-eslint/padding-line-between-statements': [
|
|
299
315
|
'error',
|
|
@@ -307,6 +323,11 @@ module.exports = {
|
|
|
307
323
|
prev: [ 'const', 'let', 'var' ],
|
|
308
324
|
next: '*'
|
|
309
325
|
},
|
|
326
|
+
{
|
|
327
|
+
blankLine: 'any',
|
|
328
|
+
prev: [ 'const', 'let', 'var' ],
|
|
329
|
+
next: [ 'const', 'let', 'var' ]
|
|
330
|
+
},
|
|
310
331
|
{
|
|
311
332
|
blankLine: 'always',
|
|
312
333
|
prev: [ 'case', 'default' ],
|
|
@@ -316,9 +337,13 @@ module.exports = {
|
|
|
316
337
|
blankLine: 'always',
|
|
317
338
|
prev: '*',
|
|
318
339
|
next: [ 'interface', 'type' ]
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
blankLine: 'always',
|
|
343
|
+
prev: '*',
|
|
344
|
+
next: [ 'function', 'if', 'try', 'break', 'class', 'for', 'while', 'do' ]
|
|
319
345
|
}
|
|
320
|
-
]
|
|
321
|
-
'@typescript-eslint/prefer-reduce-type-parameter': 'error'
|
|
346
|
+
]
|
|
322
347
|
}
|
|
323
348
|
}
|
|
324
349
|
]
|