linter-bundle 2.17.0 → 2.20.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,19 +6,80 @@ 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.17.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.20.0...HEAD)
10
10
 
11
- ## [2.17.0] - 2022.08.10
11
+ ## [2.20.0] - 2022-09-01
12
+
13
+ ### Changed
14
+
15
+ - [eslint] Updated `@typescript-eslint` from `5.35.1` to `5.36.1`
16
+ - [eslint] Updated `eslint-plugin-jest` from `26.9.0` to `27.0.1`
17
+
18
+ ### Removed
19
+
20
+ - [eslint/overrides-jest] Removed deprecated `jest/no-jest-import`
21
+
22
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.19.0...v2.20.0)
23
+
24
+ ## [2.19.0] - 2022-08-28
25
+
26
+ ### Changed
27
+
28
+ - [eslint] Updated `@typescript-eslint` from `5.33.1` to `5.35.1`
29
+ - [eslint] Updated `eslint` from `8.22.0` to `8.23.0`
30
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.4.2` to `3.5.0`
31
+ - [eslint] Updated `eslint-plugin-jest` from `26.8.3` to `26.9.0`
32
+ - [eslint] Updated `eslint-plugin-promise` from `6.0.0` to `6.0.1`
33
+ - [eslint] Updated `eslint-plugin-react` from `7.30.1` to `7.31.1`
34
+ - [markdownlint] Updated `markdownlint-cli` from `0.32.1` to `0.32.2`
35
+ - [stylelint] Updated `stylelint` from `14.10.0` to `14.11.0`
36
+ - [eslint] Activate [`allowEmptyCase`](https://github.com/eslint/eslint/blob/main/docs/src/rules/no-fallthrough.md#allowemptycase) option of `no-fallthrough` rule
37
+ - [stylelint] Activate [`ignoreAfterCombinators: ['>', '+']`](https://stylelint.io/user-guide/rules/list/selector-max-universal/#ignoreaftercombinators-array-of-combinators) of `selector-max-universal` rule, see [this issue](https://github.com/stylelint/stylelint/issues/5792) for details
38
+
39
+ ### Added
40
+
41
+ - [eslint/overrides-jest] Make use of [jest/prefer-each](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-each.md) rule
42
+
43
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.18.0...v2.19.0)
44
+
45
+ ## [2.18.0] - 2022-08-19
46
+
47
+ ### Changed
48
+
49
+ - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.33.0` to `5.33.1`
50
+ - [eslint] Updated `eslint` from `8.21.0` to `8.22.0`
51
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.4.0` to `3.4.2`
52
+ - [eslint] Updated `eslint-plugin-jest` from `26.8.2` to `26.8.3`
53
+ - [stylelint] Updated `stylelint` from `14.9.1` to `14.10.0`
54
+ - [eslint/overrides-react] Activate [`allowExpressions`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md#allowexpressions) for
55
+ [`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
56
+ requirement that when a component returns only children (a ReactNode), the return value is a ReactElement by wrapping children in a React.Fragment
57
+
58
+ ### Added
59
+
60
+ - [stylelint] Make use of [`annotation-no-unknown`](https://github.com/stylelint/stylelint/tree/main/lib/rules/annotation-no-unknown) rule
61
+ - [stylelint] Make use of [`keyframe-selector-notation`](https://github.com/stylelint/stylelint/tree/main/lib/rules/keyframe-selector-notation) rule, with option `percentage`
62
+
63
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.17.0...v2.18.0)
64
+
65
+ ## [2.17.0] - 2022-08-10
66
+
67
+ ### Changed
12
68
 
13
69
  - [eslint] Updated `@typescript-eslint/eslint-plugin` from `5.32.0` to `5.33.0`
14
70
  - [eslint] Updated `eslint-plugin-jest` from `26.7.0` to `26.8.2`
15
71
  - [eslint] Updated `eslint-plugin-jsdoc` from `39.3.4` to `39.3.6`
72
+
73
+ ### Fixed
74
+
16
75
  - [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
17
76
  - [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;`
18
77
 
19
78
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.16.0...v2.17.0)
20
79
 
21
- ## [2.16.0] - 2022.08.05
80
+ ## [2.16.0] - 2022-08-05
81
+
82
+ ### Changed
22
83
 
23
84
  - [eslint] Updated `eslint` from `8.14.0` to `8.21.0`
24
85
  - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.1` to `3.4.0`
@@ -30,7 +91,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
30
91
  - [eslint] Updated `eslint-plugin-react-hooks` from `4.5.0` to `4.6.0`
31
92
  - [eslint] Updated `eslint-plugin-unicorn` from `42.0.0` to `43.0.2`
32
93
  - [eslint] Updated `@typescript-eslint` from `5.22.0` to `5.32.0`
33
- - [eslint] Remove deprecated `@typescript-eslint/no-duplicate-imports` rule
94
+ - [markdownlint] Updated `markdownlint-cli` from `0.31.1` to `0.32.1`
95
+ - [stylelint] Updated `stylelint` from `14.8.2` to `14.9.1`
96
+ - [stylelint] Updated `stylelint-scss` from `4.2.0` to `4.3.0`
97
+ - [stylelint] Updated `stylelint-selector-no-empty` from `1.0.8` to `1.0.9`
98
+ - [stylelint] Updated `stylelint-use-logical-spec` from `3.2.2` to `4.1.0`
99
+
100
+ ### Added
101
+
34
102
  - [eslint] Make use of [`@typescript-eslint/no-restricted-imports`](https://typescript-eslint.io/rules/no-restricted-imports/) rule
35
103
  - [eslint] Make use of [`@typescript-eslint/space-infix-ops`](https://typescript-eslint.io/rules/space-infix-ops/) rule
36
104
  - [eslint] Make use of [`@typescript-eslint/consistent-generic-constructors`](https://typescript-eslint.io/rules/consistent-generic-constructors/) rule
@@ -40,28 +108,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
40
108
  - [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
41
109
  - [eslint] Added but disable [`unicorn/prefer-event-target`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md) rule
42
110
  - [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
43
- - [eslint] Remove deprecated `unicorn/import-index` rule
44
- - [markdownlint] Updated `markdownlint-cli` from `0.31.1` to `0.32.1`
45
- - [stylelint] Updated `stylelint` from `14.8.2` to `14.9.1`
46
- - [stylelint] Updated `stylelint-scss` from `4.2.0` to `4.3.0`
47
- - [stylelint] Updated `stylelint-selector-no-empty` from `1.0.8` to `1.0.9`
48
- - [stylelint] Updated `stylelint-use-logical-spec` from `3.2.2` to `4.1.0`
49
111
  - [stylelint] Added but disable [`import-notation`](https://github.com/stylelint/stylelint/tree/main/lib/rules/import-notation) rule
50
112
 
113
+ ### Removed
114
+
115
+ - [eslint] Remove deprecated `@typescript-eslint/no-duplicate-imports` rule
116
+ - [eslint] Remove deprecated `unicorn/import-index` rule
117
+
51
118
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.15.0...v2.16.0)
52
119
 
53
120
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.15.0...v2.16.0)
54
121
 
55
- ## [2.15.0] - 2022.05.05
122
+ ## [2.15.0] - 2022-05-05
56
123
 
57
- ### Changed
124
+ ### Fixed
58
125
 
59
126
  - [stylelint] Disabled `declaration-property-max-values` rule because of false-positives.
60
127
  - [stylelint] Disabled `selector-not-notation` for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
61
128
 
62
129
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.14.1...v2.15.0)
63
130
 
64
- ## [2.14.1] - 2022.05.05
131
+ ## [2.14.1] - 2022-05-05
65
132
 
66
133
  ### Fixed
67
134
 
@@ -69,27 +136,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
69
136
 
70
137
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.14.0...v2.14.1)
71
138
 
72
- ## [2.14.0] - 2022.05.05
139
+ ## [2.14.0] - 2022-05-05
73
140
 
74
141
  ### Changed
75
142
 
76
- - [general] Remove files from npm package which are only necessary for development
77
143
  - [eslint] Updated `@typescript-eslint` from `5.21.0` to `5.22.0`
78
144
  - [eslint] Updated `eslint-plugin-jsdoc` from `39.2.8` to `39.2.9`
79
145
  - [eslint] Updated `eslint-plugin-react-hooks` from `4.4.0` to `4.5.0`
80
146
  - [stylelint] Updated `stylelint` from `14.7.1` to `14.8.2`
147
+
148
+ ### Added
149
+
81
150
  - [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
82
151
  - [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
83
152
  - [stylelint] In the deployment process, ensure that the used Stylelint options are valid
153
+
154
+ ### Fixed
155
+
156
+ - [general] Remove files from npm package which are only necessary for development
84
157
  - [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
85
158
 
86
159
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.13.0...v2.14.0)
87
160
 
88
- ## [2.13.0] - 2022.04.25
161
+ ## [2.13.0] - 2022-04-25
89
162
 
90
163
  ### Changed
91
164
 
92
- - [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
93
165
  - [eslint] Updated `@typescript-eslint` from `5.17.0` to `5.21.0`
94
166
  - [eslint] Updated `eslint` from `8.12.0` to `8.14.0`
95
167
  - [eslint] Updated `eslint-import-resolver-typescript` from `2.7.0` to `2.7.1`
@@ -100,18 +172,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
100
172
  - [eslint] Updated `eslint-plugin-unicorn` from `41.0.1` to `42.0.0`
101
173
  - [stylelint] Updated `postcss-scss` from `4.0.3` to `4.0.4`
102
174
  - [stylelint] Updated `stylelint` from `14.6.1` to `14.7.1`
103
- - [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
104
175
  - [eslint/overrides-jsdoc] Set [`minLineCount` option to 2](https://github.com/gajus/eslint-plugin-jsdoc/issues/870) for `require-jsdoc` rule
176
+ - [stylelint] Set [`selector-not-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-not-notation/README.md) rule to `"complex"`
177
+
178
+ ### Added
179
+
180
+ - [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
105
181
  - [eslint] Reactivated the [`import/no-relative-packages`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-relative-packages.md) rule
106
182
  - [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
107
183
  - [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
108
184
  - [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
109
185
  - [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
110
- - [stylelint] Set [`selector-not-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-not-notation/README.md) rule to `"complex"`
111
186
 
112
187
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.12.0...v2.13.0)
113
188
 
114
- ## [2.12.0] - 2022.03.30
189
+ ## [2.12.0] - 2022-03-30
115
190
 
116
191
  ### Changed
117
192
 
@@ -126,13 +201,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
126
201
  - [stylelint] Updated `stylelint` from `14.5.3` to `14.6.1`
127
202
  - [stylelint] Updated `stylelint-scss` from `4.1.0` to `4.2.0`
128
203
  - [general] Updated `micromatch` from `4.0.4` to `4.0.5`
204
+ - [stylelint] Replace `function-no-unknown` by `scss/function-no-unknown`
205
+
206
+ ### Added
207
+
129
208
  - [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.
130
209
  - [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`
131
- - [stylelint] Replace `function-no-unknown` by `scss/function-no-unknown`
132
210
 
133
211
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.11.1...v2.12.0)
134
212
 
135
- ## [2.11.1] - 2022.03.13
213
+ ## [2.11.1] - 2022-03-13
136
214
 
137
215
  ### Changed
138
216
 
@@ -141,7 +219,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
141
219
 
142
220
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.11.0...v2.11.1)
143
221
 
144
- ## [2.11.0] - 2022.03.12
222
+ ## [2.11.0] - 2022-03-12
145
223
 
146
224
  ### Added
147
225
 
@@ -156,7 +234,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
156
234
 
157
235
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.10.1...v2.11.0)
158
236
 
159
- ## [2.10.1] - 2022.03.11
237
+ ## [2.10.1] - 2022-03-11
160
238
 
161
239
  ### Fixed
162
240
 
@@ -164,7 +242,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
164
242
 
165
243
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.10.0...v2.10.1)
166
244
 
167
- ## [2.10.0] - 2022.03.10
245
+ ## [2.10.0] - 2022-03-10
168
246
 
169
247
  ### Changed
170
248
 
@@ -185,7 +263,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
185
263
 
186
264
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.9.0...v2.10.0)
187
265
 
188
- ## [2.9.0] - 2022.02.23
266
+ ## [2.9.0] - 2022-02-23
189
267
 
190
268
  ### Changed
191
269
 
@@ -200,7 +278,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
200
278
 
201
279
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.8.4...v2.9.0)
202
280
 
203
- ## [2.8.4] - 2022.02.19
281
+ ## [2.8.4] - 2022-02-19
204
282
 
205
283
  ### Changed
206
284
 
@@ -208,7 +286,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
208
286
 
209
287
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.8.3...v2.8.4)
210
288
 
211
- ## [2.8.3] - 2022.02.19
289
+ ## [2.8.3] - 2022-02-19
212
290
 
213
291
  ### Changed
214
292
 
@@ -216,7 +294,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
216
294
 
217
295
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.8.2...v2.8.3)
218
296
 
219
- ## [2.8.2] - 2022.02.19
297
+ ## [2.8.2] - 2022-02-19
220
298
 
221
299
  ### Changed
222
300
 
@@ -224,7 +302,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
224
302
 
225
303
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.8.1...v2.8.2)
226
304
 
227
- ## [2.8.1] - 2022.02.19
305
+ ## [2.8.1] - 2022-02-19
228
306
 
229
307
  ### Changed
230
308
 
@@ -232,7 +310,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
232
310
 
233
311
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.8.0...v2.8.1)
234
312
 
235
- ## [2.8.0] - 2022.02.18
313
+ ## [2.8.0] - 2022-02-18
236
314
 
237
315
  ### Changed
238
316
 
@@ -249,7 +327,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
249
327
 
250
328
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.7.0...v2.8.0)
251
329
 
252
- ## [2.7.0] - 2022.02.16
330
+ ## [2.7.0] - 2022-02-16
253
331
 
254
332
  ### Changed
255
333
 
@@ -262,7 +340,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
262
340
 
263
341
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.6.0...v2.7.0)
264
342
 
265
- ## [2.6.0] - 2022.02.14
343
+ ## [2.6.0] - 2022-02-14
266
344
 
267
345
  ### Changed
268
346
 
@@ -273,7 +351,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
273
351
 
274
352
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.5.0...v2.6.0)
275
353
 
276
- ## [2.5.0] - 2022.02.11
354
+ ## [2.5.0] - 2022-02-11
277
355
 
278
356
  ### Changed
279
357
 
@@ -283,7 +361,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
283
361
 
284
362
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.4.0...v2.5.0)
285
363
 
286
- ## [2.4.0] - 2022.02.09
364
+ ## [2.4.0] - 2022-02-09
287
365
 
288
366
  ### Changed
289
367
 
@@ -306,7 +384,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
306
384
 
307
385
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.3.1...v2.4.0)
308
386
 
309
- ## [2.3.1] - 2022.01.28
387
+ ## [2.3.1] - 2022-01-28
310
388
 
311
389
  ### Fixed
312
390
 
@@ -322,7 +400,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
322
400
 
323
401
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.3.0...v2.3.1)
324
402
 
325
- ## [2.3.0] - 2022.01.27
403
+ ## [2.3.0] - 2022-01-27
326
404
 
327
405
  ### Changed
328
406
 
@@ -366,7 +444,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
366
444
 
367
445
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.1.0...v2.3.0)
368
446
 
369
- ## [2.1.0] - 2021.11.07
447
+ ## [2.1.0] - 2021-11-07
370
448
 
371
449
  ### Changed
372
450
 
@@ -375,7 +453,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
375
453
 
376
454
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.0.0...v2.1.0)
377
455
 
378
- ## [2.0.0] - 2021.11.05
456
+ ## [2.0.0] - 2021-11-05
379
457
 
380
458
  ### Removed
381
459
 
@@ -429,7 +507,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
429
507
 
430
508
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.28.0...v2.0.0)
431
509
 
432
- ## [1.28.0] - 2021.09.18
510
+ ## [1.28.0] - 2021-09-18
433
511
 
434
512
  ### Changed
435
513
 
@@ -442,7 +520,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
442
520
 
443
521
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.27.0...v1.28.0)
444
522
 
445
- ## [1.27.0] - 2021.09.12
523
+ ## [1.27.0] - 2021-09-12
446
524
 
447
525
  ### Changed
448
526
 
@@ -460,7 +538,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
460
538
 
461
539
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.26.0...v1.27.0)
462
540
 
463
- ## [1.26.0] - 2021.08.29
541
+ ## [1.26.0] - 2021-08-29
464
542
 
465
543
  ### Changed
466
544
 
@@ -474,13 +552,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
474
552
 
475
553
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.25.2...v1.26.0)
476
554
 
477
- ## [1.25.2] - 2021.08.27
555
+ ## [1.25.2] - 2021-08-27
478
556
 
479
557
  - [eslint] Disabled `@typescript-eslint/no-implicit-any-catch` because of false-positive with the new TypeScript 4.4 option "useUnknownInCatchVariables"
480
558
 
481
559
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.25.1...v1.25.2)
482
560
 
483
- ## [1.25.1] - 2021.08.25
561
+ ## [1.25.1] - 2021-08-25
484
562
 
485
563
  ### Fixed
486
564
 
@@ -493,7 +571,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
493
571
 
494
572
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.25.0...v1.25.1)
495
573
 
496
- ## [1.25.0] - 2021.08.24
574
+ ## [1.25.0] - 2021-08-24
497
575
 
498
576
  ### Changed
499
577
 
@@ -517,7 +595,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
517
595
 
518
596
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.24.0...v1.25.0)
519
597
 
520
- ## [1.24.0] - 2021.07.28
598
+ ## [1.24.0] - 2021-07-28
521
599
 
522
600
  ### Changed
523
601
 
@@ -541,7 +619,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
541
619
 
542
620
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.23.0...v1.24.0)
543
621
 
544
- ## [1.23.0] - 2021.06.14
622
+ ## [1.23.0] - 2021-06-14
545
623
 
546
624
  ### Changed
547
625
 
@@ -550,7 +628,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
550
628
 
551
629
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.22.3...v1.23.0)
552
630
 
553
- ## [1.22.3] - 2021.06.08
631
+ ## [1.22.3] - 2021-06-08
554
632
 
555
633
  ### Added
556
634
 
@@ -558,7 +636,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
558
636
 
559
637
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.22.2...v1.22.3)
560
638
 
561
- ## [1.22.2] - 2021.06.08
639
+ ## [1.22.2] - 2021-06-08
562
640
 
563
641
  ### Changed
564
642
 
@@ -571,7 +649,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
571
649
 
572
650
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.22.1...v1.22.2)
573
651
 
574
- ## [1.22.1] - 2021.06.07
652
+ ## [1.22.1] - 2021-06-07
575
653
 
576
654
  ### Changed
577
655
 
@@ -586,7 +664,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
586
664
 
587
665
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.22.0...v1.22.1)
588
666
 
589
- ## [1.22.0] - 2021.06.02
667
+ ## [1.22.0] - 2021-06-02
590
668
 
591
669
  ### Changed
592
670
 
@@ -607,7 +685,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
607
685
 
608
686
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.21.0...v1.22.0)
609
687
 
610
- ## [1.21.0] - 2021.05.27
688
+ ## [1.21.0] - 2021-05-27
611
689
 
612
690
  ### Changed
613
691
 
@@ -617,7 +695,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
617
695
 
618
696
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.20.0...v1.21.0)
619
697
 
620
- ## [1.20.0] - 2021.05.22
698
+ ## [1.20.0] - 2021-05-22
621
699
 
622
700
  ### Changed
623
701
 
@@ -629,7 +707,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
629
707
 
630
708
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.19.0...v1.20.0)
631
709
 
632
- ## [1.19.0] - 2021.05.18
710
+ ## [1.19.0] - 2021-05-18
633
711
 
634
712
  ### Changed
635
713
 
@@ -637,7 +715,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
637
715
 
638
716
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.18.0...v1.19.0)
639
717
 
640
- ## [1.18.0] - 2021.05.17
718
+ ## [1.18.0] - 2021-05-17
641
719
 
642
720
  ### Added
643
721
 
@@ -653,7 +731,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
653
731
 
654
732
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.17.0...v1.18.0)
655
733
 
656
- ## [1.17.0] - 2021.05.15
734
+ ## [1.17.0] - 2021-05-15
657
735
 
658
736
  ### Added
659
737
 
@@ -673,7 +751,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
673
751
 
674
752
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.16.0...v1.17.0)
675
753
 
676
- ## [1.16.0] - 2021.05.12
754
+ ## [1.16.0] - 2021-05-12
677
755
 
678
756
  ### Added
679
757
 
package/eslint/index.js CHANGED
@@ -173,7 +173,7 @@ module.exports = {
173
173
  'no-extend-native': 'error',
174
174
  'no-extra-bind': 'error',
175
175
  'no-extra-label': 'error',
176
- 'no-fallthrough': 'error',
176
+ 'no-fallthrough': ['error', { allowEmptyCase: true }],
177
177
  'no-floating-decimal': 'error',
178
178
  'no-global-assign': 'error',
179
179
  'no-implicit-coercion': ['error', { disallowTemplateShorthand: true }],
@@ -78,7 +78,6 @@ module.exports = {
78
78
  'jest/no-identical-title': 'error',
79
79
  'jest/no-interpolation-in-snapshots': 'error',
80
80
  'jest/no-jasmine-globals': 'error',
81
- 'jest/no-jest-import': 'error',
82
81
  'jest/no-large-snapshots': 'error',
83
82
  'jest/no-mocks-import': 'error',
84
83
  'jest/no-restricted-matchers': ['error', {
@@ -97,6 +96,7 @@ module.exports = {
97
96
  'jest/prefer-hooks-in-order': 'error',
98
97
  'jest/prefer-hooks-on-top': 'error',
99
98
  'jest/prefer-comparison-matcher': 'error',
99
+ 'jest/prefer-each': 'error',
100
100
  'jest/prefer-equality-matcher': 'error',
101
101
  'jest/prefer-mock-promise-shorthand': 'error',
102
102
  'jest/prefer-snapshot-hint': 'error',
@@ -155,7 +155,7 @@ module.exports = {
155
155
  'react/jsx-no-script-url': 'error',
156
156
  'react/jsx-no-target-blank': ['error', { allowReferrer: true, forms: true }],
157
157
  'react/jsx-no-undef': 'error',
158
- 'react/jsx-no-useless-fragment': 'error',
158
+ 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
159
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
160
160
  'react/jsx-curly-brace-presence': ['error', { propElementValues: 'always' }],
161
161
  'react/jsx-fragments': ['error', 'element'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.17.0",
3
+ "version": "2.20.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,26 +40,26 @@
40
40
  "check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
41
41
  },
42
42
  "dependencies": {
43
- "@typescript-eslint/eslint-plugin": "5.33.0",
44
- "@typescript-eslint/parser": "5.33.0",
45
- "eslint": "8.21.0",
46
- "eslint-import-resolver-typescript": "3.4.0",
43
+ "@typescript-eslint/eslint-plugin": "5.36.1",
44
+ "@typescript-eslint/parser": "5.36.1",
45
+ "eslint": "8.23.0",
46
+ "eslint-import-resolver-typescript": "3.5.0",
47
47
  "eslint-import-resolver-webpack": "0.13.2",
48
48
  "eslint-plugin-eslint-comments": "3.2.0",
49
49
  "eslint-plugin-functional": "4.2.2",
50
50
  "eslint-plugin-import": "2.26.0",
51
- "eslint-plugin-jest": "26.8.2",
51
+ "eslint-plugin-jest": "27.0.1",
52
52
  "eslint-plugin-jsdoc": "39.3.6",
53
53
  "eslint-plugin-jsx-a11y": "6.6.1",
54
54
  "eslint-plugin-node": "11.1.0",
55
- "eslint-plugin-promise": "6.0.0",
56
- "eslint-plugin-react": "7.30.1",
55
+ "eslint-plugin-promise": "6.0.1",
56
+ "eslint-plugin-react": "7.31.1",
57
57
  "eslint-plugin-react-hooks": "4.6.0",
58
58
  "eslint-plugin-unicorn": "43.0.2",
59
- "markdownlint-cli": "0.32.1",
59
+ "markdownlint-cli": "0.32.2",
60
60
  "micromatch": "4.0.5",
61
61
  "postcss-scss": "4.0.4",
62
- "stylelint": "14.9.1",
62
+ "stylelint": "14.11.0",
63
63
  "stylelint-declaration-block-no-ignored-properties": "2.5.0",
64
64
  "stylelint-order": "5.0.0",
65
65
  "stylelint-scss": "4.3.0",
@@ -71,10 +71,10 @@
71
71
  "typescript": "^4.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/eslint": "8.4.5",
74
+ "@types/eslint": "8.4.6",
75
75
  "@types/micromatch": "4.0.2",
76
- "@types/node": "18.6.5",
76
+ "@types/node": "18.7.14",
77
77
  "stylelint-find-new-rules": "4.0.0",
78
- "typescript": "4.7.4"
78
+ "typescript": "4.8.2"
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': [
@@ -197,6 +198,7 @@ module.exports = {
197
198
  'indentation': 'tab',
198
199
  'keyframe-block-no-duplicate-selectors': true,
199
200
  'keyframe-declaration-no-important': true,
201
+ 'keyframe-selector-notation': 'percentage',
200
202
  'keyframes-name-pattern': '^[a-z]+(-[a-z]+)*\\d*$',
201
203
  'length-zero-no-unit': true,
202
204
  'linebreaks': 'unix',
@@ -288,7 +290,7 @@ module.exports = {
288
290
  }
289
291
  ],
290
292
  'selector-max-type': 6,
291
- 'selector-max-universal': 1,
293
+ 'selector-max-universal': [1, { ignoreAfterCombinators: ['>', '+'] }],
292
294
  'selector-nested-pattern': null,
293
295
  'selector-no-qualifying-type': [true, { ignore: ['attribute', 'class'] }],
294
296
  'selector-no-vendor-prefix': true,
@@ -122,12 +122,12 @@ const propsThatCausePaint = [
122
122
  ];
123
123
 
124
124
  /**
125
- * Get blacklisted properties.
125
+ * Get disallowed properties.
126
126
  *
127
127
  * @param {string} ignore - Property name.
128
- * @returns {string[]} - Array of blacklisted properties.
128
+ * @returns {string[]} - Array of disallowed properties.
129
129
  */
130
- const getBlacklist = (ignore) => {
130
+ const getDisallowedList = (ignore) => {
131
131
  if (ignore === 'paint-properties') {
132
132
  return propertiesThatCauseLayout;
133
133
  }
@@ -146,128 +146,131 @@ const getBlacklist = (ignore) => {
146
146
  */
147
147
  const unprefixed = (property) => property.replace(/^-\w+-/u, '');
148
148
 
149
- module.exports = stylelint.createPlugin(
150
- ruleName,
151
- (actual, options) => (cssRoot, result) => {
152
- const validOptions = stylelint.utils.validateOptions(
153
- result,
154
- ruleName,
155
- { actual },
156
- {
157
- actual: options,
158
- possible: {
159
- ignore: ['paint-properties'],
160
- ignoreProperties: [isString]
161
- },
162
- optional: true
163
- }
164
- );
149
+ /**
150
+ * Rule function.
151
+ *
152
+ * @param {Record<string, any>} actual - Primary options
153
+ * @param {Record<string, any>} options - Secondary options
154
+ * @returns {(root: import('postcss').Root, result: import('stylelint').PostcssResult) => Promise<void> | void} PostCSS plugin
155
+ */
156
+ const ruleFunction = (actual, options) => (cssRoot, result) => {
157
+ const validOptions = stylelint.utils.validateOptions(
158
+ result,
159
+ ruleName,
160
+ { actual },
161
+ {
162
+ actual: options,
163
+ possible: {
164
+ ignore: ['paint-properties'],
165
+ ignoreProperties: [isString]
166
+ },
167
+ optional: true
168
+ }
169
+ );
165
170
 
166
- if (!validOptions) { return; }
171
+ if (!validOptions) { return; }
167
172
 
168
- // @ts-expect-error -- Property 'ignore' comes from an index signature, so it must be accessed with ['ignore'].
169
- const blacklist = getBlacklist(options.ignore);
170
- // @ts-expect-error -- Property 'ignoreProperties' comes from an index signature, so it must be accessed with ['ignoreProperties'].
171
- const ignored = options.ignoreProperties ?? [];
173
+ const disallowedList = getDisallowedList(options['ignore']);
174
+ const ignored = options['ignoreProperties'] ?? [];
172
175
 
173
- cssRoot.walkDecls('transition-property', (decl) => {
174
- valueParser(decl.value).walk((node) => {
175
- const value = unprefixed(node.value);
176
+ cssRoot.walkDecls('transition-property', (decl) => {
177
+ valueParser(decl.value).walk((node) => {
178
+ const value = unprefixed(node.value);
176
179
 
177
- if (
178
- node.type === 'word' &&
179
- !ignored.includes(value) &&
180
- (blacklist.includes(value) || value === 'all')
181
- ) {
182
- const index = declarationValueIndex(decl) + node.sourceIndex;
180
+ if (
181
+ node.type === 'word' &&
182
+ !ignored.includes(value) &&
183
+ (disallowedList.includes(value) || value === 'all')
184
+ ) {
185
+ const index = declarationValueIndex(decl) + node.sourceIndex;
183
186
 
184
- stylelint.utils.report({
185
- ruleName,
186
- result,
187
- node: decl,
188
- message: messages.rejected('transition', node.value),
189
- index
190
- });
191
- }
192
- });
187
+ stylelint.utils.report({
188
+ ruleName,
189
+ result,
190
+ node: decl,
191
+ message: messages.rejected('transition', node.value),
192
+ index
193
+ });
194
+ }
193
195
  });
196
+ });
194
197
 
195
- cssRoot.walkDecls('transition', (decl) => {
196
- /** @type {{ index: number; value: string; }[]} */
197
- const nodes = [];
198
+ cssRoot.walkDecls('transition', (decl) => {
199
+ /** @type {{ index: number; value: string; }[]} */
200
+ const nodes = [];
198
201
 
199
- valueParser(decl.value).walk((node) => {
200
- if (node.type === 'word' || node.type === 'function') {
201
- nodes.push({
202
- index: node.sourceIndex,
203
- value: node.value
204
- });
205
- }
202
+ valueParser(decl.value).walk((node) => {
203
+ if (node.type === 'word' || node.type === 'function') {
204
+ nodes.push({
205
+ index: node.sourceIndex,
206
+ value: node.value
207
+ });
208
+ }
206
209
 
207
- return false;
208
- });
210
+ return false;
211
+ });
212
+
213
+ if (!ignored.includes('all')) {
214
+ const transitionProp = nodes.filter((node) => {
215
+ const isUnit = valueParser.unit(node.value);
216
+ const isTimingFunction = cssTimingFunctionsRE.test(node.value);
209
217
 
210
- if (!ignored.includes('all')) {
211
- const transitionProp = nodes.filter((node) => {
212
- const isUnit = valueParser.unit(node.value);
213
- const isTimingFunction = cssTimingFunctionsRE.test(node.value);
218
+ if (isUnit || isTimingFunction) {
219
+ return false;
220
+ }
214
221
 
215
- if (isUnit || isTimingFunction) {
216
- return false;
217
- }
222
+ return node;
223
+ });
218
224
 
219
- return node;
225
+ if (nodes.length > 0 && transitionProp.length === 0) {
226
+ stylelint.utils.report({
227
+ ruleName,
228
+ result,
229
+ node: decl,
230
+ message: messages.rejected('transition', 'all'),
231
+ index: declarationValueIndex(decl) + nodes[0].index
220
232
  });
221
233
 
222
- if (nodes.length > 0 && transitionProp.length === 0) {
223
- stylelint.utils.report({
224
- ruleName,
225
- result,
226
- node: decl,
227
- message: messages.rejected('transition', 'all'),
228
- index: declarationValueIndex(decl) + nodes[0].index
229
- });
230
-
231
- return;
232
- }
234
+ return;
233
235
  }
236
+ }
234
237
 
235
- for (const property of nodes) {
236
- const index = declarationValueIndex(decl) + property.index;
237
- const value = unprefixed(property.value);
238
+ for (const property of nodes) {
239
+ const index = declarationValueIndex(decl) + property.index;
240
+ const value = unprefixed(property.value);
238
241
 
239
- if (
240
- !ignored.includes(value) &&
241
- (blacklist.includes(value) || value === 'all')
242
- ) {
243
- stylelint.utils.report({
244
- ruleName,
245
- result,
246
- node: decl,
247
- message: messages.rejected('transition', property.value),
248
- index
249
- });
250
- }
242
+ if (
243
+ !ignored.includes(value) &&
244
+ (disallowedList.includes(value) || value === 'all')
245
+ ) {
246
+ stylelint.utils.report({
247
+ ruleName,
248
+ result,
249
+ node: decl,
250
+ message: messages.rejected('transition', property.value),
251
+ index
252
+ });
251
253
  }
252
- });
254
+ }
255
+ });
253
256
 
254
- cssRoot.walkAtRules(/^keyframes$/iu, (atRuleKeyframes) => {
255
- atRuleKeyframes.walkDecls((decl) => {
256
- const value = unprefixed(decl.prop);
257
+ cssRoot.walkAtRules(/^keyframes$/iu, (atRuleKeyframes) => {
258
+ atRuleKeyframes.walkDecls((decl) => {
259
+ const value = unprefixed(decl.prop);
257
260
 
258
- if (!ignored.includes(value) && blacklist.includes(value)) {
259
- stylelint.utils.report({
260
- ruleName,
261
- result,
262
- node: decl,
263
- message: messages.rejected('animation', decl.prop)
264
- });
265
- }
266
- });
261
+ if (!ignored.includes(value) && disallowedList.includes(value)) {
262
+ stylelint.utils.report({
263
+ ruleName,
264
+ result,
265
+ node: decl,
266
+ message: messages.rejected('animation', decl.prop)
267
+ });
268
+ }
267
269
  });
268
- }
269
- );
270
+ });
271
+ };
272
+
273
+ ruleFunction.ruleName = ruleName;
274
+ ruleFunction.messages = messages;
270
275
 
271
- // @ts-expect-error -- Cannot assign to 'ruleName' because it is a read-only property.
272
- module.exports.ruleName = ruleName;
273
- module.exports.messages = messages;
276
+ module.exports = stylelint.createPlugin(ruleName, ruleFunction);