linter-bundle 2.15.0 → 2.18.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,12 +6,89 @@ 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.15.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.18.0...HEAD)
10
10
 
11
- ## [2.15.0] - 2022.05.05
11
+ ## [2.18.0] - 2022.08.19
12
+
13
+ ### Changed
14
+
15
+ - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.33.0` to `5.33.1`
16
+ - [eslint] Updated `eslint` from `8.21.0` to `8.22.0`
17
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.4.0` to `3.4.2`
18
+ - [eslint] Updated `eslint-plugin-jest` from `26.8.2` to `26.8.3`
19
+ - [stylelint] Updated `stylelint` from `14.9.1` to `14.10.0`
20
+ - [eslint/overrides-react] Activate [`allowExpressions`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md#allowexpressions) for
21
+ [`react/jsx-no-useless-fragment`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md) rule, to fill the React type definitions
22
+ requirement that when a component returns only children (a ReactNode), the return value is a ReactElement by wrapping children in a React.Fragment
23
+
24
+ ### Added
25
+
26
+ - [stylelint] Make use of [`annotation-no-unknown`](https://github.com/stylelint/stylelint/tree/main/lib/rules/annotation-no-unknown) rule
27
+ - [stylelint] Make use of [`keyframe-selector-notation`](https://github.com/stylelint/stylelint/tree/main/lib/rules/keyframe-selector-notation) rule, with option `percentage`
28
+
29
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.17.0...v2.18.0)
30
+
31
+ ## [2.17.0] - 2022.08.10
32
+
33
+ ### Changed
34
+
35
+ - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.32.0` to `5.33.0`
36
+ - [eslint] Updated `eslint-plugin-jest` from `26.7.0` to `26.8.2`
37
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.3.4` to `39.3.6`
38
+
39
+ ### Fixed
40
+
41
+ - [eslint/overrides-react] Disable [`react/jsx-no-leaked-render`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md) rule, as this should be covered by types in TypeScript to prevent unnecessary type castings from boolean to boolean
42
+ - [stylelint] Add `except` for `"margin"` and `"padding"` in `stylelint-use-logical-spec` rule, to prevent [unnecessary warnings](https://github.com/Jordan-Hall/stylelint-use-logical-spec/issues/33) for usages like `margin: 10px 20px;`
43
+
44
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.16.0...v2.17.0)
45
+
46
+ ## [2.16.0] - 2022.08.05
12
47
 
13
48
  ### Changed
14
49
 
50
+ - [eslint] Updated `eslint` from `8.14.0` to `8.21.0`
51
+ - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.1` to `3.4.0`
52
+ - [eslint] Updated `eslint-plugin-functional` from `4.2.1` to `4.2.2`
53
+ - [eslint] Updated `eslint-plugin-jest` from `26.1.5` to `26.7.0`
54
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.2.9` to `39.3.4`
55
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.5.1` to `6.6.1`
56
+ - [eslint] Updated `eslint-plugin-react` from `7.29.4` to `7.30.1`
57
+ - [eslint] Updated `eslint-plugin-react-hooks` from `4.5.0` to `4.6.0`
58
+ - [eslint] Updated `eslint-plugin-unicorn` from `42.0.0` to `43.0.2`
59
+ - [eslint] Updated `@typescript-eslint` from `5.22.0` to `5.32.0`
60
+ - [markdownlint] Updated `markdownlint-cli` from `0.31.1` to `0.32.1`
61
+ - [stylelint] Updated `stylelint` from `14.8.2` to `14.9.1`
62
+ - [stylelint] Updated `stylelint-scss` from `4.2.0` to `4.3.0`
63
+ - [stylelint] Updated `stylelint-selector-no-empty` from `1.0.8` to `1.0.9`
64
+ - [stylelint] Updated `stylelint-use-logical-spec` from `3.2.2` to `4.1.0`
65
+
66
+ ### Added
67
+
68
+ - [eslint] Make use of [`@typescript-eslint/no-restricted-imports`](https://typescript-eslint.io/rules/no-restricted-imports/) rule
69
+ - [eslint] Make use of [`@typescript-eslint/space-infix-ops`](https://typescript-eslint.io/rules/space-infix-ops/) rule
70
+ - [eslint] Make use of [`@typescript-eslint/consistent-generic-constructors`](https://typescript-eslint.io/rules/consistent-generic-constructors/) rule
71
+ - [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
72
+ - [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
73
+ - [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
74
+ - [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
75
+ - [eslint] Added but disable [`unicorn/prefer-event-target`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md) rule
76
+ - [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
77
+ - [stylelint] Added but disable [`import-notation`](https://github.com/stylelint/stylelint/tree/main/lib/rules/import-notation) rule
78
+
79
+ ### Removed
80
+
81
+ - [eslint] Remove deprecated `@typescript-eslint/no-duplicate-imports` rule
82
+ - [eslint] Remove deprecated `unicorn/import-index` rule
83
+
84
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.15.0...v2.16.0)
85
+
86
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.15.0...v2.16.0)
87
+
88
+ ## [2.15.0] - 2022.05.05
89
+
90
+ ### Fixed
91
+
15
92
  - [stylelint] Disabled `declaration-property-max-values` rule because of false-positives.
16
93
  - [stylelint] Disabled `selector-not-notation` for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
17
94
 
@@ -29,15 +106,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
29
106
 
30
107
  ### Changed
31
108
 
32
- - [general] Remove files from npm package which are only necessary for development
33
- - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.0` to `2.7.1`
34
109
  - [eslint] Updated `@typescript-eslint` from `5.21.0` to `5.22.0`
35
110
  - [eslint] Updated `eslint-plugin-jsdoc` from `39.2.8` to `39.2.9`
36
111
  - [eslint] Updated `eslint-plugin-react-hooks` from `4.4.0` to `4.5.0`
37
112
  - [stylelint] Updated `stylelint` from `14.7.1` to `14.8.2`
113
+
114
+ ### Added
115
+
38
116
  - [eslint] Make use of new [`@typescript-eslint/no-duplicate-enum-values`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md) rule
39
117
  - [stylelint] Make use of new [`keyframe-block-no-duplicate-selectors`](https://github.com/stylelint/stylelint/blob/main/lib/rules/keyframe-block-no-duplicate-selectors/README.md) rule
40
118
  - [stylelint] In the deployment process, ensure that the used Stylelint options are valid
119
+
120
+ ### Fixed
121
+
122
+ - [general] Remove files from npm package which are only necessary for development
41
123
  - [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
42
124
 
43
125
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.13.0...v2.14.0)
@@ -46,7 +128,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
46
128
 
47
129
  ### Changed
48
130
 
49
- - [eslint] Activate `allowExpressions` option of [`@typescript-eslint/explicit-function-return-type`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md) rule
50
131
  - [eslint] Updated `@typescript-eslint` from `5.17.0` to `5.21.0`
51
132
  - [eslint] Updated `eslint` from `8.12.0` to `8.14.0`
52
133
  - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.0` to `2.7.1`
@@ -57,14 +138,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
57
138
  - [eslint] Updated `eslint-plugin-unicorn` from `41.0.1` to `42.0.0`
58
139
  - [stylelint] Updated `postcss-scss` from `4.0.3` to `4.0.4`
59
140
  - [stylelint] Updated `stylelint` from `14.6.1` to `14.7.1`
60
- - [eslint] Activate `allowExpressions` option of [`@typescript-eslint/explicit-function-return-type`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md) rule
61
141
  - [eslint/overrides-jsdoc] Set [`minLineCount` option to 2](https://github.com/gajus/eslint-plugin-jsdoc/issues/870) for `require-jsdoc` rule
142
+ - [stylelint] Set [`selector-not-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-not-notation/README.md) rule to `"complex"`
143
+
144
+ ### Added
145
+
146
+ - [eslint] Activate `allowExpressions` option of [`@typescript-eslint/explicit-function-return-type`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md) rule
62
147
  - [eslint] Reactivated the [`import/no-relative-packages`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-relative-packages.md) rule
63
148
  - [eslint] Make use of new [`unicorn/no-useless-switch-case`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md) rule
64
149
  - [eslint] Make use of new [`unicorn/prefer-modern-math-apis`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md) rule
65
150
  - [eslint] Make use of new [`unicorn/no-unreadable-iife`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md) rule
66
151
  - [eslint] Add but disable [`unicorn/prefer-native-coercion-functions`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md) rule, because this would produce inconsistency in the code and is harder to read
67
- - [stylelint] Set [`selector-not-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-not-notation/README.md) rule to `"complex"`
68
152
 
69
153
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.12.0...v2.13.0)
70
154
 
@@ -83,9 +167,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
83
167
  - [stylelint] Updated `stylelint` from `14.5.3` to `14.6.1`
84
168
  - [stylelint] Updated `stylelint-scss` from `4.1.0` to `4.2.0`
85
169
  - [general] Updated `micromatch` from `4.0.4` to `4.0.5`
170
+ - [stylelint] Replace `function-no-unknown` by `scss/function-no-unknown`
171
+
172
+ ### Added
173
+
86
174
  - [eslint] Make use of [`destructuredArrayIgnorePattern`](https://eslint.org/docs/rules/no-unused-vars#destructuredarrayignorepattern) of `@typescript-eslint/no-unused-vars` rule, to ignore variables with leading underscore.
87
175
  - [stylelint] Make use of [`declaration-property-max-values`](https://stylelint.io/user-guide/rules/list/declaration-property-max-values/) rule, and set `unprefixed-property-name` to `4`
88
- - [stylelint] Replace `function-no-unknown` by `scss/function-no-unknown`
89
176
 
90
177
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.11.1...v2.12.0)
91
178
 
@@ -126,8 +213,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
126
213
  ### Changed
127
214
 
128
215
  - [stylelint] Remove `"before-comment"` exception in `scss/dollar-variable-empty-line-after` rule
129
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.12.1` to `5.14.0`
130
- - [eslint] Updated `@typescript-eslint/parser` from `5.12.1` to `5.14.0`
216
+ - [eslint] Updated `@typescript-eslint` from `5.12.1` to `5.14.0`
131
217
  - [eslint] Updated `eslint` from `8.9.0` to `8.10.0`
132
218
  - [eslint] Updated `eslint-plugin-jsdoc` from `37.9.4` to `37.9.7`
133
219
  - [eslint] Updated `eslint-plugin-react` from `7.28.0` to `7.29.3`
@@ -147,7 +233,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
147
233
 
148
234
  ### Changed
149
235
 
150
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.12.0 to v5.12.1
236
+ - [eslint] Updated `@typescript-eslint` from v5.12.0 to v5.12.1
151
237
  - [stylelint] Updated `stylelint` from v14.5.1 to v14.5.2
152
238
  - [eslint] Re-activated `@typescript-eslint/no-unnecessary-type-arguments` since the false positives with `React.FunctionComponent` generics has been fixed.
153
239
 
@@ -224,8 +310,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
224
310
 
225
311
  ### Changed
226
312
 
227
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.11.0 to v5.12.0
228
- - [eslint] Updated `@typescript-eslint/parser` from v5.11.0 to v5.12.0
313
+ - [eslint] Updated `@typescript-eslint` from v5.11.0 to v5.12.0
229
314
  - [eslint] Updated `eslint` from v8.8.0 to v8.9.0
230
315
  - [eslint] Updated `eslint-plugin-jsdoc` from v37.8.2 to v37.9.1
231
316
  - [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)
@@ -246,7 +331,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
246
331
 
247
332
  ### Changed
248
333
 
249
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v5.10.1 to v5.11.0
334
+ - [eslint] Updated `@typescript-eslint` from v5.10.1 to v5.11.0
250
335
  - [eslint] Updated `eslint` from v8.7.0 to v8.8.0
251
336
  - [eslint] Updated `eslint-plugin-functional` from v4.1.1 to v4.2.0
252
337
  - [eslint] Updated `eslint-plugin-jest` from v26.0.0 to v26.1.0
@@ -521,7 +606,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
521
606
 
522
607
  ### Changed
523
608
 
524
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v4.26.0 to v4.26.1
609
+ - [eslint] Updated `@typescript-eslint` from v4.26.0 to v4.26.1
525
610
  - [eslint] Activated `allowComputed` of [`import/namespace`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/namespace.md) rule
526
611
 
527
612
  ### Fixed
@@ -549,7 +634,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
549
634
 
550
635
  ### Changed
551
636
 
552
- - [eslint] Updated `@typescript-eslint/eslint-plugin` from v4.25.0 to v4.26.0
637
+ - [eslint] Updated `@typescript-eslint` from v4.25.0 to v4.26.0
553
638
  - [eslint] Updated `eslint-plugin-import` from v2.23.3 to v2.23.4
554
639
  - [eslint] Updated `eslint-plugin-jsdoc` from v35.0.0 to v35.1.2
555
640
  - [eslint] Updated `eslint-plugin-react` from v7.23.2 to v7.24.0
@@ -641,7 +726,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
641
726
 
642
727
  ### Changed
643
728
 
644
- - [eslint] Updated `@typescript-eslint/parser` from v4.22.0 to v4.23.0
729
+ - [eslint] Updated `@typescript-eslint` from v4.22.0 to v4.23.0
645
730
  - [eslint] Updated `eslint` from v7.25.0 to v7.26.0
646
731
  - [eslint] Updated `eslint-plugin-jsdoc` from v33.0.0 to v34.0.2
647
732
  - [eslint] Updated `eslint-plugin-unicorn` from v31.0.0 to v32.0.1
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,16 +145,17 @@ 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': 'off', // Should be covered by boolean-types in TypeScript, otherwise unnecessary type-castings from boolean to boolean would be required
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 }],
156
157
  'react/jsx-no-undef': 'error',
157
- 'react/jsx-no-useless-fragment': 'error',
158
+ 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
158
159
  'react/jsx-one-expression-per-line': ['off', { allow: 'single-child' }], // @todo Doesn't work with something like "Text <a href="...">Link</a> More Text", which should be valid
159
160
  'react/jsx-curly-brace-presence': ['error', { propElementValues: 'always' }],
160
161
  'react/jsx-fragments': ['error', 'element'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.15.0",
3
+ "version": "2.18.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.33.1",
44
+ "@typescript-eslint/parser": "5.33.1",
45
+ "eslint": "8.22.0",
46
+ "eslint-import-resolver-typescript": "3.4.2",
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.8.3",
52
+ "eslint-plugin-jsdoc": "39.3.6",
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.10.0",
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.6",
75
75
  "@types/micromatch": "4.0.2",
76
- "@types/node": "17.0.31",
76
+ "@types/node": "18.7.6",
77
77
  "stylelint-find-new-rules": "4.0.0",
78
- "typescript": "4.6.4"
78
+ "typescript": "4.7.4"
79
79
  }
80
80
  }
