@cenk1cenk2/eslint-config 2.2.3 → 2.3.2
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/import-strict.js +7 -0
- package/import.js +0 -1
- package/index.js +11 -1
- package/package.json +1 -1
- package/typescript-dynamic.js +7 -7
- package/typescript.js +103 -84
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [2.3.2](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.1...v2.3.2) (2022-01-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* move to typed rules ([40b224a](https://github.com/cenk1cenk2/eslint-config/commit/40b224a4cfc710c3e2429be068cc618c96fc62e3))
|
|
7
|
+
|
|
8
|
+
## [2.3.1](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.0...v2.3.1) (2022-01-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update parser options ([9a93803](https://github.com/cenk1cenk2/eslint-config/commit/9a9380359b634cec4882c749cff16410afb91785))
|
|
14
|
+
|
|
15
|
+
# [2.3.0](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.4...v2.3.0) (2022-01-31)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* relax some rules ([c6243e7](https://github.com/cenk1cenk2/eslint-config/commit/c6243e72fd409b7c0d81c5111e166deb2e030c17))
|
|
21
|
+
|
|
22
|
+
## [2.2.4](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.3...v2.2.4) (2022-01-30)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* finalize configuration ([7e2151b](https://github.com/cenk1cenk2/eslint-config/commit/7e2151b17b9135257cc642401d0201b71e598023))
|
|
28
|
+
|
|
1
29
|
## [2.2.3](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.2...v2.2.3) (2022-01-30)
|
|
2
30
|
|
|
3
31
|
|
package/import-strict.js
ADDED
package/import.js
CHANGED
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
|
@@ -5,14 +5,17 @@ module.exports = {
|
|
|
5
5
|
{
|
|
6
6
|
files: [ '*.ts', '*.tsx' ],
|
|
7
7
|
parserOptions: {
|
|
8
|
-
|
|
9
|
-
sourceType: 'module'
|
|
8
|
+
project: 'tsconfig.json'
|
|
10
9
|
},
|
|
11
10
|
rules: {
|
|
12
11
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
13
12
|
'@typescript-eslint/return-await': [ 'error', 'never' ],
|
|
14
13
|
'@typescript-eslint/await-thenable': 'error',
|
|
15
|
-
'
|
|
14
|
+
'dot-notation': 'off',
|
|
15
|
+
'@typescript-eslint/dot-notation': [ 'error' ],
|
|
16
|
+
'no-throw-literal': 'off',
|
|
17
|
+
'@typescript-eslint/no-throw-literal': [ 'error' ],
|
|
18
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
16
19
|
'@typescript-eslint/consistent-type-imports': [
|
|
17
20
|
'error',
|
|
18
21
|
{
|
|
@@ -20,10 +23,7 @@ module.exports = {
|
|
|
20
23
|
disallowTypeAnnotations: true
|
|
21
24
|
}
|
|
22
25
|
],
|
|
23
|
-
'
|
|
24
|
-
'@typescript-eslint/dot-notation': [ 'error' ],
|
|
25
|
-
'no-throw-literal': 'off',
|
|
26
|
-
'@typescript-eslint/no-throw-literal': [ 'error' ]
|
|
26
|
+
'@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: false } ]
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
]
|
package/typescript.js
CHANGED
|
@@ -6,10 +6,7 @@ module.exports = {
|
|
|
6
6
|
files: [ '*.ts', '*.tsx' ],
|
|
7
7
|
plugins: [ '@typescript-eslint' ],
|
|
8
8
|
extends: [ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended' ],
|
|
9
|
-
parserOptions: {
|
|
10
|
-
ecmaVersion: 'esnext',
|
|
11
|
-
sourceType: 'module'
|
|
12
|
-
},
|
|
9
|
+
parserOptions: {},
|
|
13
10
|
rules: {
|
|
14
11
|
// this is a bit buggy at the moment
|
|
15
12
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
@@ -26,9 +23,16 @@ module.exports = {
|
|
|
26
23
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
27
24
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
28
25
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
29
|
-
'
|
|
26
|
+
'error',
|
|
30
27
|
{
|
|
31
|
-
accessibility: 'explicit'
|
|
28
|
+
accessibility: 'explicit',
|
|
29
|
+
overrides: {
|
|
30
|
+
accessors: 'off',
|
|
31
|
+
constructors: 'no-public',
|
|
32
|
+
methods: 'explicit',
|
|
33
|
+
properties: 'off',
|
|
34
|
+
parameterProperties: 'off'
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
],
|
|
34
38
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
@@ -41,7 +45,7 @@ module.exports = {
|
|
|
41
45
|
},
|
|
42
46
|
singleline: {
|
|
43
47
|
delimiter: 'comma',
|
|
44
|
-
requireLast:
|
|
48
|
+
requireLast: false
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
],
|
|
@@ -97,84 +101,84 @@ module.exports = {
|
|
|
97
101
|
'constructor',
|
|
98
102
|
|
|
99
103
|
// 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',
|
|
104
|
+
// 'public-static-get',
|
|
105
|
+
// 'protected-static-get',
|
|
106
|
+
// 'private-static-get',
|
|
107
|
+
//
|
|
108
|
+
// 'public-instance-get',
|
|
109
|
+
// 'public-decorated-get',
|
|
110
|
+
// 'protected-instance-get',
|
|
111
|
+
// 'protected-decorated-get',
|
|
112
|
+
// 'private-instance-get',
|
|
113
|
+
// 'private-decorated-get',
|
|
114
|
+
//
|
|
115
|
+
// 'public-abstract-get',
|
|
116
|
+
// 'protected-abstract-get',
|
|
117
|
+
// 'private-abstract-get',
|
|
118
|
+
//
|
|
119
|
+
// 'public-get',
|
|
120
|
+
// 'protected-get',
|
|
121
|
+
// 'private-get',
|
|
122
|
+
//
|
|
123
|
+
// 'static-get',
|
|
124
|
+
// 'instance-get',
|
|
125
|
+
// 'abstract-get',
|
|
126
|
+
//
|
|
127
|
+
// 'decorated-get',
|
|
128
|
+
|
|
129
|
+
// 'get',
|
|
126
130
|
|
|
127
131
|
// 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',
|
|
132
|
+
// 'public-static-set',
|
|
133
|
+
// 'protected-static-set',
|
|
134
|
+
// 'private-static-set',
|
|
135
|
+
//
|
|
136
|
+
// 'public-instance-set',
|
|
137
|
+
// 'public-decorated-set',
|
|
138
|
+
// 'protected-instance-set',
|
|
139
|
+
// 'protected-decorated-set',
|
|
140
|
+
// 'private-instance-set',
|
|
141
|
+
// 'private-decorated-set',
|
|
142
|
+
//
|
|
143
|
+
// 'public-abstract-set',
|
|
144
|
+
// 'protected-abstract-set',
|
|
145
|
+
// 'private-abstract-set',
|
|
146
|
+
//
|
|
147
|
+
// 'public-set',
|
|
148
|
+
// 'protected-set',
|
|
149
|
+
// 'private-set',
|
|
150
|
+
//
|
|
151
|
+
// 'static-set',
|
|
152
|
+
// 'instance-set',
|
|
153
|
+
// 'abstract-set',
|
|
154
|
+
//
|
|
155
|
+
// 'decorated-set',
|
|
156
|
+
|
|
157
|
+
// 'set',
|
|
154
158
|
|
|
155
159
|
// Methods
|
|
156
|
-
'public-static-method',
|
|
157
|
-
'protected-static-method',
|
|
158
|
-
'private-static-method',
|
|
160
|
+
// 'public-static-method',
|
|
161
|
+
// 'protected-static-method',
|
|
162
|
+
// 'private-static-method',
|
|
163
|
+
//
|
|
164
|
+
// 'public-instance-method',
|
|
165
|
+
// 'protected-instance-method',
|
|
166
|
+
// 'private-instance-method',
|
|
167
|
+
'static-method',
|
|
159
168
|
|
|
160
|
-
'public-
|
|
161
|
-
'
|
|
162
|
-
'
|
|
169
|
+
'public-method',
|
|
170
|
+
// 'public-decorated-method',
|
|
171
|
+
'protected-method',
|
|
172
|
+
// 'protected-decorated-method',
|
|
173
|
+
'private-method',
|
|
174
|
+
// 'private-decorated-method',
|
|
163
175
|
|
|
164
176
|
'public-abstract-method',
|
|
165
177
|
'protected-abstract-method',
|
|
166
178
|
'private-abstract-method',
|
|
167
179
|
|
|
168
|
-
'
|
|
169
|
-
'
|
|
170
|
-
'protected-method',
|
|
171
|
-
'protected-decorated-method',
|
|
172
|
-
'private-method',
|
|
173
|
-
'private-decorated-method',
|
|
174
|
-
|
|
175
|
-
'static-method',
|
|
176
|
-
'instance-method',
|
|
177
|
-
'decorated-method',
|
|
180
|
+
// 'instance-method',
|
|
181
|
+
// 'decorated-method',
|
|
178
182
|
'abstract-method',
|
|
179
183
|
|
|
180
184
|
'method'
|
|
@@ -214,7 +218,7 @@ module.exports = {
|
|
|
214
218
|
|
|
215
219
|
{
|
|
216
220
|
selector: 'property',
|
|
217
|
-
format: [ 'camelCase', 'UPPER_CASE' ]
|
|
221
|
+
format: [ 'camelCase', 'UPPER_CASE', 'snake_case' ]
|
|
218
222
|
},
|
|
219
223
|
|
|
220
224
|
{
|
|
@@ -226,12 +230,19 @@ module.exports = {
|
|
|
226
230
|
|
|
227
231
|
{
|
|
228
232
|
selector: 'enumMember',
|
|
229
|
-
format: [ 'UPPER_CASE' ]
|
|
233
|
+
format: [ 'UPPER_CASE', 'camelCase' ]
|
|
230
234
|
},
|
|
231
235
|
|
|
232
236
|
{
|
|
233
237
|
selector: 'typeLike',
|
|
234
238
|
format: [ 'PascalCase' ]
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
{
|
|
242
|
+
selector: 'parameter',
|
|
243
|
+
format: [ 'camelCase', 'PascalCase' ],
|
|
244
|
+
modifiers: [ 'unused' ],
|
|
245
|
+
leadingUnderscore: 'require'
|
|
235
246
|
}
|
|
236
247
|
],
|
|
237
248
|
'@typescript-eslint/no-parameter-properties': 'off',
|
|
@@ -263,9 +274,8 @@ module.exports = {
|
|
|
263
274
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
264
275
|
'@typescript-eslint/array-type': [ 'error', { default: 'array' } ],
|
|
265
276
|
'@typescript-eslint/consistent-indexed-object-style': [ 'error', 'record' ],
|
|
266
|
-
'@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow
|
|
277
|
+
'@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
|
|
267
278
|
'@typescript-eslint/consistent-type-definitions': [ 'error', 'interface' ],
|
|
268
|
-
'@typescript-eslint/consistent-type-imports': [ 'error', { prefer: 'type-imports' } ],
|
|
269
279
|
'@typescript-eslint/method-signature-style': [ 'error', 'property' ],
|
|
270
280
|
'@typescript-eslint/no-empty-interface': [
|
|
271
281
|
'error',
|
|
@@ -279,8 +289,8 @@ module.exports = {
|
|
|
279
289
|
{
|
|
280
290
|
allowConstructorOnly: true,
|
|
281
291
|
allowEmpty: false,
|
|
282
|
-
allowStaticOnly:
|
|
283
|
-
allowWithDecorator:
|
|
292
|
+
allowStaticOnly: true,
|
|
293
|
+
allowWithDecorator: true
|
|
284
294
|
}
|
|
285
295
|
],
|
|
286
296
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
@@ -289,7 +299,7 @@ module.exports = {
|
|
|
289
299
|
'keyword-spacing': 'off',
|
|
290
300
|
'@typescript-eslint/keyword-spacing': [ 'error' ],
|
|
291
301
|
'lines-between-class-members': 'off',
|
|
292
|
-
'@typescript-eslint/lines-between-class-members': [ '
|
|
302
|
+
'@typescript-eslint/lines-between-class-members': [ 'off' ],
|
|
293
303
|
'padding-line-between-statements': 'off',
|
|
294
304
|
'@typescript-eslint/padding-line-between-statements': [
|
|
295
305
|
'error',
|
|
@@ -303,6 +313,11 @@ module.exports = {
|
|
|
303
313
|
prev: [ 'const', 'let', 'var' ],
|
|
304
314
|
next: '*'
|
|
305
315
|
},
|
|
316
|
+
{
|
|
317
|
+
blankLine: 'any',
|
|
318
|
+
prev: [ 'const', 'let', 'var' ],
|
|
319
|
+
next: [ 'const', 'let', 'var' ]
|
|
320
|
+
},
|
|
306
321
|
{
|
|
307
322
|
blankLine: 'always',
|
|
308
323
|
prev: [ 'case', 'default' ],
|
|
@@ -312,9 +327,13 @@ module.exports = {
|
|
|
312
327
|
blankLine: 'always',
|
|
313
328
|
prev: '*',
|
|
314
329
|
next: [ 'interface', 'type' ]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
blankLine: 'always',
|
|
333
|
+
prev: '*',
|
|
334
|
+
next: [ 'function', 'if', 'try', 'break', 'class', 'for', 'while', 'do' ]
|
|
315
335
|
}
|
|
316
|
-
]
|
|
317
|
-
'@typescript-eslint/prefer-reduce-type-parameter': 'error'
|
|
336
|
+
]
|
|
318
337
|
}
|
|
319
338
|
}
|
|
320
339
|
]
|