linter-bundle 2.14.0 → 2.16.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 CHANGED
@@ -6,14 +6,60 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.13.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.15.0...HEAD)
10
+
11
+ ## [2.16.0] - 2022.08.05
12
+
13
+ - [eslint] Updated `eslint` from `8.14.0` to `8.21.0`
14
+ - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.1` to `3.4.0`
15
+ - [eslint] Updated `eslint-plugin-functional` from `4.2.1` to `4.2.2`
16
+ - [eslint] Updated `eslint-plugin-jest` from `26.1.5` to `26.7.0`
17
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.2.9` to `39.3.4`
18
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.5.1` to `6.6.1`
19
+ - [eslint] Updated `eslint-plugin-react` from `7.29.4` to `7.30.1`
20
+ - [eslint] Updated `eslint-plugin-react-hooks` from `4.5.0` to `4.6.0`
21
+ - [eslint] Updated `eslint-plugin-unicorn` from `42.0.0` to `43.0.2`
22
+ - [eslint] Updated `@typescript-eslint` from `5.22.0` to `5.32.0`
23
+ - [eslint] Remove deprecated `@typescript-eslint/no-duplicate-imports` rule
24
+ - [eslint] Make use of [`@typescript-eslint/no-restricted-imports`](https://typescript-eslint.io/rules/no-restricted-imports/) rule
25
+ - [eslint] Make use of [`@typescript-eslint/space-infix-ops`](https://typescript-eslint.io/rules/space-infix-ops/) rule
26
+ - [eslint] Make use of [`@typescript-eslint/consistent-generic-constructors`](https://typescript-eslint.io/rules/consistent-generic-constructors/) rule
27
+ - [eslint/overrides-jest] Make use of [`jest/prefer-hooks-in-order`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md) rule
28
+ - [eslint/overrides-jest] Make use of [`jest/max-expects`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-expects.md) rule
29
+ - [eslint/overrides-jest] Make use of [`jest/prefer-mock-promise-shorthand`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-mock-promise-shorthand.md) rule
30
+ - [eslint/overrides-react] Make use of [`react/jsx-no-leaked-render`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md) rule
31
+ - [eslint] Added but disable [`unicorn/prefer-event-target`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md) rule
32
+ - [eslint] Make use of [`unicorn/prefer-logical-operator-over-ternary`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md) rule
33
+ - [eslint] Remove deprecated `unicorn/import-index` rule
34
+ - [markdownlint] Updated `markdownlint-cli` from `0.31.1` to `0.32.1`
35
+ - [stylelint] Updated `stylelint` from `14.8.2` to `14.9.1`
36
+ - [stylelint] Updated `stylelint-scss` from `4.2.0` to `4.3.0`
37
+ - [stylelint] Updated `stylelint-selector-no-empty` from `1.0.8` to `1.0.9`
38
+ - [stylelint] Updated `stylelint-use-logical-spec` from `3.2.2` to `4.1.0`
39
+ - [stylelint] Added but disable [`import-notation`](https://github.com/stylelint/stylelint/tree/main/lib/rules/import-notation) rule
40
+
41
+ ## [2.15.0] - 2022.05.05
42
+
43
+ ### Changed
44
+
45
+ - [stylelint] Disabled `declaration-property-max-values` rule because of false-positives.
46
+ - [stylelint] Disabled `selector-not-notation` for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
47
+
48
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.14.1...v2.15.0)
49
+
50
+ ## [2.14.1] - 2022.05.05
51
+
52
+ ### Fixed
53
+
54
+ - [general] Fixed empty warning for outdated `resolutions` in `package.json`
55
+
56
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.14.0...v2.14.1)
10
57
 
11
58
  ## [2.14.0] - 2022.05.05
12
59
 
13
60
  ### Changed
14
61
 
15
62
  - [general] Remove files from npm package which are only necessary for development
16
- - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.0` to `2.7.1`
17
63
  - [eslint] Updated `@typescript-eslint` from `5.21.0` to `5.22.0`
18
64
  - [eslint] Updated `eslint-plugin-jsdoc` from `39.2.8` to `39.2.9`
19
65
  - [eslint] Updated `eslint-plugin-react-hooks` from `4.4.0` to `4.5.0`
@@ -23,6 +69,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
23
69
  - [stylelint] In the deployment process, ensure that the used Stylelint options are valid
