linter-bundle 2.25.2 → 2.27.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 +75 -6
- package/README.md +3 -3
- package/eslint/index.js +52 -14
- package/eslint/overrides-jest.js +37 -15
- package/eslint/overrides-jsdoc.js +3 -1
- package/eslint/overrides-react.js +7 -5
- package/helper/ensure-type.js +1 -1
- package/helper/find-missing-overrides.js +4 -4
- package/helper/is-npm-or-yarn.js +1 -1
- package/lint.js +12 -8
- package/package.json +21 -21
- package/stylelint/index.js +2 -0
- package/types.d.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,73 @@ 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.
|
|
9
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.27.0...HEAD)
|
|
10
|
+
|
|
11
|
+
## [2.27.0] - 2023-01-27
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- [eslint] Updated `@typescript-eslint` from `5.41.0` to `5.49.0`
|
|
16
|
+
- [eslint] Updated `eslint` from `8.26.0` to `8.32.0`
|
|
17
|
+
- [eslint] Updated `eslint-import-resolver-typescript` from `3.5.2` to `3.5.3`
|
|
18
|
+
- [eslint] Updated `eslint-plugin-import` from `2.26.0` to `2.27.5`
|
|
19
|
+
- [eslint] Updated `eslint-plugin-jest` from `27.1.3` to `27.2.1`
|
|
20
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from `39.3.25` to `39.6.9`
|
|
21
|
+
- [eslint] Updated `eslint-plugin-jsx-a11y` from `6.6.1` to `6.7.1`
|
|
22
|
+
- [eslint] Updated `eslint-plugin-n` from `15.3.0` to `15.6.1`
|
|
23
|
+
- [eslint] Updated `eslint-plugin-react` from `7.31.10` to `7.32.1`
|
|
24
|
+
- [eslint] Updated `eslint-plugin-unicorn` from `44.0.2` to `45.0.2`
|
|
25
|
+
- [markdownlint] Updated `markdownlint-cli` from `0.32.2` to `0.33.0`
|
|
26
|
+
- [stylelint] Updated `postcss-scss` from `4.0.5` to `4.0.6`
|
|
27
|
+
- [stylelint] Updated `stylelint` from `14.14.0` to `14.16.1`
|
|
28
|
+
- [stylelint] Updated `stylelint-order` from `5.0.0` to `6.0.1`
|
|
29
|
+
- [eslint] Define order for getters and setters and private fields of [`@typescript-eslint/member-ordering`](https://typescript-eslint.io/rules/member-ordering/) rule
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- [eslint] Added new [`no-empty-static-block`](https://eslint.org/docs/latest/rules/no-empty-static-block) rule
|
|
34
|
+
- [eslint] Added new [`no-new-native-nonconstructor`](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor) rule
|
|
35
|
+
- [eslint] Added new [`import/no-empty-named-blocks`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-empty-named-blocks.md) rule
|
|
36
|
+
- [eslint] Added new [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/consistent-type-specifier-style.md) rule, and used `"prefer-top-level"` option
|
|
37
|
+
- [eslint] Make use of new `alphabetize.orderImportKind` option of [`import/order`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md) rule, and set it to `"asc"`
|
|
38
|
+
- [eslint] Make use of new `distinctGroup` option of [`import/order`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md) rule, and set it to `false`
|
|
39
|
+
- [eslint] Make use of new `considerComments` option of [`import/newline-after-import`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md) rule, and set it to `true`
|
|
40
|
+
- [eslint] Added new [`unicorn/no-typeof-undefined`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md) rule
|
|
41
|
+
- [eslint] Added, but disabled new [`unicorn/no-negated-condition`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md) rule
|
|
42
|
+
- [eslint] Added new [`unicorn/prefer-set-size`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md) rule
|
|
43
|
+
- [eslint/overrides-jest] Added new [`jest/no-untyped-mock-factory`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-untyped-mock-factory.md) rule for TypeScript files
|
|
44
|
+
- [eslint/overrides-jsdoc] Activate `exemptDestructuredRootsFromChecks` setting for the rules [`jsdoc/require-param-type`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type) and
|
|
45
|
+
[`jsdoc/require-param-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-description)
|
|
46
|
+
- [eslint/overrides-jsdoc] Added, but disabled new [`jsdoc/text-escaping`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-text-escaping) rule
|
|
47
|
+
- [eslint/overrides-react] Added, but disabled new [`jsx-a11y/anchor-ambiguous-text`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-ambiguous-text.md) rule
|
|
48
|
+
- [eslint/overrides-react] Added new [`jsx-a11y/no-aria-hidden-on-focusable`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-aria-hidden-on-focusable.md) rule
|
|
49
|
+
- [eslint/overrides-react] Added new [`react/no-object-type-as-default-prop`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md) rule
|
|
50
|
+
- [eslint/overrides-react] Added new [`react/sort-default-props`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md) rule
|
|
51
|
+
- [eslint/overrides-react] Make use of new `allowDestructuredState` option of [`react/hook-use-state`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md) rule
|
|
52
|
+
- [stylelint] Added new [`media-feature-range-notation`](https://stylelint.io/user-guide/rules/media-feature-range-notation/) rule, and used `"prefix"` option
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- [general] Fix typo in `linterBundleSettings.overrides.general.additionalRest*r*ictions`
|
|
57
|
+
|
|
58
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.26.0...v2.27.0)
|
|
59
|
+
|
|
60
|
+
## [2.26.0] - 2022-10-27
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- [eslint] Updated `@typescript-eslint` from `5.40.1` to `5.41.0`
|
|
65
|
+
- [eslint] Updated `eslint` from `8.25.0` to `8.26.0`
|
|
66
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from `39.3.14` to `39.3.25`
|
|
67
|
+
- [stylelint] Updated `stylelint-declaration-block-no-ignored-properties` from `2.5.0` to `2.6.0`
|
|
68
|
+
- [stylelint] Grouped `hyphenate-character` below `hyphens` for `order/properties-order` rule
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
|
|
72
|
+
- [general] Stop execution on outdated "overrides"/"resolutions" in package.json
|
|
73
|
+
- [eslint] Make use of [`@typescript-eslint/no-unsafe-declaration-merging`](https://typescript-eslint.io/rules/no-unsafe-declaration-merging/) rule
|
|
74
|
+
|
|
75
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.25.2...v2.26.0)
|
|
10
76
|
|
|
11
77
|
## [2.25.2] - 2022-10-20
|
|
12
78
|
|
|
@@ -37,13 +103,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
37
103
|
- [eslint] Updated `eslint-plugin-react` from `7.31.8` to `7.31.10`
|
|
38
104
|
- [eslint] Updated `eslint-plugin-unicorn` from `43.0.2` to `44.0.2`
|
|
39
105
|
- [eslint] Moved `eslint-plugin-jsx-a11y` configuration to `eslint/overrides-react`
|
|
106
|
+
- [stylelint] Updated `stylelint` from `14.12.1` to `14.14.0`
|
|
107
|
+
- [stylelint] Ignore `!default` annotation in [`annotation-no-unknown`](https://stylelint.io/user-guide/rules/annotation-no-unknown/) rule
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
|
|
40
111
|
- [eslint] Added new [`logical-assignment-operators`](https://eslint.org/docs/latest/rules/logical-assignment-operators) rule with option `"always"`
|
|
41
112
|
- [eslint] Added new [`promise/no-multiple-resolved`](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md) rule
|
|
42
113
|
- [eslint] Make use of new [`unicorn/no-unnecessary-await`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md) rule
|
|
43
114
|
- [eslint] Make use of new [`unicorn/switch-case-braces`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md) rule with option `"avoid"`
|
|
44
115
|
- [eslint/overrides-jest] Added but disable new [`jest/no-restricted-jest-methods`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-jest-methods.md) rule
|
|
45
|
-
- [stylelint] Updated `stylelint` from `14.12.1` to `14.14.0`
|
|
46
|
-
- [stylelint] Ignore `!default` annotation in [`annotation-no-unknown`](https://stylelint.io/user-guide/rules/annotation-no-unknown/) rule
|
|
47
116
|
|
|
48
117
|
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.24.0...v2.25.0)
|
|
49
118
|
|
|
@@ -136,7 +205,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
136
205
|
|
|
137
206
|
### Changed
|
|
138
207
|
|
|
139
|
-
- [eslint] Updated `@typescript-eslint
|
|
208
|
+
- [eslint] Updated `@typescript-eslint` from `5.33.0` to `5.33.1`
|
|
140
209
|
- [eslint] Updated `eslint` from `8.21.0` to `8.22.0`
|
|
141
210
|
- [eslint] Updated `eslint-import-resolver-typescript` from `3.4.0` to `3.4.2`
|
|
142
211
|
- [eslint] Updated `eslint-plugin-jest` from `26.8.2` to `26.8.3`
|
|
@@ -156,7 +225,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
156
225
|
|
|
157
226
|
### Changed
|
|
158
227
|
|
|
159
|
-
- [eslint] Updated `@typescript-eslint
|
|
228
|
+
- [eslint] Updated `@typescript-eslint` from `5.32.0` to `5.33.0`
|
|
160
229
|
- [eslint] Updated `eslint-plugin-jest` from `26.7.0` to `26.8.2`
|
|
161
230
|
- [eslint] Updated `eslint-plugin-jsdoc` from `39.3.4` to `39.3.6`
|
|
162
231
|
|
|
@@ -781,7 +850,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
781
850
|
|
|
782
851
|
- [eslint] Updated `@typescript-eslint` from v4.24.0 to v4.25.0
|
|
783
852
|
- [eslint] Updated `eslint-plugin-jsdoc` from v34.8.2 to v35.0.0
|
|
784
|
-
- [eslint] Activated `ignoreNonDOM` option for `jsx-a11y/no-autofocus` rule
|
|
853
|
+
- [eslint] Activated `ignoreNonDOM` option for [`jsx-a11y/no-autofocus`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md) rule
|
|
785
854
|
|
|
786
855
|
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.20.0...v1.21.0)
|
|
787
856
|
|
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ global.linterBundleSettings = {
|
|
|
109
109
|
overrides: {
|
|
110
110
|
general: {
|
|
111
111
|
'no-restricted-globals': {
|
|
112
|
-
|
|
112
|
+
additionalRestrictions: [
|
|
113
113
|
{
|
|
114
114
|
name: 'fetch',
|
|
115
115
|
message: 'Use Utils.fetchWithTimeout() instead.'
|
|
@@ -117,7 +117,7 @@ global.linterBundleSettings = {
|
|
|
117
117
|
]
|
|
118
118
|
},
|
|
119
119
|
'no-restricted-properties': {
|
|
120
|
-
|
|
120
|
+
additionalRestrictions: [
|
|
121
121
|
{
|
|
122
122
|
object: 'localStorage',
|
|
123
123
|
property: 'getItem',
|
|
@@ -136,7 +136,7 @@ global.linterBundleSettings = {
|
|
|
136
136
|
]
|
|
137
137
|
},
|
|
138
138
|
'no-restricted-syntax': {
|
|
139
|
-
|
|
139
|
+
additionalRestrictions: [
|
|
140
140
|
{
|
|
141
141
|
selector: 'NewExpression[callee.name="Blob"]',
|
|
142
142
|
message: 'Use BlobHelper.create() instead of new Blob().'
|
package/eslint/index.js
CHANGED
|
@@ -205,6 +205,7 @@ module.exports = {
|
|
|
205
205
|
'no-empty-character-class': 'error',
|
|
206
206
|
'no-empty-function': 'off', // Covered by @typescript-eslint/no-empty-function
|
|
207
207
|
'no-empty-pattern': 'error',
|
|
208
|
+
'no-empty-static-block': 'error',
|
|
208
209
|
'no-empty': 'error',
|
|
209
210
|
'no-eq-null': 'error',
|
|
210
211
|
'no-eval': 'error',
|
|
@@ -246,6 +247,7 @@ module.exports = {
|
|
|
246
247
|
'no-negated-condition': 'off',
|
|
247
248
|
'no-nested-ternary': 'error',
|
|
248
249
|
'no-new-func': 'error',
|
|
250
|
+
'no-new-native-nonconstructor': 'error',
|
|
249
251
|
'no-new-object': 'error',
|
|
250
252
|
'no-new-symbol': 'error',
|
|
251
253
|
'no-new-wrappers': 'error',
|
|
@@ -268,16 +270,16 @@ module.exports = {
|
|
|
268
270
|
name: 'isNaN',
|
|
269
271
|
message: 'Use Number.isNaN() instead, and ensure that the input value is of type number. isNaN(undefined) !== Number.isNaN(undefined)'
|
|
270
272
|
},
|
|
271
|
-
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-globals']?.
|
|
273
|
+
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-globals']?.additionalRestrictions)
|
|
272
274
|
],
|
|
273
275
|
'no-restricted-imports': 'off', // Covered by @typescript-eslint/no-restricted-imports
|
|
274
276
|
'no-restricted-properties': [
|
|
275
277
|
'error',
|
|
276
|
-
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-properties']?.
|
|
278
|
+
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-properties']?.additionalRestrictions)
|
|
277
279
|
],
|
|
278
280
|
'no-restricted-syntax': [
|
|
279
281
|
'error',
|
|
280
|
-
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-syntax']?.
|
|
282
|
+
...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-syntax']?.additionalRestrictions)
|
|
281
283
|
],
|
|
282
284
|
'no-return-assign': 'error',
|
|
283
285
|
'no-return-await': 'off', // Covered by @typescript-eslint/return-await
|
|
@@ -470,6 +472,7 @@ module.exports = {
|
|
|
470
472
|
// Fields
|
|
471
473
|
'public-static-field',
|
|
472
474
|
'protected-static-field',
|
|
475
|
+
'#private-static-field',
|
|
473
476
|
'private-static-field',
|
|
474
477
|
|
|
475
478
|
'public-decorated-field',
|
|
@@ -478,32 +481,59 @@ module.exports = {
|
|
|
478
481
|
|
|
479
482
|
'public-instance-field',
|
|
480
483
|
'protected-instance-field',
|
|
484
|
+
'#private-instance-field',
|
|
481
485
|
'private-instance-field',
|
|
482
486
|
|
|
483
487
|
'public-abstract-field',
|
|
484
488
|
'protected-abstract-field',
|
|
485
|
-
'private-abstract-field',
|
|
486
489
|
|
|
487
490
|
// Constructors
|
|
488
491
|
'public-constructor',
|
|
489
492
|
'protected-constructor',
|
|
490
493
|
'private-constructor',
|
|
491
494
|
|
|
492
|
-
// Methods
|
|
495
|
+
// Methods / Getters / Setters
|
|
496
|
+
'public-decorated-set',
|
|
497
|
+
'public-decorated-get',
|
|
493
498
|
'public-decorated-method',
|
|
499
|
+
'public-instance-set',
|
|
500
|
+
'public-instance-get',
|
|
494
501
|
'public-instance-method',
|
|
502
|
+
'public-static-set',
|
|
503
|
+
'public-static-get',
|
|
495
504
|
'public-static-method',
|
|
505
|
+
'public-abstract-get',
|
|
506
|
+
'public-abstract-set',
|
|
496
507
|
'public-abstract-method',
|
|
497
508
|
|
|
509
|
+
'protected-decorated-set',
|
|
510
|
+
'protected-decorated-get',
|
|
498
511
|
'protected-decorated-method',
|
|
512
|
+
'protected-instance-set',
|
|
513
|
+
'protected-instance-get',
|
|
499
514
|
'protected-instance-method',
|
|
515
|
+
'protected-static-set',
|
|
516
|
+
'protected-static-get',
|
|
500
517
|
'protected-static-method',
|
|
518
|
+
'protected-abstract-get',
|
|
519
|
+
'protected-abstract-set',
|
|
501
520
|
'protected-abstract-method',
|
|
502
521
|
|
|
522
|
+
'private-decorated-set',
|
|
523
|
+
'private-decorated-get',
|
|
503
524
|
'private-decorated-method',
|
|
525
|
+
'#private-instance-set',
|
|
526
|
+
'#private-instance-get',
|
|
527
|
+
'#private-instance-method',
|
|
528
|
+
'private-instance-set',
|
|
529
|
+
'private-instance-get',
|
|
504
530
|
'private-instance-method',
|
|
505
|
-
'private-static-
|
|
506
|
-
'private-
|
|
531
|
+
'#private-static-set',
|
|
532
|
+
'#private-static-get',
|
|
533
|
+
'#private-static-method',
|
|
534
|
+
'private-static-set',
|
|
535
|
+
'private-static-get',
|
|
536
|
+
'private-static-method'
|
|
507
537
|
]
|
|
508
538
|
}],
|
|
509
539
|
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
@@ -539,7 +569,7 @@ module.exports = {
|
|
|
539
569
|
// Function
|
|
540
570
|
{ selector: 'function', format: ['camelCase', 'PascalCase'] },
|
|
541
571
|
|
|
542
|
-
//
|
|
572
|
+
// Parameter
|
|
543
573
|
{ selector: 'parameter', format: ['camelCase', 'PascalCase'], leadingUnderscore: 'allow' },
|
|
544
574
|
|
|
545
575
|
// Property
|
|
@@ -574,7 +604,7 @@ module.exports = {
|
|
|
574
604
|
format: null
|
|
575
605
|
},
|
|
576
606
|
{
|
|
577
|
-
// Allow properties which which don't contain an underscore (to prevent usage of "UPPER_CASE") and contain
|
|
607
|
+
// Allow properties which which don't contain an underscore (to prevent usage of "UPPER_CASE") and contain at least 4 characters
|
|
578
608
|
selector: 'objectLiteralProperty',
|
|
579
609
|
filter: '^[^_]{4,}$',
|
|
580
610
|
format: null
|
|
@@ -644,6 +674,7 @@ module.exports = {
|
|
|
644
674
|
/* ['error', {
|
|
645
675
|
ignore: [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 15, 16, 24, 32, 60, 63, 64, 100, 128, 250, 255, 256, 500, 1000, 4_294_967_296],
|
|
646
676
|
ignoreArrayIndexes: true,
|
|
677
|
+
ignoreClassFieldInitialValues: true,
|
|
647
678
|
enforceConst: true,
|
|
648
679
|
detectObjects: true
|
|
649
680
|
}], */
|
|
@@ -682,6 +713,7 @@ module.exports = {
|
|
|
682
713
|
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
683
714
|
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
684
715
|
'@typescript-eslint/no-unsafe-call': 'error',
|
|
716
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
685
717
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
686
718
|
'@typescript-eslint/no-unsafe-return': 'error',
|
|
687
719
|
'@typescript-eslint/no-unused-expressions': 'error',
|
|
@@ -761,19 +793,20 @@ module.exports = {
|
|
|
761
793
|
*
|
|
762
794
|
* @see https://github.com/import-js/eslint-plugin-import
|
|
763
795
|
*/
|
|
796
|
+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
764
797
|
'import/default': 'error',
|
|
765
798
|
'import/dynamic-import-chunkname': ['off', { // Here an "ignore" option is missing, which allows to ignore "@json\/locales\/.+?\.json", because these are handled in the webpack configuration.
|
|
766
799
|
webpackChunknameFormat: '[0-9a-zA-Z-_/.+]+'
|
|
767
800
|
}],
|
|
768
801
|
'import/export': 'error',
|
|
769
802
|
'import/exports-last': 'off', // Exports should be declared first; helper functions last
|
|
770
|
-
'import/extensions': 'off', // There is no check that it's really an extension or part of the file name.
|
|
803
|
+
'import/extensions': 'off', // There is no check that it's really an extension or part of the file name. Misinterprets 'JavaDateTime' as extension in 'DateTime.JavaDateTime' for 'DateTime.DOSDateTime.ts'. So, we disable this rule
|
|
771
804
|
'import/first': 'error',
|
|
772
805
|
'import/group-exports': 'off',
|
|
773
806
|
'import/max-dependencies': ['error', { max: 20, ignoreTypeImports: true }],
|
|
774
807
|
'import/named': 'error',
|
|
775
808
|
'import/namespace': ['error', { allowComputed: true }],
|
|
776
|
-
'import/newline-after-import': 'error',
|
|
809
|
+
'import/newline-after-import': ['error', { considerComments: true }],
|
|
777
810
|
'import/no-absolute-path': 'error',
|
|
778
811
|
'import/no-amd': 'error',
|
|
779
812
|
'import/no-anonymous-default-export': 'error',
|
|
@@ -783,6 +816,7 @@ module.exports = {
|
|
|
783
816
|
'import/no-deprecated': 'error',
|
|
784
817
|
'import/no-duplicates': 'error',
|
|
785
818
|
'import/no-dynamic-require': 'error',
|
|
819
|
+
'import/no-empty-named-blocks': 'error',
|
|
786
820
|
'import/no-extraneous-dependencies': 'error',
|
|
787
821
|
'import/no-internal-modules': ['off', { // @todo Throws an "Cannot read property 'value' of null" error in src/help/scss/help.scss.d.ts:2 since the update to v2.21.1. If this issue does not get fixed in the next releases, report it!
|
|
788
822
|
allow: [
|
|
@@ -812,7 +846,7 @@ module.exports = {
|
|
|
812
846
|
'import/no-useless-path-segments': 'error',
|
|
813
847
|
'import/no-webpack-loader-syntax': 'off', // Indeed, you should avoid that, but if we do it, we have a reason for it
|
|
814
848
|
'import/order': ['error', {
|
|
815
|
-
'alphabetize': { order: 'asc', caseInsensitive: true },
|
|
849
|
+
'alphabetize': { order: 'asc', orderImportKind: 'asc', caseInsensitive: true },
|
|
816
850
|
'groups': ['builtin', 'unknown', 'external', 'internal', 'parent', 'sibling', 'index'],
|
|
817
851
|
'newlines-between': 'always',
|
|
818
852
|
'pathGroupsExcludedImportTypes': [],
|
|
@@ -829,7 +863,8 @@ module.exports = {
|
|
|
829
863
|
{ pattern: '@*', group: 'internal' },
|
|
830
864
|
{ pattern: '@*/**', group: 'internal' },
|
|
831
865
|
{ pattern: '*!*/**', group: 'internal', position: 'after' } // Webpack loaders, e.g. 'worker-ref-loader!@app/components/FileFormatIdentificationDialog/TypeDetection.worker'
|
|
832
|
-
]
|
|
866
|
+
],
|
|
867
|
+
'distinctGroup': false
|
|
833
868
|
}],
|
|
834
869
|
'import/prefer-default-export': 'off',
|
|
835
870
|
'import/unambiguous': 'off',
|
|
@@ -911,6 +946,7 @@ module.exports = {
|
|
|
911
946
|
'unicorn/no-instanceof-array': 'error',
|
|
912
947
|
'unicorn/no-keyword-prefix': 'off',
|
|
913
948
|
'unicorn/no-lonely-if': 'off', // Sometimes the code is clearer if-conditions are not combined
|
|
949
|
+
'unicorn/no-negated-condition': 'off',
|
|
914
950
|
'unicorn/no-nested-ternary': 'off', // We prefer no-nested-ternary of ESlint
|
|
915
951
|
'unicorn/no-new-array': 'off', // `new Array(length)` should be preferred over `Array.from({ length })` because it's much faster. @see https://jsben.ch/qTpYp
|
|
916
952
|
'unicorn/no-new-buffer': 'error',
|
|
@@ -920,6 +956,7 @@ module.exports = {
|
|
|
920
956
|
'unicorn/no-static-only-class': 'error',
|
|
921
957
|
'unicorn/no-thenable': 'error',
|
|
922
958
|
'unicorn/no-this-assignment': 'error',
|
|
959
|
+
'unicorn/no-typeof-undefined': 'error',
|
|
923
960
|
'unicorn/no-unnecessary-await': 'error',
|
|
924
961
|
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
925
962
|
'unicorn/no-unreadable-iife': 'error',
|
|
@@ -969,8 +1006,9 @@ module.exports = {
|
|
|
969
1006
|
'unicorn/prefer-query-selector': 'off', // document.getElementById() is much faster
|
|
970
1007
|
'unicorn/prefer-reflect-apply': 'error',
|
|
971
1008
|
'unicorn/prefer-set-has': 'error',
|
|
1009
|
+
'unicorn/prefer-set-size': 'error',
|
|
972
1010
|
'unicorn/prefer-spread': 'off', // @todo Disabled till there a solution for the warning, that `slice()` on Typed-Arrays should be replaced (which is not possible). @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1064
|
|
973
|
-
'unicorn/prefer-string-replace-all': 'off',
|
|
1011
|
+
'unicorn/prefer-string-replace-all': 'off', // @todo Available since 2020 in browsers. SHould this be preferred?
|
|
974
1012
|
'unicorn/prefer-string-slice': 'off', // @todo As of today (2020.08.24) and since the last 9 years, substr() is three times faster than slice() in Firefox.
|
|
975
1013
|
'unicorn/prefer-string-starts-ends-with': 'error',
|
|
976
1014
|
'unicorn/prefer-string-trim-start-end': 'error',
|
package/eslint/overrides-jest.js
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
* @file Settings for Jest based unit tests.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
const jestVersion = (() => {
|
|
6
|
+
try {
|
|
7
|
+
// eslint-disable-next-line n/no-missing-require, import/no-dynamic-require -- If "overrides-jest" is used, "jest" should be installed, and it should be searched in the working directory of the process.
|
|
8
|
+
const version = require(require.resolve('jest', { paths: [process.cwd()] })).getVersion().split('.')[0];
|
|
9
|
+
|
|
10
|
+
process.stdout.write(`Detected Jest version: ${version}\n\n`);
|
|
11
|
+
|
|
12
|
+
return version;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
process.stderr.write('No Jest version detected\n\n');
|
|
16
|
+
|
|
17
|
+
return 'detect';
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
20
|
+
|
|
5
21
|
module.exports = {
|
|
6
22
|
overrides: [
|
|
7
23
|
{
|
|
@@ -11,21 +27,7 @@ module.exports = {
|
|
|
11
27
|
},
|
|
12
28
|
settings: {
|
|
13
29
|
jest: {
|
|
14
|
-
version:
|
|
15
|
-
try {
|
|
16
|
-
// eslint-disable-next-line n/no-missing-require, import/no-dynamic-require -- If "overrides-jest" is used, "jest" should be installed, and it should be searched in the working directory of the process.
|
|
17
|
-
const jestVersion = require(require.resolve('jest', { paths: [process.cwd()] })).getVersion().split('.')[0];
|
|
18
|
-
|
|
19
|
-
process.stdout.write(`Detected Jest version: ${jestVersion}\n\n`);
|
|
20
|
-
|
|
21
|
-
return jestVersion;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
process.stderr.write('No Jest version detected\n\n');
|
|
25
|
-
|
|
26
|
-
return 'detect';
|
|
27
|
-
}
|
|
28
|
-
})()
|
|
30
|
+
version: jestVersion
|
|
29
31
|
}
|
|
30
32
|
},
|
|
31
33
|
plugins: ['jest'],
|
|
@@ -116,6 +118,26 @@ module.exports = {
|
|
|
116
118
|
'jest/valid-expect': 'error',
|
|
117
119
|
'jest/valid-title': 'error'
|
|
118
120
|
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
files: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts'],
|
|
124
|
+
env: {
|
|
125
|
+
jest: true
|
|
126
|
+
},
|
|
127
|
+
settings: {
|
|
128
|
+
jest: {
|
|
129
|
+
version: jestVersion
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
plugins: ['jest'],
|
|
133
|
+
rules: {
|
|
134
|
+
/**
|
|
135
|
+
* eslint-plugin-jest
|
|
136
|
+
*
|
|
137
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/tree/master/docs/rules
|
|
138
|
+
*/
|
|
139
|
+
'jest/no-untyped-mock-factory': 'error'
|
|
140
|
+
}
|
|
119
141
|
}
|
|
120
142
|
]
|
|
121
143
|
};
|
|
@@ -13,7 +13,8 @@ module.exports = {
|
|
|
13
13
|
plugins: ['jsdoc'],
|
|
14
14
|
settings: {
|
|
15
15
|
jsdoc: {
|
|
16
|
-
mode: 'typescript'
|
|
16
|
+
mode: 'typescript',
|
|
17
|
+
exemptDestructuredRootsFromChecks: true
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
rules: {
|
|
@@ -75,6 +76,7 @@ module.exports = {
|
|
|
75
76
|
},
|
|
76
77
|
noEndLines: true
|
|
77
78
|
}],
|
|
79
|
+
'jsdoc/text-escaping': 'off', // Right now, there is no description of this rule available on the page. Only the discussion here: https://github.com/gajus/eslint-plugin-jsdoc/issues/864
|
|
78
80
|
'jsdoc/valid-types': 'off' // Checked by TypeScript
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -35,6 +35,7 @@ module.exports = {
|
|
|
35
35
|
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
|
|
36
36
|
*/
|
|
37
37
|
'jsx-a11y/alt-text': 'error',
|
|
38
|
+
'jsx-a11y/anchor-ambiguous-text': 'off',
|
|
38
39
|
'jsx-a11y/anchor-has-content': 'error',
|
|
39
40
|
'jsx-a11y/anchor-is-valid': 'error',
|
|
40
41
|
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
|
@@ -53,6 +54,7 @@ module.exports = {
|
|
|
53
54
|
'jsx-a11y/media-has-caption': 'error',
|
|
54
55
|
'jsx-a11y/mouse-events-have-key-events': 'error',
|
|
55
56
|
'jsx-a11y/no-access-key': 'off', // If you explicitly specify an access key, you usually have a reason for this, so it should not be prevented by a rule
|
|
57
|
+
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
|
|
56
58
|
'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
|
|
57
59
|
'jsx-a11y/no-distracting-elements': 'error',
|
|
58
60
|
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'error',
|
|
@@ -103,9 +105,9 @@ module.exports = {
|
|
|
103
105
|
namedComponents: 'arrow-function',
|
|
104
106
|
unnamedComponents: 'arrow-function'
|
|
105
107
|
}],
|
|
106
|
-
'react/hook-use-state':
|
|
108
|
+
'react/hook-use-state': ['error', { allowDestructuredState: true }],
|
|
107
109
|
'react/jsx-boolean-value': ['error', 'always'],
|
|
108
|
-
'react/jsx-child-element-spacing': 'off', // @todo Why is this disabled? Could it be, that the faulty
|
|
110
|
+
'react/jsx-child-element-spacing': 'off', // @todo Why is this disabled? Could it be, that the faulty behavior is fixed in the meantime?
|
|
109
111
|
'react/jsx-closing-bracket-location': 'error',
|
|
110
112
|
'react/jsx-closing-tag-location': 'error',
|
|
111
113
|
'react/jsx-curly-brace-presence': ['error', { propElementValues: 'always' }],
|
|
@@ -164,7 +166,7 @@ module.exports = {
|
|
|
164
166
|
'react/no-is-mounted': 'error',
|
|
165
167
|
'react/no-multi-comp': 'error',
|
|
166
168
|
'react/no-namespace': 'error',
|
|
167
|
-
|
|
169
|
+
'react/no-object-type-as-default-prop': 'error',
|
|
168
170
|
'react/no-redundant-should-component-update': 'error',
|
|
169
171
|
'react/no-render-return-value': 'error',
|
|
170
172
|
'react/no-set-state': 'off',
|
|
@@ -185,7 +187,7 @@ module.exports = {
|
|
|
185
187
|
'react/prefer-stateless-function': 'error',
|
|
186
188
|
'react/prop-types': 'off',
|
|
187
189
|
'react/react-in-jsx-scope': 'error',
|
|
188
|
-
'react/require-default-props': ['off', { forbidDefaultForRequired: true, ignoreFunctionalComponents: true }], // @see https://medium.com/@matanbobi/react-defaultprops-is-dying-whos-the-contender-443c19d9e7f1 @todo Also disabled
|
|
190
|
+
'react/require-default-props': ['off', { forbidDefaultForRequired: true, ignoreFunctionalComponents: true }], // @see https://medium.com/@matanbobi/react-defaultprops-is-dying-whos-the-contender-443c19d9e7f1 @todo Also disabled because of false-positive with React.forwardRef(), create bug report?
|
|
189
191
|
'react/require-optimization': 'error',
|
|
190
192
|
'react/require-render-return': 'error',
|
|
191
193
|
'react/self-closing-comp': 'error',
|
|
@@ -205,7 +207,7 @@ module.exports = {
|
|
|
205
207
|
'static-methods'
|
|
206
208
|
]
|
|
207
209
|
}],
|
|
208
|
-
'react/
|
|
210
|
+
'react/sort-default-props': 'error',
|
|
209
211
|
'react/sort-prop-types': 'error',
|
|
210
212
|
'react/state-in-constructor': 'error',
|
|
211
213
|
'react/static-property-placement': 'error',
|
package/helper/ensure-type.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @returns {T extends Array<any> ? T : []} Either the input array, or an empty array, if the input array is not an array.
|
|
11
11
|
*/
|
|
12
12
|
function array (value) {
|
|
13
|
-
// @ts-expect-error -- Right now the type
|
|
13
|
+
// @ts-expect-error -- Right now the type definition of `Array.isArray()` is incorrect since it uses `arg is any[]` instead of the correct type of `arg`.
|
|
14
14
|
return (Array.isArray(value) ? value : []);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -21,20 +21,20 @@ function findMissingOverrides () {
|
|
|
21
21
|
const result = [];
|
|
22
22
|
|
|
23
23
|
for (const [name, expectedVersion] of Object.entries(linterBundleDependencies)) {
|
|
24
|
-
let
|
|
24
|
+
let dependencyPackageJson;
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
dependencyPackageJson = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'node_modules', name, 'package.json'), 'utf8'));
|
|
28
28
|
}
|
|
29
29
|
catch {
|
|
30
30
|
// If the file does not exist, we ignore it, because in this case it's most likely a linter-bundle-only dependency.
|
|
31
31
|
continue;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
if (
|
|
34
|
+
if (dependencyPackageJson.version !== expectedVersion) {
|
|
35
35
|
result.push({
|
|
36
36
|
name,
|
|
37
|
-
configuredVersion:
|
|
37
|
+
configuredVersion: dependencyPackageJson.version,
|
|
38
38
|
expectedVersion
|
|
39
39
|
});
|
|
40
40
|
}
|
package/helper/is-npm-or-yarn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Check if the project is using npm or yarn by checking the
|
|
2
|
+
* @file Check if the project is using npm or yarn by checking the existence of a `package-lock.json` or a `yarn.lock`.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
const fs = require('fs');
|
package/lint.js
CHANGED
|
@@ -24,7 +24,9 @@ const isTerminal = tty.isatty(1);
|
|
|
24
24
|
void (async () => {
|
|
25
25
|
const npmOrYarn = isNpmOrYarn();
|
|
26
26
|
|
|
27
|
-
validateEnvironment(npmOrYarn)
|
|
27
|
+
if (!validateEnvironment(npmOrYarn)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
28
30
|
|
|
29
31
|
/** @type {{ diff: Promise<ProcessResult>; modified: Promise<ProcessResult>; deleted: Promise<ProcessResult>; } | undefined} */
|
|
30
32
|
let gitFilesProcessPromise;
|
|
@@ -36,11 +38,11 @@ void (async () => {
|
|
|
36
38
|
if (config['git']) {
|
|
37
39
|
if (!gitFilesProcessPromise) {
|
|
38
40
|
gitFilesProcessPromise = {
|
|
39
|
-
// Returns changed files, also stashed and
|
|
41
|
+
// Returns changed files, also stashed and committed
|
|
40
42
|
diff: runProcess('git diff --name-only -z @{upstream}'),
|
|
41
43
|
// Returns unstashed files (including deleted)
|
|
42
44
|
modified: runProcess('git ls-files -o -m --exclude-standard --full-name --deduplicate -z'),
|
|
43
|
-
// Returns unstashed, deleted files - @todo Is there a way to also get a list of deleted stashed/
|
|
45
|
+
// Returns unstashed, deleted files - @todo Is there a way to also get a list of deleted stashed/committed files?
|
|
44
46
|
deleted: runProcess('git ls-files -d --exclude-standard --full-name --deduplicate -z')
|
|
45
47
|
};
|
|
46
48
|
}
|
|
@@ -239,7 +241,7 @@ void (async () => {
|
|
|
239
241
|
* Ensures that the environment in which the linter is running has the correct versions of the required dependencies.
|
|
240
242
|
*
|
|
241
243
|
* @param {ReturnType<isNpmOrYarn>} npmOrYarn - This should be the return value of `isNpmOrYarn()`.
|
|
242
|
-
* @returns {
|
|
244
|
+
* @returns {boolean} Returns `true` if the environment is valid, otherwise `false` is returned.
|
|
243
245
|
*/
|
|
244
246
|
function validateEnvironment (npmOrYarn) {
|
|
245
247
|
const outdatedOverrides = validatePackageOverrides();
|
|
@@ -255,7 +257,7 @@ function validateEnvironment (npmOrYarn) {
|
|
|
255
257
|
|
|
256
258
|
process.exitCode = 1;
|
|
257
259
|
|
|
258
|
-
return;
|
|
260
|
+
return false;
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
const missingOverrides = findMissingOverrides().filter(({ name }) => !(npmOrYarn === 'npm' && outdatedOverrides.overrides.some((override) => name === override.name)) && !(npmOrYarn === 'yarn' && outdatedOverrides.resolutions.some((override) => name === override.name)));
|
|
@@ -281,8 +283,10 @@ function validateEnvironment (npmOrYarn) {
|
|
|
281
283
|
|
|
282
284
|
process.exitCode = 1;
|
|
283
285
|
|
|
284
|
-
return;
|
|
286
|
+
return false;
|
|
285
287
|
}
|
|
288
|
+
|
|
289
|
+
return true;
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
/**
|
|
@@ -374,7 +378,7 @@ function getIncludes (list, pattern, config) {
|
|
|
374
378
|
}
|
|
375
379
|
|
|
376
380
|
/**
|
|
377
|
-
*
|
|
381
|
+
* Executes a task asynchronously.
|
|
378
382
|
*
|
|
379
383
|
* @param {TaskSetup} setup - The task execution setup.
|
|
380
384
|
* @returns {Job} Job
|
|
@@ -391,7 +395,7 @@ function runTask (setup) {
|
|
|
391
395
|
* Returns a job configuration which does not run any task, but just returns the given `output`.
|
|
392
396
|
*
|
|
393
397
|
* @param {string} taskName - The name of the task.
|
|
394
|
-
* @param {Partial<Record<string, (string | true)[]>>} config - The
|
|
398
|
+
* @param {Partial<Record<string, (string | true)[]>>} config - The configuration of the task.
|
|
395
399
|
* @param {{ code?: number; stdout?: string; stderr?: string; }} output - The output which should be returned as result of the job.
|
|
396
400
|
* @returns {Job} Job
|
|
397
401
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linter-bundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.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,29 +40,29 @@
|
|
|
40
40
|
"check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
44
|
-
"@typescript-eslint/parser": "5.
|
|
45
|
-
"@typescript-eslint/utils": "5.
|
|
46
|
-
"eslint": "8.
|
|
47
|
-
"eslint-import-resolver-typescript": "3.5.
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "5.49.0",
|
|
44
|
+
"@typescript-eslint/parser": "5.49.0",
|
|
45
|
+
"@typescript-eslint/utils": "5.49.0",
|
|
46
|
+
"eslint": "8.32.0",
|
|
47
|
+
"eslint-import-resolver-typescript": "3.5.3",
|
|
48
48
|
"eslint-import-resolver-webpack": "0.13.2",
|
|
49
49
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
50
50
|
"eslint-plugin-functional": "4.4.1",
|
|
51
|
-
"eslint-plugin-import": "2.
|
|
52
|
-
"eslint-plugin-jest": "27.1
|
|
53
|
-
"eslint-plugin-jsdoc": "39.
|
|
54
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
55
|
-
"eslint-plugin-n": "15.
|
|
51
|
+
"eslint-plugin-import": "2.27.5",
|
|
52
|
+
"eslint-plugin-jest": "27.2.1",
|
|
53
|
+
"eslint-plugin-jsdoc": "39.6.9",
|
|
54
|
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
55
|
+
"eslint-plugin-n": "15.6.1",
|
|
56
56
|
"eslint-plugin-promise": "6.1.1",
|
|
57
|
-
"eslint-plugin-react": "7.
|
|
57
|
+
"eslint-plugin-react": "7.32.1",
|
|
58
58
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
59
|
-
"eslint-plugin-unicorn": "
|
|
60
|
-
"markdownlint-cli": "0.
|
|
59
|
+
"eslint-plugin-unicorn": "45.0.2",
|
|
60
|
+
"markdownlint-cli": "0.33.0",
|
|
61
61
|
"micromatch": "4.0.5",
|
|
62
|
-
"postcss-scss": "4.0.
|
|
63
|
-
"stylelint": "14.
|
|
64
|
-
"stylelint-declaration-block-no-ignored-properties": "2.
|
|
65
|
-
"stylelint-order": "
|
|
62
|
+
"postcss-scss": "4.0.6",
|
|
63
|
+
"stylelint": "14.16.1",
|
|
64
|
+
"stylelint-declaration-block-no-ignored-properties": "2.6.0",
|
|
65
|
+
"stylelint-order": "6.0.1",
|
|
66
66
|
"stylelint-scss": "4.3.0",
|
|
67
67
|
"stylelint-selector-no-empty": "1.0.9",
|
|
68
68
|
"stylelint-use-logical-spec": "4.1.0"
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"typescript": "^4.0.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@types/eslint": "8.4.
|
|
75
|
+
"@types/eslint": "8.4.10",
|
|
76
76
|
"@types/micromatch": "4.0.2",
|
|
77
|
-
"@types/node": "18.11.
|
|
77
|
+
"@types/node": "18.11.18",
|
|
78
78
|
"stylelint-find-new-rules": "4.0.0",
|
|
79
|
-
"typescript": "4.
|
|
79
|
+
"typescript": "4.9.4"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/stylelint/index.js
CHANGED
|
@@ -214,6 +214,7 @@ module.exports = {
|
|
|
214
214
|
'media-feature-name-no-vendor-prefix': null, // For Safari, we still need "-webkit-min-device-pixel-ratio": https://caniuse.com/css-media-resolution
|
|
215
215
|
'media-feature-name-value-allowed-list': null,
|
|
216
216
|
'media-feature-parentheses-space-inside': 'never',
|
|
217
|
+
'media-feature-range-notation': 'prefix',
|
|
217
218
|
'media-feature-range-operator-space-after': 'always',
|
|
218
219
|
'media-feature-range-operator-space-before': 'always',
|
|
219
220
|
'media-query-list-comma-newline-after': 'always-multi-line',
|
|
@@ -800,6 +801,7 @@ module.exports = {
|
|
|
800
801
|
'white-space',
|
|
801
802
|
'word-spacing',
|
|
802
803
|
'hyphens',
|
|
804
|
+
'hyphenate-character',
|
|
803
805
|
|
|
804
806
|
'src'
|
|
805
807
|
]
|
package/types.d.ts
CHANGED
|
@@ -19,13 +19,13 @@ declare namespace globalThis {
|
|
|
19
19
|
readonly overrides?: {
|
|
20
20
|
readonly general?: {
|
|
21
21
|
readonly 'no-restricted-globals'?: {
|
|
22
|
-
readonly
|
|
22
|
+
readonly additionalRestrictions?: string[];
|
|
23
23
|
};
|
|
24
24
|
readonly 'no-restricted-properties'?: {
|
|
25
|
-
readonly
|
|
25
|
+
readonly additionalRestrictions?: string[];
|
|
26
26
|
};
|
|
27
27
|
readonly 'no-restricted-syntax'?: {
|
|
28
|
-
readonly
|
|
28
|
+
readonly additionalRestrictions?: string[];
|
|
29
29
|
};
|
|
30
30
|
readonly 'import/order'?: {
|
|
31
31
|
readonly additionalExternalPatterns?: string[];
|