@krivega/eslint-config 1.0.20 → 1.1.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/CHANGELOG.md +14 -0
- package/index.js +23 -27
- package/index.ts +24 -28
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [1.1.0](/compare/v1.0.21...v1.1.0) (2025-11-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add new request and response flags to configuration aafb821
|
|
9
|
+
|
|
10
|
+
## [1.0.21](/compare/v1.0.20...v1.0.21) (2025-11-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* update linter configuration to include additional test and mock directories, adjust rules, and clean up deprecated settings c314e5a
|
|
16
|
+
|
|
3
17
|
## [1.0.20](/compare/v1.0.19...v1.0.20) (2025-11-27)
|
|
4
18
|
|
|
5
19
|
## [1.0.19](/compare/v1.0.18...v1.0.19) (2025-11-27)
|
package/index.js
CHANGED
|
@@ -146,6 +146,12 @@ const config = [
|
|
|
146
146
|
'src/testUtils.{ts,tsx,js,jsx}',
|
|
147
147
|
'src/testUtils/**',
|
|
148
148
|
'src/mocks/**',
|
|
149
|
+
'tests/**',
|
|
150
|
+
'test/**',
|
|
151
|
+
'mocks/**',
|
|
152
|
+
'__mocks__/**',
|
|
153
|
+
'fixtures/**',
|
|
154
|
+
'__fixtures__/**',
|
|
149
155
|
'**/__tests__/**/*.{ts,tsx,js,jsx}',
|
|
150
156
|
'**/*.test.{ts,tsx,js,jsx}',
|
|
151
157
|
'**/*.spec.{ts,tsx,js,jsx}',
|
|
@@ -155,6 +161,8 @@ const config = [
|
|
|
155
161
|
// configs and linters
|
|
156
162
|
'**/*.config.{ts,js}',
|
|
157
163
|
'eslint.config.{ts,js}',
|
|
164
|
+
'.release-it.{ts,js}',
|
|
165
|
+
'dangerfile.{ts,js}',
|
|
158
166
|
// tooling and scripts
|
|
159
167
|
'vite.*.{ts,js}',
|
|
160
168
|
'scripts/**',
|
|
@@ -190,6 +198,10 @@ const config = [
|
|
|
190
198
|
Dev: true,
|
|
191
199
|
ref: true,
|
|
192
200
|
Ref: true,
|
|
201
|
+
req: true,
|
|
202
|
+
Req: true,
|
|
203
|
+
res: true,
|
|
204
|
+
Res: true,
|
|
193
205
|
},
|
|
194
206
|
},
|
|
195
207
|
],
|
|
@@ -209,6 +221,7 @@ const config = [
|
|
|
209
221
|
ignoreArrowShorthand: true,
|
|
210
222
|
},
|
|
211
223
|
],
|
|
224
|
+
'no-use-before-define': 'off',
|
|
212
225
|
'@typescript-eslint/no-use-before-define': [
|
|
213
226
|
'error',
|
|
214
227
|
{
|
|
@@ -256,6 +269,7 @@ const config = [
|
|
|
256
269
|
'@typescript-eslint/no-loss-of-precision': ['error'],
|
|
257
270
|
'@typescript-eslint/no-loop-func': ['error'],
|
|
258
271
|
'@typescript-eslint/no-redeclare': ['error'],
|
|
272
|
+
'no-shadow': 'off',
|
|
259
273
|
'@typescript-eslint/no-shadow': ['error'],
|
|
260
274
|
'@typescript-eslint/only-throw-error': 'error',
|
|
261
275
|
'@typescript-eslint/no-unused-expressions': [
|
|
@@ -289,7 +303,6 @@ const config = [
|
|
|
289
303
|
tsx: 'never',
|
|
290
304
|
},
|
|
291
305
|
],
|
|
292
|
-
strict: ['error', 'never'],
|
|
293
306
|
'import/export': ['error'],
|
|
294
307
|
'import/no-unresolved': ['error'],
|
|
295
308
|
'import/no-named-as-default': ['error'],
|
|
@@ -308,7 +321,7 @@ const config = [
|
|
|
308
321
|
// value imports aliases
|
|
309
322
|
{ pattern: '@/**', group: 'internal', position: 'before' },
|
|
310
323
|
{ pattern: '~/**', group: 'internal', position: 'before' },
|
|
311
|
-
{ pattern: '#**', group: 'internal', position: 'before' }
|
|
324
|
+
{ pattern: '#**', group: 'internal', position: 'before' },
|
|
312
325
|
],
|
|
313
326
|
pathGroupsExcludedImportTypes: ['builtin', 'external'],
|
|
314
327
|
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
@@ -321,15 +334,6 @@ const config = [
|
|
|
321
334
|
'import/no-webpack-loader-syntax': ['error'],
|
|
322
335
|
'import/no-named-default': ['error'],
|
|
323
336
|
'import/no-self-import': ['error'],
|
|
324
|
-
'import/no-cycle': [
|
|
325
|
-
'error',
|
|
326
|
-
{
|
|
327
|
-
maxDepth: Infinity,
|
|
328
|
-
ignoreExternal: false,
|
|
329
|
-
allowUnsafeDynamicCyclicDependency: false,
|
|
330
|
-
disableScc: false,
|
|
331
|
-
},
|
|
332
|
-
],
|
|
333
337
|
'import/no-useless-path-segments': [
|
|
334
338
|
'error',
|
|
335
339
|
{
|
|
@@ -394,7 +398,6 @@ const config = [
|
|
|
394
398
|
],
|
|
395
399
|
'prefer-numeric-literals': ['error'],
|
|
396
400
|
'prefer-rest-params': ['error'],
|
|
397
|
-
'prefer-spread': ['error'],
|
|
398
401
|
'prefer-template': ['error'],
|
|
399
402
|
'require-yield': ['error'],
|
|
400
403
|
'symbol-description': ['error'],
|
|
@@ -795,6 +798,7 @@ const config = [
|
|
|
795
798
|
'unicorn/prefer-regexp-test': ['error'],
|
|
796
799
|
'unicorn/prefer-set-has': ['error'],
|
|
797
800
|
'unicorn/prefer-set-size': ['error'],
|
|
801
|
+
'prefer-spread': 'off',
|
|
798
802
|
'unicorn/prefer-spread': ['error'],
|
|
799
803
|
'unicorn/prefer-string-raw': ['error'],
|
|
800
804
|
'unicorn/prefer-string-replace-all': ['error'],
|
|
@@ -873,7 +877,7 @@ const config = [
|
|
|
873
877
|
'@typescript-eslint/no-unsafe-assignment': ['error'],
|
|
874
878
|
'@typescript-eslint/no-unsafe-call': ['error'],
|
|
875
879
|
'@typescript-eslint/no-unsafe-declaration-merging': ['error'],
|
|
876
|
-
'@typescript-eslint/no-unsafe-enum-comparison': ['error'],
|
|
880
|
+
// '@typescript-eslint/no-unsafe-enum-comparison': ['error'], // TODO: remove this rule
|
|
877
881
|
'@typescript-eslint/no-unsafe-member-access': ['error'],
|
|
878
882
|
'@typescript-eslint/no-unsafe-return': ['error'],
|
|
879
883
|
'@typescript-eslint/no-unsafe-unary-minus': ['error'],
|
|
@@ -891,9 +895,12 @@ const config = [
|
|
|
891
895
|
'@typescript-eslint/prefer-namespace-keyword': ['error'],
|
|
892
896
|
'@typescript-eslint/prefer-nullish-coalescing': ['error'],
|
|
893
897
|
'@typescript-eslint/prefer-optional-chain': ['error'],
|
|
894
|
-
'@typescript-eslint/prefer-promise-reject-errors': [
|
|
898
|
+
'@typescript-eslint/prefer-promise-reject-errors': [
|
|
899
|
+
'error',
|
|
900
|
+
{
|
|
895
901
|
allowEmptyReject: true,
|
|
896
|
-
}
|
|
902
|
+
},
|
|
903
|
+
],
|
|
897
904
|
'@typescript-eslint/prefer-readonly': ['error'],
|
|
898
905
|
'@typescript-eslint/prefer-reduce-type-parameter': ['error'],
|
|
899
906
|
'@typescript-eslint/prefer-regexp-exec': ['error'],
|
|
@@ -903,6 +910,7 @@ const config = [
|
|
|
903
910
|
'@typescript-eslint/require-array-sort-compare': ['error'],
|
|
904
911
|
'@typescript-eslint/restrict-plus-operands': ['error'],
|
|
905
912
|
'@typescript-eslint/restrict-template-expressions': ['error'],
|
|
913
|
+
strict: ['error', 'never'],
|
|
906
914
|
'@typescript-eslint/strict-boolean-expressions': ['error'],
|
|
907
915
|
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
|
|
908
916
|
'@typescript-eslint/triple-slash-reference': ['error'],
|
|
@@ -968,18 +976,6 @@ const config = [
|
|
|
968
976
|
'@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
|
969
977
|
'@stylistic/keyword-spacing': ['error', { before: true, after: true }],
|
|
970
978
|
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
971
|
-
'@stylistic/max-len': [
|
|
972
|
-
'error',
|
|
973
|
-
{
|
|
974
|
-
code: 100,
|
|
975
|
-
tabWidth: 2,
|
|
976
|
-
ignoreUrls: true,
|
|
977
|
-
ignoreComments: false,
|
|
978
|
-
ignoreRegExpLiterals: true,
|
|
979
|
-
ignoreStrings: true,
|
|
980
|
-
ignoreTemplateLiterals: true,
|
|
981
|
-
},
|
|
982
|
-
],
|
|
983
979
|
'@stylistic/max-statements-per-line': ['error', { max: 1 }],
|
|
984
980
|
'@stylistic/new-parens': ['error'],
|
|
985
981
|
'@stylistic/no-mixed-spaces-and-tabs': ['error'],
|
package/index.ts
CHANGED
|
@@ -149,6 +149,12 @@ const config: Linter.Config[] = [
|
|
|
149
149
|
'src/testUtils.{ts,tsx,js,jsx}',
|
|
150
150
|
'src/testUtils/**',
|
|
151
151
|
'src/mocks/**',
|
|
152
|
+
'tests/**',
|
|
153
|
+
'test/**',
|
|
154
|
+
'mocks/**',
|
|
155
|
+
'__mocks__/**',
|
|
156
|
+
'fixtures/**',
|
|
157
|
+
'__fixtures__/**',
|
|
152
158
|
'**/__tests__/**/*.{ts,tsx,js,jsx}',
|
|
153
159
|
'**/*.test.{ts,tsx,js,jsx}',
|
|
154
160
|
'**/*.spec.{ts,tsx,js,jsx}',
|
|
@@ -158,6 +164,8 @@ const config: Linter.Config[] = [
|
|
|
158
164
|
// configs and linters
|
|
159
165
|
'**/*.config.{ts,js}',
|
|
160
166
|
'eslint.config.{ts,js}',
|
|
167
|
+
'.release-it.{ts,js}',
|
|
168
|
+
'dangerfile.{ts,js}',
|
|
161
169
|
// tooling and scripts
|
|
162
170
|
'vite.*.{ts,js}',
|
|
163
171
|
'scripts/**',
|
|
@@ -193,6 +201,10 @@ const config: Linter.Config[] = [
|
|
|
193
201
|
Dev: true,
|
|
194
202
|
ref: true,
|
|
195
203
|
Ref: true,
|
|
204
|
+
req: true,
|
|
205
|
+
Req: true,
|
|
206
|
+
res: true,
|
|
207
|
+
Res: true,
|
|
196
208
|
},
|
|
197
209
|
},
|
|
198
210
|
],
|
|
@@ -212,6 +224,7 @@ const config: Linter.Config[] = [
|
|
|
212
224
|
ignoreArrowShorthand: true,
|
|
213
225
|
},
|
|
214
226
|
],
|
|
227
|
+
'no-use-before-define': 'off',
|
|
215
228
|
'@typescript-eslint/no-use-before-define': [
|
|
216
229
|
'error',
|
|
217
230
|
{
|
|
@@ -259,6 +272,7 @@ const config: Linter.Config[] = [
|
|
|
259
272
|
'@typescript-eslint/no-loss-of-precision': ['error'],
|
|
260
273
|
'@typescript-eslint/no-loop-func': ['error'],
|
|
261
274
|
'@typescript-eslint/no-redeclare': ['error'],
|
|
275
|
+
'no-shadow': 'off',
|
|
262
276
|
'@typescript-eslint/no-shadow': ['error'],
|
|
263
277
|
'@typescript-eslint/only-throw-error': 'error',
|
|
264
278
|
'@typescript-eslint/no-unused-expressions': [
|
|
@@ -292,7 +306,6 @@ const config: Linter.Config[] = [
|
|
|
292
306
|
tsx: 'never',
|
|
293
307
|
},
|
|
294
308
|
],
|
|
295
|
-
strict: ['error', 'never'],
|
|
296
309
|
'import/export': ['error'],
|
|
297
310
|
'import/no-unresolved': ['error'],
|
|
298
311
|
'import/no-named-as-default': ['error'],
|
|
@@ -311,7 +324,7 @@ const config: Linter.Config[] = [
|
|
|
311
324
|
// value imports aliases
|
|
312
325
|
{ pattern: '@/**', group: 'internal', position: 'before' },
|
|
313
326
|
{ pattern: '~/**', group: 'internal', position: 'before' },
|
|
314
|
-
{ pattern: '#**', group: 'internal', position: 'before' }
|
|
327
|
+
{ pattern: '#**', group: 'internal', position: 'before' },
|
|
315
328
|
],
|
|
316
329
|
pathGroupsExcludedImportTypes: ['builtin', 'external'],
|
|
317
330
|
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
@@ -324,15 +337,6 @@ const config: Linter.Config[] = [
|
|
|
324
337
|
'import/no-webpack-loader-syntax': ['error'],
|
|
325
338
|
'import/no-named-default': ['error'],
|
|
326
339
|
'import/no-self-import': ['error'],
|
|
327
|
-
'import/no-cycle': [
|
|
328
|
-
'error',
|
|
329
|
-
{
|
|
330
|
-
maxDepth: Infinity,
|
|
331
|
-
ignoreExternal: false,
|
|
332
|
-
allowUnsafeDynamicCyclicDependency: false,
|
|
333
|
-
disableScc: false,
|
|
334
|
-
},
|
|
335
|
-
],
|
|
336
340
|
'import/no-useless-path-segments': [
|
|
337
341
|
'error',
|
|
338
342
|
{
|
|
@@ -397,7 +401,6 @@ const config: Linter.Config[] = [
|
|
|
397
401
|
],
|
|
398
402
|
'prefer-numeric-literals': ['error'],
|
|
399
403
|
'prefer-rest-params': ['error'],
|
|
400
|
-
'prefer-spread': ['error'],
|
|
401
404
|
'prefer-template': ['error'],
|
|
402
405
|
'require-yield': ['error'],
|
|
403
406
|
'symbol-description': ['error'],
|
|
@@ -801,6 +804,7 @@ const config: Linter.Config[] = [
|
|
|
801
804
|
'unicorn/prefer-regexp-test': ['error'],
|
|
802
805
|
'unicorn/prefer-set-has': ['error'],
|
|
803
806
|
'unicorn/prefer-set-size': ['error'],
|
|
807
|
+
'prefer-spread': 'off',
|
|
804
808
|
'unicorn/prefer-spread': ['error'],
|
|
805
809
|
'unicorn/prefer-string-raw': ['error'],
|
|
806
810
|
'unicorn/prefer-string-replace-all': ['error'],
|
|
@@ -879,7 +883,7 @@ const config: Linter.Config[] = [
|
|
|
879
883
|
'@typescript-eslint/no-unsafe-assignment': ['error'],
|
|
880
884
|
'@typescript-eslint/no-unsafe-call': ['error'],
|
|
881
885
|
'@typescript-eslint/no-unsafe-declaration-merging': ['error'],
|
|
882
|
-
'@typescript-eslint/no-unsafe-enum-comparison': ['error'],
|
|
886
|
+
// '@typescript-eslint/no-unsafe-enum-comparison': ['error'], // TODO: remove this rule
|
|
883
887
|
'@typescript-eslint/no-unsafe-member-access': ['error'],
|
|
884
888
|
'@typescript-eslint/no-unsafe-return': ['error'],
|
|
885
889
|
'@typescript-eslint/no-unsafe-unary-minus': ['error'],
|
|
@@ -897,9 +901,12 @@ const config: Linter.Config[] = [
|
|
|
897
901
|
'@typescript-eslint/prefer-namespace-keyword': ['error'],
|
|
898
902
|
'@typescript-eslint/prefer-nullish-coalescing': ['error'],
|
|
899
903
|
'@typescript-eslint/prefer-optional-chain': ['error'],
|
|
900
|
-
'@typescript-eslint/prefer-promise-reject-errors': [
|
|
901
|
-
|
|
902
|
-
|
|
904
|
+
'@typescript-eslint/prefer-promise-reject-errors': [
|
|
905
|
+
'error',
|
|
906
|
+
{
|
|
907
|
+
allowEmptyReject: true,
|
|
908
|
+
},
|
|
909
|
+
],
|
|
903
910
|
'@typescript-eslint/prefer-readonly': ['error'],
|
|
904
911
|
'@typescript-eslint/prefer-reduce-type-parameter': ['error'],
|
|
905
912
|
'@typescript-eslint/prefer-regexp-exec': ['error'],
|
|
@@ -909,6 +916,7 @@ const config: Linter.Config[] = [
|
|
|
909
916
|
'@typescript-eslint/require-array-sort-compare': ['error'],
|
|
910
917
|
'@typescript-eslint/restrict-plus-operands': ['error'],
|
|
911
918
|
'@typescript-eslint/restrict-template-expressions': ['error'],
|
|
919
|
+
strict: ['error', 'never'],
|
|
912
920
|
'@typescript-eslint/strict-boolean-expressions': ['error'],
|
|
913
921
|
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
|
|
914
922
|
'@typescript-eslint/triple-slash-reference': ['error'],
|
|
@@ -974,18 +982,6 @@ const config: Linter.Config[] = [
|
|
|
974
982
|
'@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
|
975
983
|
'@stylistic/keyword-spacing': ['error', { before: true, after: true }],
|
|
976
984
|
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
977
|
-
'@stylistic/max-len': [
|
|
978
|
-
'error',
|
|
979
|
-
{
|
|
980
|
-
code: 100,
|
|
981
|
-
tabWidth: 2,
|
|
982
|
-
ignoreUrls: true,
|
|
983
|
-
ignoreComments: false,
|
|
984
|
-
ignoreRegExpLiterals: true,
|
|
985
|
-
ignoreStrings: true,
|
|
986
|
-
ignoreTemplateLiterals: true,
|
|
987
|
-
},
|
|
988
|
-
],
|
|
989
985
|
'@stylistic/max-statements-per-line': ['error', { max: 1 }],
|
|
990
986
|
'@stylistic/new-parens': ['error'],
|
|
991
987
|
'@stylistic/no-mixed-spaces-and-tabs': ['error'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krivega/eslint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/Krivega/eslint-config/issues"
|
|
6
6
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"lint:src": "yarn lint:ts",
|
|
30
30
|
"lint:ts": "tsc --noEmit --project tsconfig.json",
|
|
31
31
|
"prepublishOnly": "yarn build",
|
|
32
|
-
"release": "release-it",
|
|
32
|
+
"release": "release-it --only-version",
|
|
33
33
|
"run:postinstall": "yarn --cwd ./example install && yarn --cwd ./exampleReact install"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@commitlint/cli": "^20.1.0",
|
|
58
58
|
"@commitlint/config-conventional": "^20.0.0",
|
|
59
59
|
"@release-it/conventional-changelog": "^10.0.2",
|
|
60
|
-
"prettier": "^3.7.
|
|
60
|
+
"prettier": "^3.7.3",
|
|
61
61
|
"release-it": "^19.0.6"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|