linter-bundle 2.27.0 → 2.29.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,7 +6,74 @@ 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.27.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.28.0...HEAD)
10
+
11
+ ## [2.29.0] - 2023-05-05
12
+
13
+ ### Fixed
14
+
15
+ - [stylelint] Fix `liberty/use-logical-spec` and `order/properties-order` issue with the `inset` property
16
+
17
+ ### Changed
18
+
19
+ - [eslint] Updated `@typescript-eslint/utils` from `5.59.0` to `5.59.2`
20
+ - [eslint] Updated `eslint-plugin-jsdoc` from `43.0.7` to `43.2.0`
21
+ - [markdownlint] Updated `markdownlint-cli` from `0.33.0` to `0.34.0`
22
+ - [stylelint] Updated `stylelint` from `15.5.0` to `15.6.1`
23
+ - [stylelint] Updated `stylelint-scss` from `4.6.0` to `5.0.0`
24
+
25
+ - [eslint/overrides-jsdoc] Make use of new rule [`jsdoc/no-blank-blocks`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md)
26
+ - [stylelint] Reactivate [color-function-notation](https://github.com/stylelint/stylelint/blob/main/lib/rules/color-function-notation/README.md) with option `'modern'` and `ignore: ['with-var-inside']`
27
+
28
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.28.0...v2.29.0)
29
+
30
+ ## [2.28.0] - 2023-04-22
31
+
32
+ ### Changed
33
+
34
+ - [eslint] Updated `@typescript-eslint` from `5.49.0` to `5.59.0`
35
+ - [eslint] Updated `eslint` from `8.32.0` to `8.39.0`
36
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.5.3` to `3.5.5`
37
+ - [eslint] Updated `eslint-plugin-functional` from `4.4.1` to `5.0.8`
38
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.6.9` to `43.0.7`
39
+ - [eslint] Updated `eslint-plugin-n` from `15.6.1` to `15.7.0`
40
+ - [eslint] Updated `eslint-plugin-react` from `7.32.1` to `7.32.2`
41
+ - [eslint] Updated `eslint-plugin-unicorn` from `45.0.2` to `46.0.0`
42
+ - [stylelint] Updated `stylelint` from `14.16.1` to `15.5.0`
43
+ - [stylelint] Updated `stylelint-declaration-block-no-ignored-properties` from `2.6.0` to `2.7.0`
44
+ - [stylelint] Updated `stylelint-order` from `6.0.1` to `6.0.3`
45
+ - [stylelint] Updated `stylelint-scss` from `4.3.0` to `4.6.0`
46
+ - [stylelint] Updated `stylelint-use-logical-spec` from `4.1.0` to `5.0.0`
47
+ - [eslint] Consider JavaScript files with the '.mjs' file extension (ECMAScript Modules)
48
+ - [eslint] Activated [`react/destructuring-assignment`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md) rule
49
+ - [stylelint] Since all 76 stylistic Stylelint rules have been marked as deprecated, code to fork them has been implemented
50
+
51
+ ### Added
52
+
53
+ - [eslint] Added new [`@typescript-eslint/key-spacing`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/key-spacing.md) rule
54
+ - [eslint] Added new [`@typescript-eslint/no-duplicate-type-constituents.md`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md) rule
55
+ - [eslint] Added new [`@typescript-eslint/no-import-type-side-effects`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md) rule
56
+ - [eslint] Added new [`@typescript-eslint/no-mixed-enums`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-mixed-enums.md) rule
57
+ - [eslint] Added new [`@typescript-eslint/no-unsafe-enum-comparison`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md) rule
58
+ - [eslint] Added new [`@typescript-eslint/sort-type-constituents`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md) rule
59
+ - [eslint] Added new [`no-constant-binary-expression`](https://github.com/eslint/eslint/blob/main/docs/src/rules/no-constant-binary-expression.md) rule
60
+ - [eslint] Added new [`functional/prefer-immutable-types`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/prefer-immutable-types.md) rule, but disabled it
61
+ - [eslint] Added new [`functional/readonly-type`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/readonly-type.md) rule with option `keyword`
62
+ - [eslint] Added new [`functional/type-declaration-immutability`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/type-declaration-immutability.md) rule, but disabled it
63
+ - [stylelint] Added new [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-value-no-unknown/README.md) rule
64
+ - [stylelint] Added new [`media-feature-name-unit-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/media-feature-name-unit-allowed-list/README.md) rule, but disabled it
65
+ - [stylelint] Added new [`no-unknown-custom-properties`](https://github.com/stylelint/stylelint/blob/main/lib/rules/no-unknown-custom-properties/README.md) rule, but disabled
66
+ - [stylelint] Added new [`selector-anb-no-unmatchable`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-anb-no-unmatchable/README.md) rule
67
+
68
+ ### Removed
69
+
70
+ - [eslint] Removed deprecated rule `functional/prefer-readonly-type`
71
+ - [eslint/overrides-jsdoc] Removed deprecated rule `jsdoc/newline-after-description`
72
+ - [stylelint] Removed deprecated rule `at-rule-name-newline-after`
73
+ - [stylelint] Removed deprecated rule `block-closing-brace-space-after`
74
+ - [stylelint] Removed deprecated rule `block-opening-brace-newline-before`
75
+
76
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.27.0...v2.28.0)
10
77
 
11
78
  ## [2.27.0] - 2023-01-27
12
79
 
package/README.md CHANGED
@@ -278,7 +278,7 @@ Argument | Description | Example
278
278
  Will execute:
279
279
 
280
280
  ```sh
281
- eslint "./**/*.{js,jsx,ts,tsx}" --format unix
281
+ eslint "./**/*.{js,mjs,jsx,ts,tsx}" --format unix
282
282
  ```
283
283
 
284
284
  Additionally, the environment variable `TIMING` is set to `10`.
@@ -397,6 +397,9 @@ To visualize the max line-length rules in VSCode, you can activate rulers, by ad
397
397
 
398
398
  ```json
399
399
  {
400
+ "[javascript]": {
401
+ "editor.rulers": [300]
402
+ },
400
403
  "[markdown]": {
401
404
  "editor.rulers": [300]
402
405
  },
package/TODO.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  <!-- markdownlint-disable -->
4
4
 
5
+ - Keine Hard-kodierten HexEdit-spezifischen Werte:
6
+ react: {
7
+ 'react/forbid-component-props': {
8
+ allowClassNameFor: ['Checkbox', 'Grid', 'GridItem', 'Button'],
9
+ allowStyleFor: []
10
+ }
11
+ }
12
+ Diese müssen konfigurierbar sein. Hier gibt es neu auch `disallowFor`, aber ggf. sollte das gesammte Konfig-Objekt von aussen kommen.
13
+
5
14
  - Bereiche in Readme aufklappbar machen:
6
15
  <details>
7
16
  summary>yarn</summary>
package/eslint/index.js CHANGED
@@ -98,7 +98,6 @@ module.exports = {
98
98
 
99
99
  /**
100
100
  * eslint
101
- *
102
101
  * @see https://eslint.org/docs/rules/
103
102
  */
104
103
  'accessor-pairs': 'error',
@@ -149,7 +148,7 @@ module.exports = {
149
148
  'indent': 'off', // Covered by @typescript-eslint/indent
150
149
  'init-declarations': 'off', // @todo It should be possible to ignore predefined consts like MAX_RADIX
151
150
  'jsx-quotes': 'error',
152
- 'key-spacing': 'error',
151
+ 'key-spacing': 'off', // Covered by @typescript-eslint/key-spacing
153
152
  'keyword-spacing': 'error',
154
153
  'line-comment-position': 'off',
155
154
  'linebreak-style': 'error',
@@ -188,6 +187,7 @@ module.exports = {
188
187
  'no-confusing-arrow': ['error', { allowParens: true }],
189
188
  'no-console': 'error',
190
189
  'no-const-assign': 'error',
190
+ 'no-constant-binary-expression': 'error',
191
191
  'no-constant-condition': 'error',
192
192
  'no-constructor-return': 'error',
193
193
  'no-continue': 'off', // If it makes the code more readable, wer are using `continue`
@@ -387,7 +387,6 @@ module.exports = {
387
387
 
388
388
  /**
389
389
  * typescript-eslint
390
- *
391
390
  * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
392
391
  */
393
392
  '@typescript-eslint/adjacent-overload-signatures': 'error',
@@ -463,6 +462,7 @@ module.exports = {
463
462
  ignoredNodes: ['ConditionalExpression']
464
463
  }
465
464
  ],
465
+ '@typescript-eslint/key-spacing': 'error',
466
466
  '@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'semi', requireLast: true }, singleline: { delimiter: 'semi', requireLast: true } }],
467
467
  '@typescript-eslint/member-ordering': ['error', {
468
468
  default: [
@@ -654,6 +654,7 @@ module.exports = {
654
654
  '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
655
655
  '@typescript-eslint/no-dupe-class-members': 'error',
656
656
  '@typescript-eslint/no-duplicate-enum-values': 'error',
657
+ '@typescript-eslint/no-duplicate-type-constituents': 'error',
657
658
  '@typescript-eslint/no-dynamic-delete': 'error',
658
659
  '@typescript-eslint/no-empty-function': 'error',
659
660
  '@typescript-eslint/no-empty-interface': 'off',
@@ -665,6 +666,7 @@ module.exports = {
665
666
  '@typescript-eslint/no-floating-promises': 'error',
666
667
  '@typescript-eslint/no-for-in-array': 'error',
667
668
  '@typescript-eslint/no-implicit-any-catch': 'off', // Results into false-positive with the TS4.4 option "useUnknownInCatchVariables"
669
+ '@typescript-eslint/no-import-type-side-effects': 'error',
668
670
  '@typescript-eslint/no-inferrable-types': 'off', // Sometimes an explicit type helps to understand the code better
669
671
  '@typescript-eslint/no-invalid-this': 'error',
670
672
  '@typescript-eslint/no-invalid-void-type': ['error', { allowInGenericTypeArguments: true }],
@@ -681,6 +683,7 @@ module.exports = {
681
683
  '@typescript-eslint/no-meaningless-void-operator': 'error',
682
684
  '@typescript-eslint/no-misused-new': 'error',
683
685
  '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
686
+ '@typescript-eslint/no-mixed-enums': 'error',
684
687
  '@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
685
688
  '@typescript-eslint/no-non-null-assertion': 'error',
686
689
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
@@ -714,6 +717,7 @@ module.exports = {
714
717
  '@typescript-eslint/no-unsafe-assignment': 'error',
715
718
  '@typescript-eslint/no-unsafe-call': 'error',
716
719
  '@typescript-eslint/no-unsafe-declaration-merging': 'error',
720
+ '@typescript-eslint/no-unsafe-enum-comparison': 'error',
717
721
  '@typescript-eslint/no-unsafe-member-access': 'error',
718
722
  '@typescript-eslint/no-unsafe-return': 'error',
719
723
  '@typescript-eslint/no-unused-expressions': 'error',
@@ -752,6 +756,7 @@ module.exports = {
752
756
  }],
753
757
  '@typescript-eslint/return-await': 'error',
754
758
  '@typescript-eslint/semi': 'error',
759
+ '@typescript-eslint/sort-type-constituents': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
755
760
  '@typescript-eslint/sort-type-union-intersection-members': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
756
761
  '@typescript-eslint/space-before-function-paren': 'error',
757
762
  '@typescript-eslint/space-infix-ops': 'error',
@@ -765,37 +770,37 @@ module.exports = {
765
770
 
766
771
  /**
767
772
  * eslint-plugin-functional
768
- *
769
773
  * @see https://github.com/jonaskello/eslint-plugin-functional#supported-rules
770
774
  */
771
775
  'functional/functional-parameters': 'off',
772
776
  'functional/immutable-data': 'off', // This rule would require a lot of additional code and workarounds, which would make the result much more illegible.
773
- 'functional/no-class': 'off',
774
- 'functional/no-conditional-statement': 'off',
775
- 'functional/no-expression-statement': ['off', { ignoreVoid: true }], // Creates too much false-positives
777
+ 'functional/no-classes': 'off',
778
+ 'functional/no-conditional-statements': 'off',
779
+ 'functional/no-expression-statements': ['off', { ignoreVoid: true }], // Creates too much false-positives
776
780
  'functional/no-let': 'off', // This is better covered by the `prefer-const` rule
777
- 'functional/no-loop-statement': 'off',
778
- 'functional/no-method-signature': 'off', // Covered by @typescript-eslint/method-signature-style
779
- 'functional/no-mixed-type': ['error', {
781
+ 'functional/no-loop-statements': 'off',
782
+ 'functional/no-mixed-types': ['error', {
780
783
  checkInterfaces: false,
781
784
  checkTypeLiterals: true
782
785
  }],
783
786
  'functional/no-promise-reject': 'off',
784
787
  'functional/no-return-void': 'off',
785
- 'functional/no-this-expression': 'off',
786
- 'functional/no-throw-statement': 'off',
787
- 'functional/no-try-statement': 'off',
788
- 'functional/prefer-readonly-type': ['error', { ignoreClass: true, allowLocalMutation: true, ignoreCollections: true, ignoreInterface: true }],
788
+ 'functional/no-this-expressions': 'off',
789
+ 'functional/no-throw-statements': 'off',
790
+ 'functional/no-try-statements': 'off',
791
+ 'functional/prefer-immutable-types': 'off',
792
+ 'functional/prefer-property-signatures': 'off', // Covered by @typescript-eslint/method-signature-style
789
793
  'functional/prefer-tacit': 'off', // @see https://github.com/jonaskello/eslint-plugin-functional/issues/263
794
+ 'functional/readonly-type': ['error', 'keyword'],
795
+ 'functional/type-declaration-immutability': 'off',
790
796
 
791
797
  /**
792
798
  * eslint-plugin-import
793
- *
794
799
  * @see https://github.com/import-js/eslint-plugin-import
795
800
  */
796
801
  'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
797
802
  'import/default': 'error',
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.
803
+ 'import/dynamic-import-chunkname': ['error', {
799
804
  webpackChunknameFormat: '[0-9a-zA-Z-_/.+]+'
800
805
  }],
801
806
  'import/export': 'error',
@@ -854,7 +859,6 @@ module.exports = {
854
859
  ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['import/order']?.additionalExternalPatterns).map(
855
860
  /**
856
861
  * Creates an "external" group using the additional external pattern configuration.
857
- *
858
862
  * @param {string} pattern - A given pattern
859
863
  * @returns {{ pattern: string; group: 'external'; }} An "external" path configuration object
860
864
  */
@@ -871,7 +875,6 @@ module.exports = {
871
875
 
872
876
  /**
873
877
  * eslint-plugin-eslint-comments
874
- *
875
878
  * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/
876
879
  */
877
880
  'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
@@ -886,7 +889,6 @@ module.exports = {
886
889
 
887
890
  /**
888
891
  * eslint-plugin-promise
889
- *
890
892
  * @see https://github.com/xjamundx/eslint-plugin-promise
891
893
  */
892
894
  'promise/always-return': 'off', // If the result of an `.then()` is not used, there is no need to return something.
@@ -907,7 +909,6 @@ module.exports = {
907
909
 
908
910
  /**
909
911
  * eslint-plugin-unicorn
910
- *
911
912
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
912
913
  */
913
914
  'unicorn/better-regex': 'error',
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @file Settings for Gatsby-based projects.
3
+ *
3
4
  */
4
5
 
5
6
  module.exports = {
@@ -14,10 +15,8 @@ module.exports = {
14
15
 
15
16
  /**
16
17
  * eslint
17
- *
18
18
  * @see https://eslint.org/docs/rules/
19
19
  */
20
-
21
20
  'no-restricted-imports': ['error', {
22
21
  paths: [{
23
22
  name: '@reach/router',
@@ -28,21 +27,18 @@ module.exports = {
28
27
 
29
28
  /**
30
29
  * typescript-eslint
31
- *
32
30
  * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
33
31
  */
34
32
  '@typescript-eslint/no-confusing-void-expression': 'off', // @todo Conflicts with graphql-template strings
35
33
 
36
34
  /**
37
35
  * eslint-plugin-import
38
- *
39
36
  * @see https://github.com/import-js/eslint-plugin-import
40
37
  */
41
38
  'import/no-unresolved': ['error', { caseSensitiveStrict: true, ignore: ['@reach/router'] }],
42
39
 
43
40
  /**
44
41
  * eslint-plugin-unicorn
45
- *
46
42
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
47
43
  */
48
44
  'unicorn/string-content': ['error', {
@@ -64,7 +60,6 @@ module.exports = {
64
60
  rules: {
65
61
  /**
66
62
  * eslint-plugin-unicorn
67
- *
68
63
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
69
64
  */
70
65
  'unicorn/filename-case': ['error', {
@@ -83,7 +78,6 @@ module.exports = {
83
78
  rules: {
84
79
  /**
85
80
  * eslint-plugin-import
86
- *
87
81
  * @see https://github.com/import-js/eslint-plugin-import
88
82
  */
89
83
  'import/no-default-export': 'off',
@@ -91,7 +85,6 @@ module.exports = {
91
85
 
92
86
  /**
93
87
  * eslint-plugin-unicorn
94
- *
95
88
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
96
89
  */
97
90
  'unicorn/filename-case': ['error', {
@@ -106,7 +99,6 @@ module.exports = {
106
99
  rules: {
107
100
  /**
108
101
  * eslint-plugin-n
109
- *
110
102
  * @see https://github.com/eslint-community/eslint-plugin-n
111
103
  */
112
104
  'n/no-unsupported-features/es-syntax': 'off'
@@ -4,15 +4,25 @@
4
4
 
5
5
  const overridesJavaScript = require('./overrides-javascript');
6
6
 
7
- /**
8
- * typescript-eslint
9
- *
10
- * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
11
- */
12
- overridesJavaScript.overrides[0].rules['@typescript-eslint/no-unsafe-argument'] = 'off';
13
- overridesJavaScript.overrides[0].rules['@typescript-eslint/no-unsafe-assignment'] = 'off';
14
- overridesJavaScript.overrides[0].rules['@typescript-eslint/no-unsafe-call'] = 'off';
15
- overridesJavaScript.overrides[0].rules['@typescript-eslint/no-unsafe-member-access'] = 'off';
16
- overridesJavaScript.overrides[0].rules['@typescript-eslint/no-unsafe-return'] = 'off';
7
+ module.exports = {
8
+ ...overridesJavaScript,
9
+ overrides: [
10
+ {
11
+ ...overridesJavaScript.overrides[0],
12
+ rules: {
13
+ ...overridesJavaScript.overrides[0].rules,
17
14
 
18
- module.exports = overridesJavaScript;
15
+ /**
16
+ * typescript-eslint
17
+ *
18
+ * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
19
+ */
20
+ '@typescript-eslint/no-unsafe-argument': 'off',
21
+ '@typescript-eslint/no-unsafe-assignment': 'off',
22
+ '@typescript-eslint/no-unsafe-call': 'off',
23
+ '@typescript-eslint/no-unsafe-member-access': 'off',
24
+ '@typescript-eslint/no-unsafe-return': 'off'
25
+ }
26
+ }
27
+ ]
28
+ };
@@ -5,7 +5,7 @@
5
5
  module.exports = {
6
6
  overrides: [
7
7
  {
8
- files: ['*.js'],
8
+ files: ['*.js', '*.mjs'],
9
9
  env: {
10
10
  node: true,
11
11
  es6: true
@@ -5,7 +5,7 @@
5
5
  module.exports = {
6
6
  overrides: [
7
7
  {
8
- files: ['*.js'],
8
+ files: ['*.js', '.mjs'],
9
9
  env: {
10
10
  node: true,
11
11
  es6: true
@@ -20,7 +20,6 @@ module.exports = {
20
20
  rules: {
21
21
  /**
22
22
  * "eslint-plugin-jsdoc" rules
23
- *
24
23
  * @see https://github.com/gajus/eslint-plugin-jsdoc
25
24
  */
26
25
  'jsdoc/check-access': 'error',
@@ -38,8 +37,8 @@ module.exports = {
38
37
  'jsdoc/match-description': 'error',
39
38
  'jsdoc/match-name': 'off',
40
39
  'jsdoc/multiline-blocks': ['error', { noSingleLineBlocks: true, singleLineTags: ['lends', 'type', 'typedef'], noFinalLineText: false }],
41
- 'jsdoc/newline-after-description': 'error',
42
40
  'jsdoc/no-bad-blocks': 'error',
41
+ 'jsdoc/no-blank-blocks': 'error',
43
42
  'jsdoc/no-defaults': 'off',
44
43
  'jsdoc/no-missing-syntax': 'off',
45
44
  'jsdoc/no-multi-asterisks': ['error', { preventAtEnd: false }],
@@ -64,17 +63,22 @@ module.exports = {
64
63
  'jsdoc/require-throws': 'error',
65
64
  'jsdoc/require-yields': 'error',
66
65
  'jsdoc/require-yields-check': 'error',
67
- 'jsdoc/tag-lines': ['error', 'any', {
66
+ 'jsdoc/tag-lines': ['error', 'always', {
68
67
  tags: {
69
68
  example: { lines: 'always' },
70
69
  file: { lines: 'always' },
71
70
  fileOverview: { lines: 'always' },
71
+ license: { lines: 'always' },
72
+ see: { lines: 'never' },
73
+ template: { lines: 'never' },
72
74
  param: { lines: 'never' },
73
75
  private: { lines: 'never' },
74
76
  protected: { lines: 'never' },
75
77
  public: { lines: 'never' }
76
78
  },
77
- noEndLines: true
79
+ startLines: null,
80
+ endLines: null,
81
+ applyToEndTag: false
78
82
  }],
79
83
  '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
80
84
  'jsdoc/valid-types': 'off' // Checked by TypeScript
@@ -43,7 +43,7 @@ module.exports = {
43
43
  }
44
44
  },
45
45
  {
46
- files: ['.storybook/preview.{js,jsx,ts,tsx}'],
46
+ files: ['.storybook/preview.{js,mjs,jsx,ts,tsx}'],
47
47
  rules: {
48
48
  /**
49
49
  * eslint
package/lint.js CHANGED
@@ -77,7 +77,7 @@ void (async () => {
77
77
  case 'ts': {
78
78
  const tsconfig = config['tsconfig']?.[0];
79
79
 
80
- const includes = getIncludes(gitFiles, './**/*.{js,jsx,ts,tsx}', config);
80
+ const includes = getIncludes(gitFiles, './**/*.{js,mjs,jsx,ts,tsx}', config);
81
81
 
82
82
  if (!includes) {
83
83
  return generateDummyJobOutput(taskName, config, {
@@ -142,44 +142,52 @@ void (async () => {
142
142
  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete -- This is not a valid `audit` property, so we need to remove it.
143
143
  delete config['git'];
144
144
 
145
- if (npmOrYarn === 'npm') {
146
- return runTask({
147
- taskName,
148
- config,
149
- command: [
150
- 'npx',
151
- '--yes',
152
- '--',
153
- 'better-npm-audit@1.9.1',
154
- 'audit',
155
- `-l ${config['min-severity'] ?? 'moderate'}`,
156
- '-p',
157
- config['exclude']?.map((exclude) => `-i ${exclude}`).join(' ')
158
- ].filter((argument) => Boolean(argument)).join(' ')
159
- });
160
- }
161
- else if (npmOrYarn === 'yarn') {
162
- return runTask({
163
- taskName,
164
- config,
165
- command: [
166
- 'npx',
167
- '--yes',
168
- '--',
169
- 'improved-yarn-audit@2.3.3',
170
- `--min-severity ${config['min-severity'] ?? 'moderate'}`,
171
- '--fail-on-missing-exclusions',
172
- '--ignore-dev-deps',
173
- config['exclude']?.map((exclude) => `--exclude ${exclude}`).join(' ')
174
- ].filter((argument) => Boolean(argument)).join(' ')
175
- });
145
+ switch (npmOrYarn) {
146
+ case 'npm':
147
+ return runTask({
148
+ taskName,
149
+ config,
150
+ command: [
151
+ 'npx',
152
+ '--yes',
153
+ '--',
154
+ 'better-npm-audit@1.9.1',
155
+ 'audit',
156
+ `-l ${config['min-severity'] ?? 'moderate'}`,
157
+ '-p',
158
+ config['exclude']?.map((exclude) => `-i ${exclude}`).join(' ')
159
+ ].filter((argument) => Boolean(argument)).join(' ')
160
+ });
161
+
162
+ case 'yarn':
163
+ return runTask({
164
+ taskName,
165
+ config,
166
+ command: [
167
+ 'npx',
168
+ '--yes',
169
+ '--',
170
+ 'improved-yarn-audit@2.3.3',
171
+ `--min-severity ${config['min-severity'] ?? 'moderate'}`,
172
+ '--fail-on-missing-exclusions',
173
+ '--ignore-dev-deps',
174
+ config['exclude']?.map((exclude) => `--exclude ${exclude}`).join(' ')
175
+ ].filter((argument) => Boolean(argument)).join(' ')
176
+ });
177
+
178
+ case 'both':
179
+ return generateDummyJobOutput(taskName, config, {
180
+ code: 1,
181
+ stderr: 'A "package-lock.json" and "yarn.lock" have been found. Use only one package manager within the project to avoid potential conflicts.'
182
+ });
183
+
184
+ default:
185
+ return generateDummyJobOutput(taskName, config, {
186
+ code: 1,
187
+ stderr: 'Neither a "package-lock.json" nor a "yarn.lock" have been found.'
188
+ });
176
189
  }
177
190
 
178
- return generateDummyJobOutput(taskName, config, {
179
- code: 1,
180
- stderr: 'Neither a "package-lock.json" nor a "yarn.lock" have need found.'
181
- });
182
-
183
191
  default:
184
192
  }
185
193
 
@@ -242,6 +250,7 @@ void (async () => {
242
250
  *
243
251
  * @param {ReturnType<isNpmOrYarn>} npmOrYarn - This should be the return value of `isNpmOrYarn()`.
244
252
  * @returns {boolean} Returns `true` if the environment is valid, otherwise `false` is returned.
253
+ *
245
254
  */
246
255
  function validateEnvironment (npmOrYarn) {
247
256
  const outdatedOverrides = validatePackageOverrides();
@@ -294,6 +303,7 @@ function validateEnvironment (npmOrYarn) {
294
303
  *
295
304
  * @param {string[]} argv - Command-line arguments (usual `process.argv.splice(2)`)
296
305
  * @returns {TaskNameAndConfig[]} The task execution setup.
306
+ *
297
307
  * @throws {Error} If no task has be specified in the arguments.
298
308
  */
299
309
  function getTasksToRun (argv) {
@@ -360,6 +370,7 @@ function getTasksToRun (argv) {
360
370
  * @param {string} pattern - Glob pattern
361
371
  * @param {Partial<Record<string, (string | true)[]>>} config - Linter configuration
362
372
  * @returns {string} Space-separated file names in double-quotes to be used in the command-line, or an empty string if no file matches.
373
+ *
363
374
  */
364
375
  function getIncludes (list, pattern, config) {
365
376
  const include = config['include']?.[0];
@@ -382,6 +393,7 @@ function getIncludes (list, pattern, config) {
382
393
  *
383
394
  * @param {TaskSetup} setup - The task execution setup.
384
395
  * @returns {Job} Job
396
+ *
385
397
  */
386
398
  function runTask (setup) {
387
399
  return {
@@ -398,6 +410,7 @@ function runTask (setup) {
398
410
  * @param {Partial<Record<string, (string | true)[]>>} config - The configuration of the task.
399
411
  * @param {{ code?: number; stdout?: string; stderr?: string; }} output - The output which should be returned as result of the job.
400
412
  * @returns {Job} Job
413
+ *
401
414
  */
402
415
  function generateDummyJobOutput (taskName, config, output) {
403
416
  return {
@@ -426,6 +439,7 @@ function generateDummyJobOutput (taskName, config, output) {
426
439
  *
427
440
  * @param {TaskSetup} setup - The task execution setup.
428
441
  * @returns {string} The title of the job with a leading line-break and two trailing line-breaks.
442
+ *
429
443
  */
430
444
  function getJobTitle (setup) {
431
445
  /** @type {string} */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.27.0",
3
+ "version": "2.29.0",
4
4
  "description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -32,50 +32,50 @@
32
32
  "publish:major": "npm version major",
33
33
  "publish:minor": "npm version minor",
34
34
  "publish:patch": "npm version patch",
35
- "lint": "npm run validate-stylelint-options && node ./lint tsc ts md audit --min-severity=critical",
36
- "preversion": "npm run check-outdated && npm run stylelint-find-rules && npm run lint",
35
+ "lint": "npm run validate-stylelint-options && npm run stylelint-find-rules && node ./lint tsc ts md audit --min-severity=critical",
36
+ "preversion": "npm run check-outdated && npm run lint",
37
37
  "postversion": "git push && git push --tags && npm publish",
38
38
  "stylelint-find-rules": "stylelint-find-new-rules ./stylelint/index.js",
39
39
  "validate-stylelint-options": "node ./validate-stylelint-options",
40
40
  "check-outdated": "npx --yes -- check-outdated --ignore-pre-releases"
41
41
  },
42
42
  "dependencies": {
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",
43
+ "@typescript-eslint/eslint-plugin": "5.59.2",
44
+ "@typescript-eslint/parser": "5.59.2",
45
+ "@typescript-eslint/utils": "5.59.2",
46
+ "eslint": "8.39.0",
47
+ "eslint-import-resolver-typescript": "3.5.5",
48
48
  "eslint-import-resolver-webpack": "0.13.2",
49
49
  "eslint-plugin-eslint-comments": "3.2.0",
50
- "eslint-plugin-functional": "4.4.1",
50
+ "eslint-plugin-functional": "5.0.8",
51
51
  "eslint-plugin-import": "2.27.5",
52
52
  "eslint-plugin-jest": "27.2.1",
53
- "eslint-plugin-jsdoc": "39.6.9",
53
+ "eslint-plugin-jsdoc": "43.2.0",
54
54
  "eslint-plugin-jsx-a11y": "6.7.1",
55
- "eslint-plugin-n": "15.6.1",
55
+ "eslint-plugin-n": "15.7.0",
56
56
  "eslint-plugin-promise": "6.1.1",
57
- "eslint-plugin-react": "7.32.1",
57
+ "eslint-plugin-react": "7.32.2",
58
58
  "eslint-plugin-react-hooks": "4.6.0",
59
- "eslint-plugin-unicorn": "45.0.2",
60
- "markdownlint-cli": "0.33.0",
59
+ "eslint-plugin-unicorn": "46.0.0",
60
+ "markdownlint-cli": "0.34.0",
61
61
  "micromatch": "4.0.5",
62
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
- "stylelint-scss": "4.3.0",
63
+ "stylelint": "15.6.1",
64
+ "stylelint-declaration-block-no-ignored-properties": "2.7.0",
65
+ "stylelint-order": "6.0.3",
66
+ "stylelint-scss": "5.0.0",
67
67
  "stylelint-selector-no-empty": "1.0.9",
68
- "stylelint-use-logical-spec": "4.1.0"
68
+ "stylelint-use-logical-spec": "5.0.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "postcss-value-parser": "*",
72
72
  "typescript": "^4.0.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@types/eslint": "8.4.10",
75
+ "@types/eslint": "8.37.0",
76
76
  "@types/micromatch": "4.0.2",
77
- "@types/node": "18.11.18",
78
- "stylelint-find-new-rules": "4.0.0",
79
- "typescript": "4.9.4"
77
+ "@types/node": "20.0.0",
78
+ "stylelint-find-new-rules": "4.1.0",
79
+ "typescript": "5.0.4"
80
80
  }
81
81
  }
@@ -18,7 +18,8 @@ module.exports = {
18
18
  'stylelint-selector-no-empty',
19
19
  'stylelint-use-logical-spec',
20
20
  path.join(__dirname, '/plugins/stylelint-high-performance-animation.js'),
21
- path.join(__dirname, '/plugins/stylelint-selector-tag-no-without-class.js')
21
+ path.join(__dirname, '/plugins/stylelint-selector-tag-no-without-class.js'),
22
+ path.join(__dirname, '/plugins/stylelint-stylistic.js')
22
23
  ],
23
24
  overrides: [
24
25
  {
@@ -83,29 +84,18 @@ module.exports = {
83
84
  ]
84
85
  }
85
86
  ],
86
- 'at-rule-name-case': 'lower',
87
- 'at-rule-name-newline-after': null,
88
- 'at-rule-name-space-after': 'always-single-line',
89
87
  'at-rule-no-unknown': null, // scss/at-rule-no-unknown
90
88
  'at-rule-no-vendor-prefix': true,
91
89
  'at-rule-property-required-list': [{
92
90
  'font-face': ['font-family', 'font-style', 'font-weight', 'src']
93
91
  }],
94
- 'at-rule-semicolon-newline-after': 'always',
95
- 'at-rule-semicolon-space-before': 'never',
96
- 'block-closing-brace-empty-line-before': 'never',
97
- 'block-closing-brace-newline-after': 'always',
98
- 'block-closing-brace-newline-before': 'always-multi-line',
99
- 'block-closing-brace-space-after': null,
100
- 'block-closing-brace-space-before': 'always-single-line',
101
92
  'block-no-empty': true,
102
- 'block-opening-brace-newline-after': 'always-multi-line',
103
- 'block-opening-brace-newline-before': null,
104
- 'block-opening-brace-space-after': 'always-single-line',
105
- 'block-opening-brace-space-before': 'always',
106
- 'color-function-notation': null, // @todo Doesn't work with variables like: hsl(var(--xyz)). Create issue. Later change that to 'modern'.
93
+ 'color-function-notation': [
94
+ 'modern', {
95
+ ignore: ['with-var-inside']
96
+ }
97
+ ],
107
98
  'color-hex-alpha': null, // @todo Not widely supported yet. Activate in 2024.
108
- 'color-hex-case': 'lower',
109
99
  'color-hex-length': 'short',
110
100
  'color-named': 'never',
111
101
  'color-no-hex': true,
@@ -125,8 +115,6 @@ module.exports = {
125
115
  'custom-property-empty-line-before': null, // Empty lines between custom properties are optional
126
116
  'custom-property-no-missing-var-function': true,
127
117
  'custom-property-pattern': (global.linterBundleSettings?.patternPrefix ? `${global.linterBundleSettings.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)*` : null),
128
- 'declaration-bang-space-after': 'never',
129
- 'declaration-bang-space-before': 'always',
130
118
  'declaration-block-no-duplicate-custom-properties': true,
131
119
  'declaration-block-no-duplicate-properties': [
132
120
  true,
@@ -136,15 +124,7 @@ module.exports = {
136
124
  ],
137
125
  'declaration-block-no-redundant-longhand-properties': [true, { ignoreShorthands: [/^grid-template/u] }],
138
126
  'declaration-block-no-shorthand-property-overrides': true,
139
- 'declaration-block-semicolon-newline-after': 'always-multi-line',
140
- 'declaration-block-semicolon-newline-before': 'never-multi-line',
141
- 'declaration-block-semicolon-space-after': 'always-single-line',
142
- 'declaration-block-semicolon-space-before': 'never',
143
127
  'declaration-block-single-line-max-declarations': 1,
144
- 'declaration-block-trailing-semicolon': 'always',
145
- 'declaration-colon-newline-after': 'always-multi-line',
146
- 'declaration-colon-space-after': 'always-single-line',
147
- 'declaration-colon-space-before': 'never',
148
128
  'declaration-empty-line-before': [
149
129
  'always',
150
130
  {
@@ -171,74 +151,55 @@ module.exports = {
171
151
  'declaration-property-unit-disallowed-list': null,
172
152
  'declaration-property-value-allowed-list': null,
173
153
  'declaration-property-value-disallowed-list': null,
154
+ 'declaration-property-value-no-unknown': [
155
+ true,
156
+ {
157
+ ignoreProperties: {
158
+ 'initial-value': '/.+/'
159
+ }
160
+ }
161
+ ],
174
162
  'font-family-name-quotes': 'always-where-recommended',
175
163
  'font-family-no-duplicate-names': true,
176
164
  'font-family-no-missing-generic-family-keyword': true,
177
165
  'font-weight-notation': 'numeric',
178
166
  'function-allowed-list': null,
179
167
  'function-calc-no-unspaced-operator': true,
180
- 'function-comma-newline-after': 'always-multi-line',
181
- 'function-comma-newline-before': 'never-multi-line',
182
- 'function-comma-space-after': 'always-single-line',
183
- 'function-comma-space-before': 'never',
184
168
  'function-disallowed-list': null,
185
169
  'function-linear-gradient-no-nonstandard-direction': true,
186
- 'function-max-empty-lines': 0,
187
170
  'function-name-case': 'lower',
188
171
  'function-no-unknown': null, // Implemented by scss/function-no-unknown
189
- 'function-parentheses-newline-inside': 'always-multi-line',
190
- 'function-parentheses-space-inside': 'never-single-line',
191
172
  'function-url-no-scheme-relative': true,
192
173
  'function-url-quotes': 'always',
193
174
  'function-url-scheme-disallowed-list': null,
194
175
  'function-url-scheme-allowed-list': null,
195
- 'function-whitespace-after': 'always',
196
176
  'hue-degree-notation': 'number', // @todo change that to 'angle'?
197
177
  '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.
198
- 'indentation': 'tab',
199
178
  'keyframe-block-no-duplicate-selectors': true,
200
179
  'keyframe-declaration-no-important': true,
201
180
  'keyframe-selector-notation': 'percentage',
202
181
  'keyframes-name-pattern': '^[a-z]+(-[a-z]+)*\\d*$',
203
182
  'length-zero-no-unit': true,
204
- 'linebreaks': 'unix',
205
- 'max-empty-lines': 1,
206
- 'max-line-length': 160,
207
183
  'max-nesting-depth': 6,
208
- 'media-feature-colon-space-after': 'always',
209
- 'media-feature-colon-space-before': 'never',
210
184
  'media-feature-name-allowed-list': null,
211
- 'media-feature-name-case': 'lower',
212
185
  'media-feature-name-disallowed-list': null,
213
186
  'media-feature-name-no-unknown': true,
214
187
  'media-feature-name-no-vendor-prefix': null, // For Safari, we still need "-webkit-min-device-pixel-ratio": https://caniuse.com/css-media-resolution
188
+ 'media-feature-name-unit-allowed-list': null,
215
189
  'media-feature-name-value-allowed-list': null,
216
- 'media-feature-parentheses-space-inside': 'never',
217
190
  'media-feature-range-notation': 'prefix',
218
- 'media-feature-range-operator-space-after': 'always',
219
- 'media-feature-range-operator-space-before': 'always',
220
- 'media-query-list-comma-newline-after': 'always-multi-line',
221
- 'media-query-list-comma-newline-before': 'never-multi-line',
222
- 'media-query-list-comma-space-after': 'always-single-line',
223
- 'media-query-list-comma-space-before': 'never',
224
191
  'named-grid-areas-no-invalid': true,
225
192
  'no-descending-specificity': null, // doesn't work in many cases (e.g. while using the SCSS :global()-pseudo-class)
226
193
  'no-duplicate-at-import-rules': true,
227
194
  'no-duplicate-selectors': true,
228
- 'no-empty-first-line': true,
229
195
  'no-empty-source': true,
230
- 'no-eol-whitespace': true,
231
- 'no-extra-semicolons': true,
232
196
  'no-invalid-double-slash-comments': true,
233
197
  'no-invalid-position-at-import-rule': true,
234
198
  'no-irregular-whitespace': true,
235
- 'no-missing-end-of-source-newline': true,
236
199
  'no-unknown-animations': true,
237
- 'number-leading-zero': 'always',
200
+ 'no-unknown-custom-properties': null, // @todo Activate in 2025 as Firefox currently does not support "@property" and there is no way to specify which custom properties are available
238
201
  'number-max-precision': 5,
239
- 'number-no-trailing-zeros': true,
240
202
  'property-allowed-list': null,
241
- 'property-case': 'lower',
242
203
  'property-disallowed-list': [
243
204
  'font', // Shorthand property is to complex
244
205
  'grid-gap', // @deprecated Use gap.
@@ -258,30 +219,20 @@ module.exports = {
258
219
  ignore: ['after-comment']
259
220
  }
260
221
  ],
261
- 'selector-attribute-brackets-space-inside': 'never',
222
+ 'selector-anb-no-unmatchable': true,
262
223
  'selector-attribute-name-disallowed-list': null,
263
224
  'selector-attribute-operator-allowed-list': null,
264
225
  'selector-attribute-operator-disallowed-list': null,
265
- 'selector-attribute-operator-space-after': 'never',
266
- 'selector-attribute-operator-space-before': 'never',
267
226
  'selector-attribute-quotes': 'always',
268
227
  'selector-class-pattern': null,
269
228
  'selector-combinator-allowed-list': null,
270
229
  'selector-combinator-disallowed-list': null,
271
- 'selector-combinator-space-after': 'always',
272
- 'selector-combinator-space-before': 'always',
273
- 'selector-descendant-combinator-no-non-space': true,
274
230
  'selector-disallowed-list': null,
275
231
  'selector-id-pattern': '^[a-z]+(-[a-z]+)*$',
276
- 'selector-list-comma-newline-after': 'always',
277
- 'selector-list-comma-newline-before': 'never-multi-line',
278
- 'selector-list-comma-space-after': 'always-single-line',
279
- 'selector-list-comma-space-before': 'never',
280
232
  'selector-max-attribute': 1,
281
233
  'selector-max-class': 5,
282
234
  'selector-max-combinators': 5,
283
235
  'selector-max-compound-selectors': 5,
284
- 'selector-max-empty-lines': 0,
285
236
  'selector-max-id': 1,
286
237
  'selector-max-pseudo-class': 3,
287
238
  'selector-max-specificity': [
@@ -297,12 +248,9 @@ module.exports = {
297
248
  'selector-no-vendor-prefix': true,
298
249
  'selector-not-notation': null, // 'complex', @todo Reactivate in 2024. Disabled for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
299
250
  'selector-pseudo-class-allowed-list': null,
300
- 'selector-pseudo-class-case': 'lower',
301
251
  'selector-pseudo-class-disallowed-list': null,
302
252
  'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['global'] }],
303
- 'selector-pseudo-class-parentheses-space-inside': 'never',
304
253
  'selector-pseudo-element-allowed-list': null,
305
- 'selector-pseudo-element-case': 'lower',
306
254
  'selector-pseudo-element-disallowed-list': null,
307
255
  'selector-pseudo-element-colon-notation': 'double',
308
256
  'selector-pseudo-element-no-unknown': true,
@@ -310,11 +258,8 @@ module.exports = {
310
258
  'selector-type-no-unknown': true,
311
259
  'shorthand-property-no-redundant-values': true,
312
260
  'string-no-newline': true,
313
- 'string-quotes': 'double',
314
261
  'time-min-milliseconds': 40, // @todo For the delay of transitions 40ms should be the minimum, for the duration 150ms should be the minimum (change it, as soon as https://github.com/stylelint/stylelint/issues/4552 got implemented)
315
- 'unicode-bom': 'never',
316
262
  'unit-allowed-list': null,
317
- 'unit-case': 'lower',
318
263
  'unit-disallowed-list': null,
319
264
  'unit-no-unknown': true,
320
265
  'value-keyword-case': [
@@ -323,11 +268,6 @@ module.exports = {
323
268
  camelCaseSvgKeywords: true
324
269
  }
325
270
  ],
326
- 'value-list-comma-newline-after': 'always-multi-line',
327
- 'value-list-comma-newline-before': 'never-multi-line',
328
- 'value-list-comma-space-after': 'always-single-line',
329
- 'value-list-comma-space-before': 'never',
330
- 'value-list-max-empty-lines': 0,
331
271
  'value-no-vendor-prefix': true,
332
272
 
333
273
  /**
@@ -347,6 +287,83 @@ module.exports = {
347
287
  severity: 'warning'
348
288
  }],
349
289
 
290
+ /**
291
+ * stylelint-stylistic rules
292
+ */
293
+ 'plugin/at-rule-name-case': 'lower',
294
+ 'plugin/at-rule-name-space-after': 'always-single-line',
295
+ 'plugin/at-rule-semicolon-newline-after': 'always',
296
+ 'plugin/at-rule-semicolon-space-before': 'never',
297
+ 'plugin/block-closing-brace-empty-line-before': 'never',
298
+ 'plugin/block-closing-brace-newline-after': 'always',
299
+ 'plugin/block-closing-brace-newline-before': 'always-multi-line',
300
+ 'plugin/block-closing-brace-space-before': 'always-single-line',
301
+ 'plugin/block-opening-brace-newline-after': 'always-multi-line',
302
+ 'plugin/block-opening-brace-space-after': 'always-single-line',
303
+ 'plugin/block-opening-brace-space-before': 'always',
304
+ 'plugin/color-hex-case': 'lower',
305
+ 'plugin/declaration-bang-space-after': 'never',
306
+ 'plugin/declaration-bang-space-before': 'always',
307
+ 'plugin/declaration-block-semicolon-newline-after': 'always-multi-line',
308
+ 'plugin/declaration-block-semicolon-newline-before': 'never-multi-line',
309
+ 'plugin/declaration-block-semicolon-space-after': 'always-single-line',
310
+ 'plugin/declaration-block-semicolon-space-before': 'never',
311
+ 'plugin/declaration-block-trailing-semicolon': 'always',
312
+ 'plugin/declaration-colon-newline-after': 'always-multi-line',
313
+ 'plugin/declaration-colon-space-after': 'always-single-line',
314
+ 'plugin/declaration-colon-space-before': 'never',
315
+ 'plugin/function-comma-newline-after': 'always-multi-line',
316
+ 'plugin/function-comma-newline-before': 'never-multi-line',
317
+ 'plugin/function-comma-space-after': 'always-single-line',
318
+ 'plugin/function-comma-space-before': 'never',
319
+ 'plugin/function-max-empty-lines': 0,
320
+ 'plugin/function-parentheses-newline-inside': 'always-multi-line',
321
+ 'plugin/function-parentheses-space-inside': 'never-single-line',
322
+ 'plugin/function-whitespace-after': 'always',
323
+ 'plugin/indentation': 'tab',
324
+ 'plugin/linebreaks': 'unix',
325
+ 'plugin/max-empty-lines': 1,
326
+ 'plugin/max-line-length': 160,
327
+ 'plugin/media-feature-colon-space-after': 'always',
328
+ 'plugin/media-feature-colon-space-before': 'never',
329
+ 'plugin/media-feature-name-case': 'lower',
330
+ 'plugin/media-feature-parentheses-space-inside': 'never',
331
+ 'plugin/media-feature-range-operator-space-after': 'always',
332
+ 'plugin/media-feature-range-operator-space-before': 'always',
333
+ 'plugin/media-query-list-comma-newline-after': 'always-multi-line',
334
+ 'plugin/media-query-list-comma-newline-before': 'never-multi-line',
335
+ 'plugin/media-query-list-comma-space-after': 'always-single-line',
336
+ 'plugin/media-query-list-comma-space-before': 'never',
337
+ 'plugin/no-empty-first-line': true,
338
+ 'plugin/no-eol-whitespace': true,
339
+ 'plugin/no-extra-semicolons': true,
340
+ 'plugin/no-missing-end-of-source-newline': true,
341
+ 'plugin/number-leading-zero': 'always',
342
+ 'plugin/number-no-trailing-zeros': true,
343
+ 'plugin/property-case': 'lower',
344
+ 'plugin/selector-attribute-brackets-space-inside': 'never',
345
+ 'plugin/selector-attribute-operator-space-after': 'never',
346
+ 'plugin/selector-attribute-operator-space-before': 'never',
347
+ 'plugin/selector-combinator-space-after': 'always',
348
+ 'plugin/selector-combinator-space-before': 'always',
349
+ 'plugin/selector-descendant-combinator-no-non-space': true,
350
+ 'plugin/selector-list-comma-newline-after': 'always',
351
+ 'plugin/selector-list-comma-newline-before': 'never-multi-line',
352
+ 'plugin/selector-list-comma-space-after': 'always-single-line',
353
+ 'plugin/selector-list-comma-space-before': 'never',
354
+ 'plugin/selector-max-empty-lines': 0,
355
+ 'plugin/selector-pseudo-class-case': 'lower',
356
+ 'plugin/selector-pseudo-class-parentheses-space-inside': 'never',
357
+ 'plugin/selector-pseudo-element-case': 'lower',
358
+ 'plugin/string-quotes': 'double',
359
+ 'plugin/unicode-bom': 'never',
360
+ 'plugin/unit-case': 'lower',
361
+ 'plugin/value-list-comma-newline-after': 'always-multi-line',
362
+ 'plugin/value-list-comma-newline-before': 'never-multi-line',
363
+ 'plugin/value-list-comma-space-after': 'always-single-line',
364
+ 'plugin/value-list-comma-space-before': 'never',
365
+ 'plugin/value-list-max-empty-lines': 0,
366
+
350
367
  /**
351
368
  * stylelint-order
352
369
  *
@@ -426,6 +443,7 @@ module.exports = {
426
443
  emptyLineBefore: 'always',
427
444
  noEmptyLineBetween: true,
428
445
  properties: [
446
+ 'inset',
429
447
  'top',
430
448
  'right',
431
449
  'bottom',
@@ -938,6 +956,7 @@ module.exports = {
938
956
  'liberty/use-logical-spec': ['always', { except: [
939
957
  'float',
940
958
 
959
+ 'inset',
941
960
  'top',
942
961
  'bottom',
943
962
 
@@ -2,6 +2,7 @@
2
2
  * @file Fork of `stylelint-high-performance-animation` rule.
3
3
  *
4
4
  * @license MIT
5
+ *
5
6
  * @see https://github.com/kristerkari/stylelint-high-performance-animation
6
7
  */
7
8
 
@@ -2,6 +2,7 @@
2
2
  * @file Fork of `stylelint-selector-tag-no-without-class` rule.
3
3
  *
4
4
  * @license MIT
5
+ *
5
6
  * @see https://github.com/Moxio/stylelint-selector-tag-no-without-class
6
7
  */
7
8
 
@@ -0,0 +1,187 @@
1
+ /**
2
+ * @file Fork of the stylistic Stylelint rules.
3
+ *
4
+ * Stylistic rules have been deprecated in Stylelint v15 and will be removed in Stylelint v16, in favour of Prettier.
5
+ * To provide a smooth transition, we will fork them from the latest 15.x version which will contain them.
6
+ *
7
+ * The following stylistic rules are not considered, as they are not used by `linter-bundle`:
8
+ * - at-rule-name-newline-after
9
+ * - block-closing-brace-space-after
10
+ * - block-opening-brace-newline-before
11
+ *
12
+ * @license MIT
13
+ *
14
+ * @see https://stylelint.io/user-guide/rules/at-rule-name-case
15
+ * @see https://stylelint.io/user-guide/rules/at-rule-name-space-after
16
+ * @see https://stylelint.io/user-guide/rules/at-rule-semicolon-newline-after
17
+ * @see https://stylelint.io/user-guide/rules/at-rule-semicolon-space-before
18
+ * @see https://stylelint.io/user-guide/rules/block-closing-brace-empty-line-before
19
+ * @see https://stylelint.io/user-guide/rules/block-closing-brace-newline-after
20
+ * @see https://stylelint.io/user-guide/rules/block-closing-brace-newline-before
21
+ * @see https://stylelint.io/user-guide/rules/block-closing-brace-space-before
22
+ * @see https://stylelint.io/user-guide/rules/block-opening-brace-newline-after
23
+ * @see https://stylelint.io/user-guide/rules/block-opening-brace-space-after
24
+ * @see https://stylelint.io/user-guide/rules/block-opening-brace-space-before
25
+ * @see https://stylelint.io/user-guide/rules/color-hex-case
26
+ * @see https://stylelint.io/user-guide/rules/declaration-bang-space-after
27
+ * @see https://stylelint.io/user-guide/rules/declaration-bang-space-before
28
+ * @see https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-after
29
+ * @see https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-before
30
+ * @see https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-after
31
+ * @see https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-before
32
+ * @see https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon
33
+ * @see https://stylelint.io/user-guide/rules/declaration-colon-newline-after
34
+ * @see https://stylelint.io/user-guide/rules/declaration-colon-space-after
35
+ * @see https://stylelint.io/user-guide/rules/declaration-colon-space-before
36
+ * @see https://stylelint.io/user-guide/rules/function-comma-newline-after
37
+ * @see https://stylelint.io/user-guide/rules/function-comma-newline-before
38
+ * @see https://stylelint.io/user-guide/rules/function-comma-space-after
39
+ * @see https://stylelint.io/user-guide/rules/function-comma-space-before
40
+ * @see https://stylelint.io/user-guide/rules/function-max-empty-lines
41
+ * @see https://stylelint.io/user-guide/rules/function-parentheses-newline-inside
42
+ * @see https://stylelint.io/user-guide/rules/function-parentheses-space-inside
43
+ * @see https://stylelint.io/user-guide/rules/function-whitespace-after
44
+ * @see https://stylelint.io/user-guide/rules/indentation
45
+ * @see https://stylelint.io/user-guide/rules/linebreaks
46
+ * @see https://stylelint.io/user-guide/rules/max-empty-lines
47
+ * @see https://stylelint.io/user-guide/rules/max-line-length
48
+ * @see https://stylelint.io/user-guide/rules/media-feature-colon-space-after
49
+ * @see https://stylelint.io/user-guide/rules/media-feature-colon-space-before
50
+ * @see https://stylelint.io/user-guide/rules/media-feature-name-case
51
+ * @see https://stylelint.io/user-guide/rules/media-feature-parentheses-space-inside
52
+ * @see https://stylelint.io/user-guide/rules/media-feature-range-operator-space-after
53
+ * @see https://stylelint.io/user-guide/rules/media-feature-range-operator-space-before
54
+ * @see https://stylelint.io/user-guide/rules/media-query-list-comma-newline-after
55
+ * @see https://stylelint.io/user-guide/rules/media-query-list-comma-newline-before
56
+ * @see https://stylelint.io/user-guide/rules/media-query-list-comma-space-after
57
+ * @see https://stylelint.io/user-guide/rules/media-query-list-comma-space-before
58
+ * @see https://stylelint.io/user-guide/rules/no-empty-first-line
59
+ * @see https://stylelint.io/user-guide/rules/no-eol-whitespace
60
+ * @see https://stylelint.io/user-guide/rules/no-extra-semicolons
61
+ * @see https://stylelint.io/user-guide/rules/no-missing-end-of-source-newline
62
+ * @see https://stylelint.io/user-guide/rules/number-leading-zero
63
+ * @see https://stylelint.io/user-guide/rules/number-no-trailing-zeros
64
+ * @see https://stylelint.io/user-guide/rules/property-case
65
+ * @see https://stylelint.io/user-guide/rules/selector-attribute-brackets-space-inside
66
+ * @see https://stylelint.io/user-guide/rules/selector-attribute-operator-space-after
67
+ * @see https://stylelint.io/user-guide/rules/selector-attribute-operator-space-before
68
+ * @see https://stylelint.io/user-guide/rules/selector-combinator-space-after
69
+ * @see https://stylelint.io/user-guide/rules/selector-combinator-space-before
70
+ * @see https://stylelint.io/user-guide/rules/selector-descendant-combinator-no-non-space
71
+ * @see https://stylelint.io/user-guide/rules/selector-list-comma-newline-after
72
+ * @see https://stylelint.io/user-guide/rules/selector-list-comma-newline-before
73
+ * @see https://stylelint.io/user-guide/rules/selector-list-comma-space-after
74
+ * @see https://stylelint.io/user-guide/rules/selector-list-comma-space-before
75
+ * @see https://stylelint.io/user-guide/rules/selector-max-empty-lines
76
+ * @see https://stylelint.io/user-guide/rules/selector-pseudo-class-case
77
+ * @see https://stylelint.io/user-guide/rules/selector-pseudo-class-parentheses-space-inside
78
+ * @see https://stylelint.io/user-guide/rules/selector-pseudo-element-case
79
+ * @see https://stylelint.io/user-guide/rules/string-quotes
80
+ * @see https://stylelint.io/user-guide/rules/unicode-bom
81
+ * @see https://stylelint.io/user-guide/rules/unit-case
82
+ * @see https://stylelint.io/user-guide/rules/value-list-comma-newline-after
83
+ * @see https://stylelint.io/user-guide/rules/value-list-comma-newline-before
84
+ * @see https://stylelint.io/user-guide/rules/value-list-comma-space-after
85
+ * @see https://stylelint.io/user-guide/rules/value-list-comma-space-before
86
+ * @see https://stylelint.io/user-guide/rules/value-list-max-empty-lines
87
+ */
88
+
89
+ const stylelint = require('stylelint');
90
+
91
+ module.exports = [
92
+ 'at-rule-name-case',
93
+ 'at-rule-name-space-after',
94
+ 'at-rule-semicolon-newline-after',
95
+ 'at-rule-semicolon-space-before',
96
+ 'block-closing-brace-empty-line-before',
97
+ 'block-closing-brace-newline-after',
98
+ 'block-closing-brace-newline-before',
99
+ 'block-closing-brace-space-before',
100
+ 'block-opening-brace-newline-after',
101
+ 'block-opening-brace-space-after',
102
+ 'block-opening-brace-space-before',
103
+ 'color-hex-case',
104
+ 'declaration-bang-space-after',
105
+ 'declaration-bang-space-before',
106
+ 'declaration-block-semicolon-newline-after',
107
+ 'declaration-block-semicolon-newline-before',
108
+ 'declaration-block-semicolon-space-after',
109
+ 'declaration-block-semicolon-space-before',
110
+ 'declaration-block-trailing-semicolon',
111
+ 'declaration-colon-newline-after',
112
+ 'declaration-colon-space-after',
113
+ 'declaration-colon-space-before',
114
+ 'function-comma-newline-after',
115
+ 'function-comma-newline-before',
116
+ 'function-comma-space-after',
117
+ 'function-comma-space-before',
118
+ 'function-max-empty-lines',
119
+ 'function-parentheses-newline-inside',
120
+ 'function-parentheses-space-inside',
121
+ 'function-whitespace-after',
122
+ 'indentation',
123
+ 'linebreaks',
124
+ 'max-empty-lines',
125
+ 'max-line-length',
126
+ 'media-feature-colon-space-after',
127
+ 'media-feature-colon-space-before',
128
+ 'media-feature-name-case',
129
+ 'media-feature-parentheses-space-inside',
130
+ 'media-feature-range-operator-space-after',
131
+ 'media-feature-range-operator-space-before',
132
+ 'media-query-list-comma-newline-after',
133
+ 'media-query-list-comma-newline-before',
134
+ 'media-query-list-comma-space-after',
135
+ 'media-query-list-comma-space-before',
136
+ 'no-empty-first-line',
137
+ 'no-eol-whitespace',
138
+ 'no-extra-semicolons',
139
+ 'no-missing-end-of-source-newline',
140
+ 'number-leading-zero',
141
+ 'number-no-trailing-zeros',
142
+ 'property-case',
143
+ 'selector-attribute-brackets-space-inside',
144
+ 'selector-attribute-operator-space-after',
145
+ 'selector-attribute-operator-space-before',
146
+ 'selector-combinator-space-after',
147
+ 'selector-combinator-space-before',
148
+ 'selector-descendant-combinator-no-non-space',
149
+ 'selector-list-comma-newline-after',
150
+ 'selector-list-comma-newline-before',
151
+ 'selector-list-comma-space-after',
152
+ 'selector-list-comma-space-before',
153
+ 'selector-max-empty-lines',
154
+ 'selector-pseudo-class-case',
155
+ 'selector-pseudo-class-parentheses-space-inside',
156
+ 'selector-pseudo-element-case',
157
+ 'string-quotes',
158
+ 'unicode-bom',
159
+ 'unit-case',
160
+ 'value-list-comma-newline-after',
161
+ 'value-list-comma-newline-before',
162
+ 'value-list-comma-space-after',
163
+ 'value-list-comma-space-before',
164
+ 'value-list-max-empty-lines'
165
+ ].map((ruleName) => {
166
+ // eslint-disable-next-line import/no-dynamic-require -- Dynamic require reduces code complexity
167
+ const rule = require(`stylelint/lib/rules/${ruleName}`);
168
+
169
+ const forkedRule = Object.assign(
170
+ /**
171
+ * Wrapper for the original rule, to be able to manipulate the additional properties.
172
+ *
173
+ * @param {Parameters<import('stylelint').RuleBase>} args - The arguments of the rule function
174
+ * @returns {ReturnType<import('stylelint').RuleBase>} The return value of the rule function
175
+ */
176
+ (...args) => rule(...args),
177
+ rule
178
+ );
179
+
180
+ forkedRule.ruleName = `plugin/${ruleName}`;
181
+ forkedRule.meta = {
182
+ ...rule.meta,
183
+ deprecated: false
184
+ };
185
+
186
+ return stylelint.createPlugin(`plugin/${ruleName}`, forkedRule);
187
+ });
@@ -15,7 +15,7 @@ void (async () => {
15
15
 
16
16
  const tempFilePath = path.join(folder, 'tmp.scss');
17
17
 
18
- fs.writeFileSync(tempFilePath, '* {\n\tborder: 1px solid var(--color);\n\n\tcolor: var(--color);\n}\n', 'utf8');
18
+ fs.writeFileSync(tempFilePath, '@property --color {\n\tsyntax: "<color>";\n\tinherits: false;\n\tinitial-value: #f00; // stylelint-disable-line color-no-hex -- The initial value must be a hex-color\n}\n\n* {\n\tborder: 1px solid var(--color);\n\n\tcolor: var(--color);\n}\n', 'utf8');
19
19
 
20
20
  const result = await runProcess(`stylelint -f json "${tempFilePath}"`);
21
21
 
@@ -35,7 +35,7 @@ void (async () => {
35
35
  const { invalidOptionWarnings, warnings } = JSON.parse(result.stdout)[0];
36
36
 
37
37
  if (warnings.length > 0) {
38
- process.stderr.write(warnings.join('\n'));
38
+ process.stderr.write(`Warnings:\n\n- ${warnings.map(({ text }) => text).join('\n- ')}\n`);
39
39
 
40
40
  process.exitCode = 1;
41
41
 
@@ -43,7 +43,7 @@ void (async () => {
43
43
  }
44
44
 
45
45
  if (invalidOptionWarnings.length > 0) {
46
- process.stderr.write(`Invalid stylelint configuration:\n\n- ${invalidOptionWarnings.map(({ text }) => text).join('\n- ')}`);
46
+ process.stderr.write(`Invalid stylelint configuration:\n\n- ${invalidOptionWarnings.map(({ text }) => text).join('\n- ')}\n`);
47
47
 
48
48
  process.exitCode = 1;
49
49