@@ -68,6 +68,7 @@ module.exports = {
68
68
  * @see https://github.com/stylelint/stylelint/tree/master/lib/rules
69
69
  */
70
70
  'alpha-value-notation': 'number', // @todo change that to 'percentage'?
71
+ 'annotation-no-unknown': true,
71
72
  'at-rule-allowed-list': null,
72
73
  'at-rule-disallowed-list': null,
73
74
  'at-rule-empty-line-before': [
@@ -193,9 +194,11 @@ module.exports = {
193
194
  'function-url-scheme-allowed-list': null,
194
195
  'function-whitespace-after': 'always',
195
196
  'hue-degree-notation': 'number', // @todo change that to 'angle'?
197
+ '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
198
  'indentation': 'tab',
197
199
  'keyframe-block-no-duplicate-selectors': true,
198
200
  'keyframe-declaration-no-important': true,
201
+ 'keyframe-selector-notation': 'percentage',
199
202
  'keyframes-name-pattern': '^[a-z]+(-[a-z]+)*\\d*$',
200
203
  'length-zero-no-unit': true,
201
204
  'linebreaks': 'unix',
@@ -951,9 +954,11 @@ module.exports = {
951
954
  'border-right', // "border-inline-end" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-end
952
955
  'border-right-color', // "border-inline-end-color" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-end-color
953
956
 
957
+ 'margin',
954
958
  'margin-top',
955
959
  'margin-bottom',
956
960
 
961
+ 'padding',
957
962
  'padding-top',
958
963
  'padding-bottom',
959
964
 
@@ -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) => {