24
70
  - [stylelint] Fix invalid configuration of [`declaration-property-max-values`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-max-values/README.md) rule
25
71
 
72
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.13.0...v2.14.0)
73
+
26
74
  ## [2.13.0] - 2022.04.25
27
75
 
28
76
  ### Changed
@@ -107,8 +155,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
107
155
  ### Changed
108
156
 
109
157
  - [stylelint] Remove `"before-comment"` exception in `scss/dollar-variable-empty-line-after` rule
110
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.12.1` to `5.14.0`
111
- - [eslint] Updated `@typescript-eslint/parser` from `5.12.1` to `5.14.0`
158
+ - [eslint] Updated `@typescript-eslint` from `5.12.1` to `5.14.0`
112
159
  - [eslint] Updated `eslint` from `8.9.0` to `8.10.0`
113
160
  - [eslint] Updated `eslint-plugin-jsdoc` from `37.9.4` to `37.9.7`
114
161
  - [eslint] Updated `eslint-plugin-react` from `7.28.0` to `7.29.3`
@@ -128,7 +175,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
128
175
 
129
176
  ### Changed
130
177
 
131
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.12.0 to v5.12.1
178
+ - [eslint] Updated `@typescript-eslint` from v5.12.0 to v5.12.1
132
179
  - [stylelint] Updated `stylelint` from v14.5.1 to v14.5.2
133
180
  - [eslint] Re-activated `@typescript-eslint/no-unnecessary-type-arguments` since the false positives with `React.FunctionComponent` generics has been fixed.
134
181
 
@@ -205,8 +252,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
205
252
 
206
253
  ### Changed
207
254
 
208
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.11.0 to v5.12.0
209
- - [eslint] Updated `@typescript-eslint/parser` from v5.11.0 to v5.12.0
255
+ - [eslint] Updated `@typescript-eslint` from v5.11.0 to v5.12.0
210
256
  - [eslint] Updated `eslint` from v8.8.0 to v8.9.0
211
257
  - [eslint] Updated `eslint-plugin-jsdoc` from v37.8.2 to v37.9.1
212
258
  - [eslint] Ignore `generics` in [`@typescript-eslint/comma-dangle`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/comma-dangle.md) to allow [generic component definitions for function components](https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/#crayon-620a96e97d44a141656396)
@@ -227,7 +273,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
227
273
 
228
274
  ### Changed
229
275
 
230
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.10.1 to v5.11.0
276
+ - [eslint] Updated `@typescript-eslint` from v5.10.1 to v5.11.0
231
277
  - [eslint] Updated `eslint` from v8.7.0 to v8.8.0
232
278
  - [eslint] Updated `eslint-plugin-functional` from v4.1.1 to v4.2.0
233
279
  - [eslint] Updated `eslint-plugin-jest` from v26.0.0 to v26.1.0
@@ -502,7 +548,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
502
548
 
503
549
  ### Changed
504
550
 
505
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v4.26.0 to v4.26.1
551
+ - [eslint] Updated `@typescript-eslint` from v4.26.0 to v4.26.1
506
552
  - [eslint] Activated `allowComputed` of [`import/namespace`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/namespace.md) rule
507
553
 
508
554
  ### Fixed
@@ -530,7 +576,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
530
576
 
531
577
  ### Changed
532
578
 
533
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v4.25.0 to v4.26.0
579
+ - [eslint] Updated `@typescript-eslint` from v4.25.0 to v4.26.0
534
580
  - [eslint] Updated `eslint-plugin-import` from v2.23.3 to v2.23.4
535
581
  - [eslint] Updated `eslint-plugin-jsdoc` from v35.0.0 to v35.1.2
536
582
  - [eslint] Updated `eslint-plugin-react` from v7.23.2 to v7.24.0
@@ -622,7 +668,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
622
668
 
623
669
  ### Changed
624
670
 
625
- - [eslint] Updated `@typescript-eslint/parser` from v4.22.0 to v4.23.0
671
+ - [eslint] Updated `@typescript-eslint` from v4.22.0 to v4.23.0
626
672
  - [eslint] Updated `eslint` from v7.25.0 to v7.26.0
627
673
  - [eslint] Updated `eslint-plugin-jsdoc` from v33.0.0 to v34.0.2
628
674
  - [eslint] Updated `eslint-plugin-unicorn` from v31.0.0 to v32.0.1
package/README.md CHANGED
@@ -81,6 +81,27 @@ npm install linter-bundle --save-dev
81
81
 
82
82
  #### .eslintrc.js
83
83
 
84
+ ##### Minimum configuration
85
+
86
+ ```js
87
+ module.exports = {
88
+ extends: [
89
+ require.resolve('linter-bundle/eslint'),
90
+ // require.resolve('linter-bundle/eslint/overrides-gatsby'),
91
+ // require.resolve('linter-bundle/eslint/overrides-javascript'),
92
+ require.resolve('linter-bundle/eslint/overrides-javascript-lazy'),
93
+ // require.resolve('linter-bundle/eslint/overrides-jest'),
94
+ require.resolve('linter-bundle/eslint/overrides-jsdoc'),
95
+ // require.resolve('linter-bundle/eslint/overrides-react'),
96
+ // require.resolve('linter-bundle/eslint/overrides-storybook'),
97
+ // require.resolve('linter-bundle/eslint/overrides-type-declarations'),
98
+ // require.resolve('linter-bundle/eslint/overrides-worker')
99
+ ]
100
+ };
101
+ ```
102
+
103
+ ##### Maximum configuration
104
+
84
105
  ```js
