@krivega/eslint-config 1.0.20 → 1.0.21

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.21](/compare/v1.0.20...v1.0.21) (2025-11-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update linter configuration to include additional test and mock directories, adjust rules, and clean up deprecated settings c314e5a
9
+
3
10
  ## [1.0.20](/compare/v1.0.19...v1.0.20) (2025-11-27)
4
11
 
5
12
  ## [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/**',
@@ -209,6 +217,7 @@ const config = [
209
217
  ignoreArrowShorthand: true,
210
218
  },
211
219
  ],
220
+ 'no-use-before-define': 'off',
212
221
  '@typescript-eslint/no-use-before-define': [
213
222
  'error',
214
223
  {
@@ -256,6 +265,7 @@ const config = [
256
265
  '@typescript-eslint/no-loss-of-precision': ['error'],
257
266
  '@typescript-eslint/no-loop-func': ['error'],
258
267
  '@typescript-eslint/no-redeclare': ['error'],
268
+ 'no-shadow': 'off',
259
269
  '@typescript-eslint/no-shadow': ['error'],
260
270
  '@typescript-eslint/only-throw-error': 'error',
261
271
  '@typescript-eslint/no-unused-expressions': [
@@ -289,7 +299,6 @@ const config = [
289
299
  tsx: 'never',
290
300
  },
291
301
  ],
292
- strict: ['error', 'never'],
293
302
  'import/export': ['error'],
294
303
  'import/no-unresolved': ['error'],
295
304
  'import/no-named-as-default': ['error'],
@@ -308,7 +317,7 @@ const config = [
308
317
  // value imports aliases
309
318
  { pattern: '@/**', group: 'internal', position: 'before' },
310
319
  { pattern: '~/**', group: 'internal', position: 'before' },
311
- { pattern: '#**', group: 'internal', position: 'before' }
320
+ { pattern: '#**', group: 'internal', position: 'before' },
312
321
  ],
313
322
  pathGroupsExcludedImportTypes: ['builtin', 'external'],
314
323
  alphabetize: { order: 'asc', caseInsensitive: true },
@@ -321,15 +330,6 @@ const config = [
321
330
  'import/no-webpack-loader-syntax': ['error'],
322
331
  'import/no-named-default': ['error'],
323
332
  '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
333
  'import/no-useless-path-segments': [
334
334
  'error',
335
335
  {
@@ -394,7 +394,6 @@ const config = [
394
394
  ],
395
395
  'prefer-numeric-literals': ['error'],
396
396
  'prefer-rest-params': ['error'],
397
- 'prefer-spread': ['error'],
398
397
  'prefer-template': ['error'],
399
398
  'require-yield': ['error'],
400
399
  'symbol-description': ['error'],
@@ -795,6 +794,7 @@ const config = [
795
794
  'unicorn/prefer-regexp-test': ['error'],
796
795
  'unicorn/prefer-set-has': ['error'],
797
796
  'unicorn/prefer-set-size': ['error'],
797
+ 'prefer-spread': 'off',
798
798
  'unicorn/prefer-spread': ['error'],
799
799
  'unicorn/prefer-string-raw': ['error'],
800
800
  'unicorn/prefer-string-replace-all': ['error'],
@@ -873,7 +873,7 @@ const config = [
873
873
  '@typescript-eslint/no-unsafe-assignment': ['error'],
874
874
  '@typescript-eslint/no-unsafe-call': ['error'],
875
875
  '@typescript-eslint/no-unsafe-declaration-merging': ['error'],
876
- '@typescript-eslint/no-unsafe-enum-comparison': ['error'],
876
+ // '@typescript-eslint/no-unsafe-enum-comparison': ['error'], // TODO: remove this rule
877
877
  '@typescript-eslint/no-unsafe-member-access': ['error'],
878
878
  '@typescript-eslint/no-unsafe-return': ['error'],
879
879
  '@typescript-eslint/no-unsafe-unary-minus': ['error'],
@@ -891,9 +891,12 @@ const config = [
891
891
  '@typescript-eslint/prefer-namespace-keyword': ['error'],
892
892
  '@typescript-eslint/prefer-nullish-coalescing': ['error'],
893
893
  '@typescript-eslint/prefer-optional-chain': ['error'],
894
- '@typescript-eslint/prefer-promise-reject-errors': ['error', {
894
+ '@typescript-eslint/prefer-promise-reject-errors': [
895
+ 'error',
896
+ {
895
897
  allowEmptyReject: true,
896
- }],
898
+ },
899
+ ],
897
900
  '@typescript-eslint/prefer-readonly': ['error'],
898
901
  '@typescript-eslint/prefer-reduce-type-parameter': ['error'],
899
902
  '@typescript-eslint/prefer-regexp-exec': ['error'],
@@ -903,6 +906,7 @@ const config = [
903
906
  '@typescript-eslint/require-array-sort-compare': ['error'],
904
907
  '@typescript-eslint/restrict-plus-operands': ['error'],
905
908
  '@typescript-eslint/restrict-template-expressions': ['error'],
909
+ strict: ['error', 'never'],
906
910
  '@typescript-eslint/strict-boolean-expressions': ['error'],
907
911
  '@typescript-eslint/switch-exhaustiveness-check': ['error'],
908
912
  '@typescript-eslint/triple-slash-reference': ['error'],
@@ -968,18 +972,6 @@ const config = [
968
972
  '@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }],
969
973
  '@stylistic/keyword-spacing': ['error', { before: true, after: true }],
970
974
  '@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
975
  '@stylistic/max-statements-per-line': ['error', { max: 1 }],
984
976
  '@stylistic/new-parens': ['error'],
985
977
  '@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/**',
@@ -212,6 +220,7 @@ const config: Linter.Config[] = [
212
220
  ignoreArrowShorthand: true,
213
221
  },
214
222
  ],
223
+ 'no-use-before-define': 'off',
215
224
  '@typescript-eslint/no-use-before-define': [
216
225
  'error',
217
226
  {
@@ -259,6 +268,7 @@ const config: Linter.Config[] = [
259
268
  '@typescript-eslint/no-loss-of-precision': ['error'],
260
269
  '@typescript-eslint/no-loop-func': ['error'],
261
270
  '@typescript-eslint/no-redeclare': ['error'],
271
+ 'no-shadow': 'off',
262
272
  '@typescript-eslint/no-shadow': ['error'],
263
273
  '@typescript-eslint/only-throw-error': 'error',
264
274
  '@typescript-eslint/no-unused-expressions': [
@@ -292,7 +302,6 @@ const config: Linter.Config[] = [
292
302
  tsx: 'never',
293
303
  },
294
304
  ],
295
- strict: ['error', 'never'],
296
305
  'import/export': ['error'],
297
306
  'import/no-unresolved': ['error'],
298
307
  'import/no-named-as-default': ['error'],
@@ -311,7 +320,7 @@ const config: Linter.Config[] = [
311
320
  // value imports aliases
312
321
  { pattern: '@/**', group: 'internal', position: 'before' },
313
322
  { pattern: '~/**', group: 'internal', position: 'before' },
314
- { pattern: '#**', group: 'internal', position: 'before' }
323
+ { pattern: '#**', group: 'internal', position: 'before' },
315
324
  ],
316
325
  pathGroupsExcludedImportTypes: ['builtin', 'external'],
317
326
  alphabetize: { order: 'asc', caseInsensitive: true },
@@ -324,15 +333,6 @@ const config: Linter.Config[] = [
324
333
  'import/no-webpack-loader-syntax': ['error'],
325
334
  'import/no-named-default': ['error'],
326
335
  '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
336
  'import/no-useless-path-segments': [
337
337
  'error',
338
338
  {
@@ -397,7 +397,6 @@ const config: Linter.Config[] = [
397
397
  ],
398
398
  'prefer-numeric-literals': ['error'],
399
399
  'prefer-rest-params': ['error'],
400
- 'prefer-spread': ['error'],
401
400
  'prefer-template': ['error'],
402
401
  'require-yield': ['error'],
403
402
  'symbol-description': ['error'],
@@ -801,6 +800,7 @@ const config: Linter.Config[] = [
801
800
  'unicorn/prefer-regexp-test': ['error'],
802
801
  'unicorn/prefer-set-has': ['error'],
803
802
  'unicorn/prefer-set-size': ['error'],
803
+ 'prefer-spread': 'off',
804
804
  'unicorn/prefer-spread': ['error'],
805
805
  'unicorn/prefer-string-raw': ['error'],
806
806
  'unicorn/prefer-string-replace-all': ['error'],
@@ -879,7 +879,7 @@ const config: Linter.Config[] = [
879
879
  '@typescript-eslint/no-unsafe-assignment': ['error'],
880
880
  '@typescript-eslint/no-unsafe-call': ['error'],
881
881
  '@typescript-eslint/no-unsafe-declaration-merging': ['error'],
882
- '@typescript-eslint/no-unsafe-enum-comparison': ['error'],
882
+ // '@typescript-eslint/no-unsafe-enum-comparison': ['error'], // TODO: remove this rule
883
883
  '@typescript-eslint/no-unsafe-member-access': ['error'],
884
884
  '@typescript-eslint/no-unsafe-return': ['error'],
885
885
  '@typescript-eslint/no-unsafe-unary-minus': ['error'],
@@ -897,9 +897,12 @@ const config: Linter.Config[] = [
897
897
  '@typescript-eslint/prefer-namespace-keyword': ['error'],
898
898
  '@typescript-eslint/prefer-nullish-coalescing': ['error'],
899
899
  '@typescript-eslint/prefer-optional-chain': ['error'],
900
- '@typescript-eslint/prefer-promise-reject-errors': ['error', {
901
- allowEmptyReject: true,
902
- }],
900
+ '@typescript-eslint/prefer-promise-reject-errors': [
901
+ 'error',
902
+ {
903
+ allowEmptyReject: true,
904
+ },
905
+ ],
903
906
  '@typescript-eslint/prefer-readonly': ['error'],
904
907
  '@typescript-eslint/prefer-reduce-type-parameter': ['error'],
905
908
  '@typescript-eslint/prefer-regexp-exec': ['error'],
@@ -909,6 +912,7 @@ const config: Linter.Config[] = [
909
912
  '@typescript-eslint/require-array-sort-compare': ['error'],
910
913
  '@typescript-eslint/restrict-plus-operands': ['error'],
911
914
  '@typescript-eslint/restrict-template-expressions': ['error'],
915
+ strict: ['error', 'never'],
912
916
  '@typescript-eslint/strict-boolean-expressions': ['error'],
913
917
  '@typescript-eslint/switch-exhaustiveness-check': ['error'],
914
918
  '@typescript-eslint/triple-slash-reference': ['error'],
@@ -974,18 +978,6 @@ const config: Linter.Config[] = [
974
978
  '@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }],
975
979
  '@stylistic/keyword-spacing': ['error', { before: true, after: true }],
976
980
  '@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
981
  '@stylistic/max-statements-per-line': ['error', { max: 1 }],
990
982
  '@stylistic/new-parens': ['error'],
991
983
  '@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.20",
3
+ "version": "1.0.21",
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.0",
60
+ "prettier": "^3.7.1",
61
61
  "release-it": "^19.0.6"
62
62
  },
63
63
  "peerDependencies": {