85
106
  // Sometimes it's required to adjust specific settings. These can be defined here:
86
107
  global.linterBundleSettings = {
@@ -202,7 +223,7 @@ module.exports = {
202
223
 
203
224
  #### .gitignore / .npmignore
204
225
 
205
- ```json
226
+ ```cmd
206
227
  .eslintcache
207
228
  ```
208
229
 
@@ -389,3 +410,17 @@ To visualize the max line-length rules in VSCode, you can activate rulers, by ad
389
410
  }
390
411
  }
391
412
  ```
413
+
414
+ ## FAQ
415
+
416
+ ### How to solve the problem `Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.` ?
417
+
418
+ If you get such an error message:
419
+
420
+ > Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
421
+ > The file does not match your project config: *[any-name]*.js.
422
+ > The file must be included in at least one of the projects provided.
423
+
424
+ the problem is most likely, that your `tsconfig.json` does not cover your JavaScript files and that you don't have a `jsconfig.json` file in your root directory. This is required by the `@typescript-eslint` to use TypeScript for linting of JavaScript files.
425
+
426
+ To solve this problem, either `"include"` your JavaScript files in your `tsconfig.json` (don't forget to set the compiler option `"checkJs"` to `true`) or create a `jsconfig.json` file in your root directory (this can be a copy of your `tsconfig.json` with an `"include"` of your JavaScript files).
package/TODO.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @todo
2
2
 
3
+ <!-- markdownlint-disable -->
4
+
5
+ - Bereiche in Readme aufklappbar machen:
6
+ <details>
7
+ summary>yarn</summary>
8
+
9
+ ```shell
10
+ yarn add click-to-react-component
11
+ ```
12
+ </details>
13
+
3
14
  - Make git diff-branch configurable
4
15
  on GitHub Actions this could be used:
5
16
  - run: git diff --name-only -z origin/${GITHUB_BASE_REF}
package/eslint/index.js CHANGED
@@ -347,7 +347,7 @@ module.exports = {
347
347
  'space-before-blocks': 'error',
348
348
  'space-before-function-paren': 'off', // Covered by @typescript-eslint/space-before-function-paren
349
349
  'space-in-parens': 'error',
350
- 'space-infix-ops': 'error',
350
+ 'space-infix-ops': 'off', // Covered by @typescript-eslint/space-infix-ops
351
351
  'space-unary-ops': 'error',
352
352
  'spaced-comment': ['error', 'always', { markers: ['/'], block: { markers: ['!'], balanced: true } }],
353
353
  'switch-colon-spacing': 'error',
@@ -364,11 +364,11 @@ module.exports = {
364
364
  'no-class-assign': 'error',
365
365
  'no-confusing-arrow': ['error', { allowParens: true }],
366
366
  'no-const-assign': 'error',
367
- 'no-dupe-class-members': 'off', // Covered by @typescript-eslint/no-no-dupe-class-members
368
- 'no-duplicate-imports': 'off', // Covered by @typescript-eslint/no-duplicate-imports / import/no-duplicates (see https://github.com/typescript-eslint/typescript-eslint/issues/2315)
367
+ 'no-dupe-class-members': 'off', // Covered by @typescript-eslint/no-dupe-class-members
368
+ 'no-duplicate-imports': 'off', // Covered by import/no-duplicates (see https://github.com/typescript-eslint/typescript-eslint/issues/2315)
369
369
  'no-new-symbol': 'error',
370
370
  'no-restricted-exports': 'error',
371
- 'no-restricted-imports': 'error',
371
+ 'no-restricted-imports': 'off', // Covered by @typescript-eslint/no-restricted-imports
372
372
  'no-this-before-super': 'error',
373
373
  'no-useless-computed-key': 'error',
374
374
  'no-useless-constructor': 'off', // Covered by @typescript-eslint/no-useless-constructor
@@ -420,6 +420,7 @@ module.exports = {
420
420
  generics: 'ignore'
421
421
  }],
422
422
  '@typescript-eslint/comma-spacing': 'error',
423
+ '@typescript-eslint/consistent-generic-constructors': 'error',
423
424
  '@typescript-eslint/consistent-indexed-object-style': 'error',
424
425
  '@typescript-eslint/consistent-type-assertions': 'error',
425
426
  '@typescript-eslint/consistent-type-definitions': 'error',
@@ -629,7 +630,6 @@ module.exports = {
629
630
  '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
630
631
  '@typescript-eslint/no-dupe-class-members': 'error',
631
632
  '@typescript-eslint/no-duplicate-enum-values': 'error',
632
- '@typescript-eslint/no-duplicate-imports': 'error',
633
633
  '@typescript-eslint/no-dynamic-delete': 'error',
634
634
  '@typescript-eslint/no-empty-function': 'error',
635
635
  '@typescript-eslint/no-empty-interface': 'off',
@@ -641,7 +641,7 @@ module.exports = {
641
641
  '@typescript-eslint/no-floating-promises': 'error',
642
642
  '@typescript-eslint/no-for-in-array': 'error',
643
643
  '@typescript-eslint/no-implicit-any-catch': 'off', // Results into false-positive with the TS4.4 option "useUnknownInCatchVariables"
644
- '@typescript-eslint/no-inferrable-types': 'off',
644
+ '@typescript-eslint/no-inferrable-types': 'off', // Sometimes an explicit type helps to understand the code better
645
645
  '@typescript-eslint/no-invalid-this': 'error',
646
646
  '@typescript-eslint/no-invalid-void-type': ['error', { allowInGenericTypeArguments: true }],
647
647
  '@typescript-eslint/no-loop-func': 'error',
@@ -663,6 +663,7 @@ module.exports = {
663
663
  '@typescript-eslint/no-redeclare': ['error', { ignoreDeclarationMerge: true }],
664
664
  '@typescript-eslint/no-redundant-type-constituents': 'off', // False positive with Promise<... | never>
665
665
  '@typescript-eslint/no-require-imports': 'error',
666
+ '@typescript-eslint/no-restricted-imports': 'error',
666
667
  '@typescript-eslint/no-shadow': 'error',
667
668
  '@typescript-eslint/no-this-alias': 'error',
668
669
  '@typescript-eslint/no-throw-literal': ['error', {
@@ -727,6 +728,7 @@ module.exports = {
727
728
  '@typescript-eslint/semi': 'error',
728
729
  '@typescript-eslint/sort-type-union-intersection-members': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
729
730
  '@typescript-eslint/space-before-function-paren': 'error',
731
+ '@typescript-eslint/space-infix-ops': 'error',
730
732
  '@typescript-eslint/strict-boolean-expressions': ['off', { allowNullable: true, allowSafe: true, ignoreRhs: true }], // @todo Doesn't work for specific code, check later after all linter warnings are fixed, maybe at some positions we can use '??'
731
733
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
732
734
  '@typescript-eslint/triple-slash-reference': 'error',
@@ -934,7 +936,6 @@ module.exports = {
934
936
  /([A-Za-z0-9]?[a-z0-9]+)*[A-Z]{2,4}([A-Za-z0-9]?[a-z0-9]+)*/u // Up to 4 Characters can be upper-case in a row (e.g. in `prepareDOM` or `SVGIcon`)
935
937
  ]
936
938
  }],
937
- 'unicorn/import-index': 'error',
938
939
  'unicorn/import-style': 'error',
939
940
  'unicorn/new-for-builtins': 'error',
940
941
  'unicorn/no-abusive-eslint-disable': 'error',
@@ -989,10 +990,12 @@ module.exports = {
989
990
  'unicorn/prefer-dom-node-dataset': 'off', // `setAttribute` is faster than `dataset`. See https://www.measurethat.net/Benchmarks/Show/7740/0/classname-vs-setattribute-vs-classlist-vs-dataset
990
991
  'unicorn/prefer-dom-node-remove': 'error',
991
992
  'unicorn/prefer-dom-node-text-content': 'error',
993
+ 'unicorn/prefer-event-target': 'off', // @todo Disabled for now, since `EventTarget` requires Node.js 16. Activate in 2025
992
994
  'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
993
995
  'unicorn/prefer-includes': 'error',
994
996
  'unicorn/prefer-json-parse-buffer': 'off', // TypeScript states that string needs to be used as of the ES specification. @see https://github.com/microsoft/TypeScript/issues/11842
995
997
  'unicorn/prefer-keyboard-event-key': 'error',
998
+ 'unicorn/prefer-logical-operator-over-ternary': 'error',
996
999
  'unicorn/prefer-math-trunc': 'error',
997
1000
  'unicorn/prefer-modern-dom-apis': 'error',
998
1001
  'unicorn/prefer-modern-math-apis': 'error',
@@ -105,7 +105,6 @@ module.exports = {
105
105
  kebabCase: true
106
106
  }
107
107
  }],
108
- 'unicorn/import-index': 'off', // @see https://github.com/sindresorhus/eslint-plugin-unicorn/pull/977
109
108
  'unicorn/no-process-exit': 'off', // node/no-process-exit
110
109
  'unicorn/prefer-module': 'off', // @todo Requires Node.js v13.2. Activate in 2023
111
110
  'unicorn/prefer-node-protocol': 'off', // @todo Requires Node.js v16. Activate in 2025
@@ -62,6 +62,7 @@ module.exports = {
62
62
  'jest/consistent-test-it': 'error',
63
63
  'jest/expect-expect': 'error',
64
64
  'jest/prefer-lowercase-title': ['error', { ignore: ['describe'] }],
65
+ 'jest/max-expects': 'error',
65
66
  'jest/max-nested-describe': 'error',
66
67
  'jest/no-alias-methods': 'error',
67
68
  'jest/no-commented-out-tests': 'error',
@@ -80,16 +81,24 @@ module.exports = {
80
81
  'jest/no-jest-import': 'error',
81
82
  'jest/no-large-snapshots': 'error',
82
83
  'jest/no-mocks-import': 'error',
84
+ 'jest/no-restricted-matchers': ['error', {
85
+ resolves: 'Use `expect(await promise)` instead.',
86
+ toBeFalsy: 'Avoid `toBeFalsy`',
87
+ toBeTruthy: 'Avoid `toBeTruthy`',
88
+ toMatchSnapshot: 'Use `toMatchInlineSnapshot()` instead',
89
+ toThrowErrorMatchingSnapshot: 'Use `toThrowErrorMatchingInlineSnapshot()` instead'
90
+ }],
83
91
  'jest/no-standalone-expect': 'error',
84
92
  'jest/no-test-prefixes': 'error',
85
93
  'jest/no-test-return-statement': 'error',
86
94
  'jest/prefer-called-with': 'error',
87
95
  'jest/prefer-expect-assertions': ['error', { onlyFunctionsWithAsyncKeyword: true }],
88
96
  'jest/prefer-expect-resolves': 'off', // We prefer `expect(await promise)` enforced by 'jest/no-restricted-matchers'
97
+ 'jest/prefer-hooks-in-order': 'error',
89
98
  'jest/prefer-hooks-on-top': 'error',
90
- 'jest/require-hook': 'error',
91
99
  'jest/prefer-comparison-matcher': 'error',
92
100
  'jest/prefer-equality-matcher': 'error',
101
+ 'jest/prefer-mock-promise-shorthand': 'error',
93
102
  'jest/prefer-snapshot-hint': 'error',
94
103
  'jest/prefer-spy-on': 'error',
95
104
  'jest/prefer-strict-equal': 'error',
@@ -97,13 +106,7 @@ module.exports = {
97
106
  'jest/prefer-to-contain': 'error',
98
107
  'jest/prefer-to-have-length': 'error',
99
108
  'jest/prefer-todo': 'error',
100
- 'jest/no-restricted-matchers': ['error', {
101
- resolves: 'Use `expect(await promise)` instead.',
102
- toBeFalsy: 'Avoid `toBeFalsy`',
103
- toBeTruthy: 'Avoid `toBeTruthy`',
104
- toMatchSnapshot: 'Use `toMatchInlineSnapshot()` instead',
105
- toThrowErrorMatchingSnapshot: 'Use `toThrowErrorMatchingInlineSnapshot()` instead'
106
- }],
109
+ 'jest/require-hook': 'error',
107
110
  'jest/require-top-level-describe': 'error',
108
111
  'jest/require-to-throw-message': 'error',
109
112
  'jest/unbound-method': 'error',
@@ -145,11 +145,12 @@ module.exports = {
145
145
  'react/jsx-max-depth': ['error', { max: 8 }],
146
146
  'react/jsx-max-props-per-line': ['error', { maximum: { single: 5, multi: 1 } }],
147
147
  'react/no-adjacent-inline-elements': 'off', // @todo There is an issue if inline and block elements are mixed. Simple example: `<span>Text</span><br />` here, the space between the SPAN and BR should not be forced, because a space at the end of a line does not make sense.
148
- 'react/jsx-newline': 'off',
148
+ 'react/jsx-newline': 'off', // @todo Why is this rule deactivated?
149
149
  'react/jsx-no-bind': ['error', { ignoreDOMComponents: true }],
150
150
  'react/jsx-no-comment-textnodes': 'error',
151
151
  'react/jsx-no-constructed-context-values': 'error',
152
152
  'react/jsx-no-duplicate-props': 'error',
153
+ 'react/jsx-no-leaked-render': 'error',
153
154
  'react/jsx-no-literals': 'off',
154
155
  'react/jsx-no-script-url': 'error',
155
156
  'react/jsx-no-target-blank': ['error', { allowReferrer: true, forms: true }],
package/lint.js CHANGED
@@ -29,7 +29,7 @@ void (async () => {
29
29
  }
30
30
 
31
31
  if (outdatedOverrides.resolutions.length > 0) {
32
- process.stderr.write(`Outdated "resolutions" in package.json detected:\n- ${outdatedOverrides.overrides.map((dependency) => `${dependency.name}: ${dependency.configuredVersion} is configured, but ${dependency.expectedVersion} is expected`).join('\n- ')}\n\n`);
32
+ process.stderr.write(`Outdated "resolutions" in package.json detected:\n- ${outdatedOverrides.resolutions.map((dependency) => `${dependency.name}: ${dependency.configuredVersion} is configured, but ${dependency.expectedVersion} is expected`).join('\n- ')}\n\n`);
33
33
  }
34
34
 
35
35
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -40,41 +40,41 @@
40
40
  "check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
41
41
  },
42
42
  "dependencies": {
43
- "@typescript-eslint/eslint-plugin": "5.22.0",
44
- "@typescript-eslint/parser": "5.22.0",
45
- "eslint": "8.14.0",
46
- "eslint-import-resolver-typescript": "2.7.1",
43
+ "@typescript-eslint/eslint-plugin": "5.32.0",
44
+ "@typescript-eslint/parser": "5.32.0",
45
+ "eslint": "8.21.0",
46
+ "eslint-import-resolver-typescript": "3.4.0",
47
47
  "eslint-import-resolver-webpack": "0.13.2",
48
48
  "eslint-plugin-eslint-comments": "3.2.0",
49
- "eslint-plugin-functional": "4.2.1",
49
+ "eslint-plugin-functional": "4.2.2",
50
50
  "eslint-plugin-import": "2.26.0",
51
- "eslint-plugin-jest": "26.1.5",
52
- "eslint-plugin-jsdoc": "39.2.9",
53
- "eslint-plugin-jsx-a11y": "6.5.1",
51
+ "eslint-plugin-jest": "26.7.0",
52
+ "eslint-plugin-jsdoc": "39.3.4",
53
+ "eslint-plugin-jsx-a11y": "6.6.1",
54
54
  "eslint-plugin-node": "11.1.0",
55
55
  "eslint-plugin-promise": "6.0.0",
56
- "eslint-plugin-react": "7.29.4",
57
- "eslint-plugin-react-hooks": "4.5.0",
58
- "eslint-plugin-unicorn": "42.0.0",
59
- "markdownlint-cli": "0.31.1",
56
+ "eslint-plugin-react": "7.30.1",
57
+ "eslint-plugin-react-hooks": "4.6.0",
58
+ "eslint-plugin-unicorn": "43.0.2",
59
+ "markdownlint-cli": "0.32.1",
60
60
  "micromatch": "4.0.5",
61
61
  "postcss-scss": "4.0.4",
62
- "stylelint": "14.8.2",
62
+ "stylelint": "14.9.1",
63
63
  "stylelint-declaration-block-no-ignored-properties": "2.5.0",
64
64
  "stylelint-order": "5.0.0",
65
- "stylelint-scss": "4.2.0",
66
- "stylelint-selector-no-empty": "1.0.8",
67
- "stylelint-use-logical-spec": "3.2.2"
65
+ "stylelint-scss": "4.3.0",
66
+ "stylelint-selector-no-empty": "1.0.9",
67
+ "stylelint-use-logical-spec": "4.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "postcss-value-parser": "*",
71
71
  "typescript": "^4.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/eslint": "8.4.2",
74
+ "@types/eslint": "8.4.5",
75
75
  "@types/micromatch": "4.0.2",
76
- "@types/node": "17.0.31",
76
+ "@types/node": "18.6.4",
77
77
  "stylelint-find-new-rules": "4.0.0",
78
- "typescript": "4.6.4"
78
+ "typescript": "4.7.4"
79
79
  }
80
80
  }
@@ -157,7 +157,7 @@ module.exports = {
157
157
  ]
158
158
  }
159
159
  ],
160
- 'declaration-property-max-values': { '/.*/': 4 },
160
+ 'declaration-property-max-values': null, // { '/.*/': 4 }, @todo disabled because of false-positive with `padding-inline-start: #{24px + $i * 16px};` and `transition: transform, background-color, color, border-color, box-shadow;`
161
161
  'declaration-no-important': [true, {
162
162
  severity: 'warning'
163
163
  }],
@@ -193,6 +193,7 @@ module.exports = {
193
193
  'function-url-scheme-allowed-list': null,
194
194
  'function-whitespace-after': 'always',
195
195
  'hue-degree-notation': 'number', // @todo change that to 'angle'?
196
+ 'import-notation': null, // This rule, does not make sense. `node_modules` dependencies need to use `url("css_bundle")`, while project files are using only a string.
196
197
  'indentation': 'tab',
197
198
  'keyframe-block-no-duplicate-selectors': true,
198
199
  'keyframe-declaration-no-important': true,
@@ -291,7 +292,7 @@ module.exports = {
291
292
  'selector-nested-pattern': null,
292
293
  'selector-no-qualifying-type': [true, { ignore: ['attribute', 'class'] }],
293
294
  'selector-no-vendor-prefix': true,
294
- 'selector-not-notation': 'complex',
295
+ 'selector-not-notation': null, // 'complex', @todo Reactivate in 2024. Disabled for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
295
296
  'selector-pseudo-class-allowed-list': null,
296
297
  'selector-pseudo-class-case': 'lower',
297
298
  'selector-pseudo-class-disallowed-list': null,
@@ -168,7 +168,7 @@ module.exports = stylelint.createPlugin(
168
168
  // @ts-expect-error -- Property 'ignore' comes from an index signature, so it must be accessed with ['ignore'].
169
169
  const blacklist = getBlacklist(options.ignore);
170
170
  // @ts-expect-error -- Property 'ignoreProperties' comes from an index signature, so it must be accessed with ['ignoreProperties'].
171
- const ignored = (options.ignoreProperties ? options.ignoreProperties : []);
171
+ const ignored = options.ignoreProperties ?? [];
172
172
 
173
173
  cssRoot.walkDecls('transition-property', (decl) => {
174
174
  valueParser(decl.value).walk((node) => {