linter-bundle 7.4.0 → 7.6.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/.linter-bundle.schema.json +25 -0
- package/CHANGELOG.md +51 -1
- package/README.md +17 -13
- package/eslint/index.mjs +17 -7
- package/eslint/type-declarations.mjs +5 -2
- package/helper/get-git-files.js +8 -10
- package/helper/linter-bundle-config.d.ts +4 -0
- package/lint.js +5 -4
- package/package.json +16 -15
- package/stylelint/index.mjs +151 -69
- package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/index.mjs +0 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/selectors.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/atRuleNameSpaceChecker.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/index.mjs +4 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/index.mjs +4 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/index.mjs +4 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationBangSpaceChecker.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationColonSpaceChecker.mjs +17 -18
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/findMediaOperator.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/index.mjs +5 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceChecker.mjs +5 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceFix.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/index.mjs +12 -13
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/index.mjs +8 -10
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/index.mjs +12 -12
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/index.mjs +9 -9
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/index.mjs +6 -8
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaFeatureColonSpaceChecker.mjs +3 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaQueryListCommaWhitespaceChecker.mjs +5 -7
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/index.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/index.mjs +3 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/index.mjs +8 -12
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/index.mjs +4 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/index.mjs +5 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/index.mjs +5 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/index.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorAttributeOperatorSpaceChecker.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorCombinatorSpaceChecker.mjs +5 -13
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorListCommaWhitespaceChecker.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/index.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/index.mjs +4 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/index.mjs +0 -1
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/index.mjs +5 -6
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/valueListCommaWhitespaceChecker.mjs +2 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/index.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/addEmptyLineAfter.mjs +3 -4
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/hasEmptyBlock.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/nextNonCommentNode.mjs +1 -2
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/removeEmptyLinesAfter.mjs +2 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/transformSelector.mjs +3 -3
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/whitespaceChecker.mjs +1 -2
- package/stylelint/plugins/stylelint-selector-no-empty.js +0 -2
- package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +0 -2
- package/TODO.md +0 -0
|
@@ -104,8 +104,33 @@
|
|
|
104
104
|
},
|
|
105
105
|
"additionalProperties": false
|
|
106
106
|
},
|
|
107
|
+
"css": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"verbose": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"timing": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"git": {
|
|
117
|
+
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"include": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"patternPrefix": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
107
131
|
"sass": {
|
|
108
132
|
"type": "object",
|
|
133
|
+
"deprecated": true,
|
|
109
134
|
"properties": {
|
|
110
135
|
"verbose": {
|
|
111
136
|
"type": "boolean"
|
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,57 @@ 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/v7.
|
|
9
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.6.0...HEAD)
|
|
10
|
+
|
|
11
|
+
## [7.6.0] - 2025-05-14
|
|
12
|
+
|
|
13
|
+
- [general] Added support for `.css` files in ESLint and Stylelint rules
|
|
14
|
+
- [eslint] Updated `eslint` from `9.24.0` to `9.26.0`
|
|
15
|
+
- [eslint] Updated `eslint-import-resolver-typescript` from `4.3.2` to `4.3.4`
|
|
16
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from `50.6.9` to `50.6.17`
|
|
17
|
+
- [eslint] Updated `eslint-plugin-n` from `17.17.0` to `17.18.0`
|
|
18
|
+
- [eslint] Updated `eslint-plugin-unicorn` from `58.0.0` to `59.0.1`
|
|
19
|
+
- [eslint] Updated `globals` from `16.0.0` to `16.1.0`
|
|
20
|
+
- [eslint] Updated `typescript-eslint` from `8.29.1` to `8.32.1`
|
|
21
|
+
- [stylelint] Updated `stylelint` from `16.18.0` to `16.19.1`
|
|
22
|
+
- [stylelint] Updated `stylelint-order` from `6.0.4` to `7.0.0`
|
|
23
|
+
- [stylelint] Updated `stylelint-scss` from `6.11.1` to `6.12.0`
|
|
24
|
+
- [eslint] Renamed `unicorn/no-array-push-push` rule to `prefer-single-call`
|
|
25
|
+
- [eslint] Renamed `unicorn/no-length-as-slice-end` rule to `no-unnecessary-slice-end`
|
|
26
|
+
- [eslint] Added but disabled [`unicorn/prefer-import-meta-properties`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md) rule
|
|
27
|
+
- [eslint] Added [`unicorn/no-unnecessary-array-flat-depth`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-flat-depth.md) rule
|
|
28
|
+
- [eslint] Added [`unicorn/no-unnecessary-array-splice-count`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md) rule
|
|
29
|
+
- [eslint] Activated [`unicorn/prefer-event-target`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md) rule
|
|
30
|
+
- [eslint] Activated [`unicorn/prefer-top-level-await`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md) rule
|
|
31
|
+
- [eslint] Added [`@typescript-eslint/no-unnecessary-type-conversion`](https://typescript-eslint.io/rules/no-unnecessary-type-conversion/) rule
|
|
32
|
+
- [stylelint] Activated [`selector-not-notation`](https://stylelint.io/user-guide/rules/selector-not-notation/) rule with "complex" option
|
|
33
|
+
|
|
34
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.5.0...v7.6.0)
|
|
35
|
+
|
|
36
|
+
## [7.5.0] - 2025-04-08
|
|
37
|
+
|
|
38
|
+
- [eslint] Updated `eslint` from `9.23.0` to `9.24.0`
|
|
39
|
+
- [eslint] Updated `eslint-import-resolver-typescript` from `4.2.2` to `4.3.2`
|
|
40
|
+
- [eslint] Updated `eslint-plugin-jsdoc` from `50.6.8` to `50.6.9`
|
|
41
|
+
- [eslint] Updated `eslint-plugin-n` from `17.16.2` to `17.17.0`
|
|
42
|
+
- [eslint] Updated `eslint-plugin-react` from `7.37.4` to `7.37.5`
|
|
43
|
+
- [eslint] Updated `eslint-plugin-unicorn` from `57.0.0` to `58.0.0`
|
|
44
|
+
- [eslint] Updated `typescript-eslint` from `8.27.0` to `8.29.1`
|
|
45
|
+
- [stylelint] Updated `stylelint` from `16.16.0` to `16.18.0`
|
|
46
|
+
- [eslint] Disabled [`unicorn/prefer-global-this`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md) rule
|
|
47
|
+
- [eslint] Disabled [`unicorn/prefer-string-raw`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md) rule
|
|
48
|
+
- [stylelint] Added new [`color-function-alias-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/color-function-alias-notation/README.md) rule and set it to `without-alpha`
|
|
49
|
+
- [stylelint] Added new [`container-name-pattern`](https://github.com/stylelint/stylelint/blob/main/lib/rules/container-name-pattern/README.md) rule and apply `sass` > `patternPrefix` from the linter-bundle configuration, if set
|
|
50
|
+
- [stylelint] Added new [`layer-name-pattern`](https://github.com/stylelint/stylelint/blob/main/lib/rules/layer-name-pattern/README.md) rule and apply `sass` > `patternPrefix` from the linter-bundle configuration, if set
|
|
51
|
+
|
|
52
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.4.0...v7.5.0)
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- [eslint] Updated `eslint` from `9.22.0` to `9.23.0`
|
|
57
|
+
- [eslint/react] Activated `allowExpressions` of the `@typescript-eslint/explicit-function-return-type`rule also for the React overrides
|
|
58
|
+
|
|
59
|
+
[Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.3.0...v7.4.0)
|
|
10
60
|
|
|
11
61
|
## [7.4.0] - 2025-03-23
|
|
12
62
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Ready-to use bundle of linting tools, containing configurations for
|
|
10
10
|
|
|
11
11
|
- [ESLint](https://eslint.org/): JavaScript (Node.js); TypeScript, React (Browser)
|
|
12
|
-
- [stylelint](https://stylelint.io/): SCSS (Browser)
|
|
12
|
+
- [stylelint](https://stylelint.io/): CSS, SCSS (Browser)
|
|
13
13
|
- [markdownlint](https://github.com/DavidAnson/markdownlint): Markdown
|
|
14
14
|
- [better-npm-audit](https://www.npmjs.com/package/better-npm-audit): Security audit using `npm`
|
|
15
15
|
- [improved-yarn-audit](https://www.npmjs.com/package/improved-yarn-audit): Security audit using `yarn`
|
|
@@ -84,8 +84,8 @@ npm install linter-bundle --save-dev
|
|
|
84
84
|
```json
|
|
85
85
|
{
|
|
86
86
|
"scripts": {
|
|
87
|
-
"lint": "lint tsc ts
|
|
88
|
-
"lint-different-configurations": "lint tsc --tsconfig=./path1/tsconfig.json tsc --tsconfig=./path2/tsconfig.json ts
|
|
87
|
+
"lint": "lint tsc ts css md audit",
|
|
88
|
+
"lint-different-configurations": "lint tsc --tsconfig=./path1/tsconfig.json tsc --tsconfig=./path2/tsconfig.json ts css md audit"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
```
|
|
@@ -224,8 +224,8 @@ The file itself, and any of the options is optional.
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
|
-
"
|
|
228
|
-
"include": ["./included/*.
|
|
227
|
+
"css": {
|
|
228
|
+
"include": ["./included/*.css"],
|
|
229
229
|
"patternPrefix": "(my-prefix|another-prefix)"
|
|
230
230
|
},
|
|
231
231
|
"md": {
|
|
@@ -405,9 +405,9 @@ export default {
|
|
|
405
405
|
},
|
|
406
406
|
|
|
407
407
|
/**
|
|
408
|
-
* Configuration, specific to the `
|
|
408
|
+
* Configuration, specific to the `css` command.
|
|
409
409
|
*/
|
|
410
|
-
|
|
410
|
+
css: {
|
|
411
411
|
/**
|
|
412
412
|
* `verbose`, `timing` and `git` are the same as in the root node.
|
|
413
413
|
*/
|
|
@@ -420,7 +420,7 @@ export default {
|
|
|
420
420
|
*
|
|
421
421
|
* @type {string[]}
|
|
422
422
|
*/
|
|
423
|
-
include: ['./included/*.
|
|
423
|
+
include: ['./included/*.css'],
|
|
424
424
|
|
|
425
425
|
/**
|
|
426
426
|
* The prefix used for the 'custom-media-pattern' (`@media (--my-prefix-foo)`) and 'custom-property-pattern' (`var(--my-prefix-bar)`) rule.
|
|
@@ -444,7 +444,7 @@ export default {
|
|
|
444
444
|
*
|
|
445
445
|
* @type {string[]}
|
|
446
446
|
*/
|
|
447
|
-
include: ['./included/*.
|
|
447
|
+
include: ['./included/*.md']
|
|
448
448
|
},
|
|
449
449
|
|
|
450
450
|
/**
|
|
@@ -532,7 +532,7 @@ The command line arguments are separated in groups. Here are some examples:
|
|
|
532
532
|
|
|
533
533
|
```sh
|
|
534
534
|
# Run File restrictions, TypeScript compiler, ESLint, Stylelint, Markdownlint, and audit in the given order, using the default configuration
|
|
535
|
-
lint files tsc ts
|
|
535
|
+
lint files tsc ts css md audit
|
|
536
536
|
|
|
537
537
|
# Run ESLint and Audit, and show their terminal output even on success
|
|
538
538
|
lint --verbose ts audit
|
|
@@ -593,12 +593,12 @@ Argument | Description | Example
|
|
|
593
593
|
`--include` | Patterns with files which should be considered | `--include="./cypress/**/*.ts"`
|
|
594
594
|
`--exclude` | Patterns with files which should not be considered. Can be used multiple times for different patterns. Used as `--ignore-pattern` argument for ESLint. | `--exclude="cypress" --exclude=".storybook"`
|
|
595
595
|
|
|
596
|
-
### `lint
|
|
596
|
+
### `lint css`
|
|
597
597
|
|
|
598
598
|
Will execute:
|
|
599
599
|
|
|
600
600
|
```sh
|
|
601
|
-
stylelint "src/**/*.scss" --formatter unix --report-needless-disables --report-invalid-scope-disables --report-descriptionless-disables
|
|
601
|
+
stylelint "src/**/*.{css,scss}" --formatter unix --report-needless-disables --report-invalid-scope-disables --report-descriptionless-disables
|
|
602
602
|
```
|
|
603
603
|
|
|
604
604
|
### `lint md`
|
|
@@ -668,7 +668,8 @@ To ensure the stylelint plugins are correctly loaded, you need to adjust the set
|
|
|
668
668
|
```json
|
|
669
669
|
{
|
|
670
670
|
"stylelint.enable": true,
|
|
671
|
-
"stylelint.validate": [
|
|
671
|
+
"stylelint.validate": [,
|
|
672
|
+
"css",
|
|
672
673
|
"scss"
|
|
673
674
|
],
|
|
674
675
|
"css.validate": false,
|
|
@@ -702,6 +703,9 @@ To visualize the max line-length rules in VSCode, you can activate rulers, by ad
|
|
|
702
703
|
"[markdown]": {
|
|
703
704
|
"editor.rulers": [300]
|
|
704
705
|
},
|
|
706
|
+
"[css]": {
|
|
707
|
+
"editor.rulers": [160]
|
|
708
|
+
},
|
|
705
709
|
"[scss]": {
|
|
706
710
|
"editor.rulers": [160]
|
|
707
711
|
},
|
package/eslint/index.mjs
CHANGED
|
@@ -782,6 +782,7 @@ export default [
|
|
|
782
782
|
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
|
783
783
|
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
|
784
784
|
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
|
|
785
|
+
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
|
|
785
786
|
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
|
|
786
787
|
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
787
788
|
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
@@ -921,6 +922,7 @@ export default [
|
|
|
921
922
|
'import/no-self-import': 'error',
|
|
922
923
|
'import/no-unassigned-import': ['error', {
|
|
923
924
|
allow: [
|
|
925
|
+
'**/*.css',
|
|
924
926
|
'**/*.scss',
|
|
925
927
|
'jest-extended'
|
|
926
928
|
]
|
|
@@ -1030,6 +1032,12 @@ export default [
|
|
|
1030
1032
|
namespace: true,
|
|
1031
1033
|
named: false
|
|
1032
1034
|
},
|
|
1035
|
+
'./styles.module.css': {
|
|
1036
|
+
unassigned: false,
|
|
1037
|
+
default: false,
|
|
1038
|
+
namespace: true,
|
|
1039
|
+
named: false
|
|
1040
|
+
},
|
|
1033
1041
|
'./styles.module.scss': {
|
|
1034
1042
|
unassigned: false,
|
|
1035
1043
|
default: false,
|
|
@@ -1044,7 +1052,6 @@ export default [
|
|
|
1044
1052
|
'unicorn/no-array-callback-reference': 'off', // If I use functions, they are the best option for this use-case
|
|
1045
1053
|
'unicorn/no-array-for-each': 'error',
|
|
1046
1054
|
'unicorn/no-array-method-this-argument': 'error',
|
|
1047
|
-
'unicorn/no-array-push-push': 'error',
|
|
1048
1055
|
'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
|
|
1049
1056
|
'unicorn/no-await-expression-member': 'error',
|
|
1050
1057
|
'unicorn/no-console-spaces': 'error',
|
|
@@ -1056,7 +1063,6 @@ export default [
|
|
|
1056
1063
|
'unicorn/no-invalid-fetch-options': 'error',
|
|
1057
1064
|
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
1058
1065
|
'unicorn/no-keyword-prefix': 'off',
|
|
1059
|
-
'unicorn/no-length-as-slice-end': 'error',
|
|
1060
1066
|
'unicorn/no-lonely-if': 'off', // Sometimes the code is clearer if-conditions are not combined
|
|
1061
1067
|
'unicorn/no-magic-array-flat-depth': 'error',
|
|
1062
1068
|
'unicorn/no-named-default': 'error',
|
|
@@ -1072,8 +1078,11 @@ export default [
|
|
|
1072
1078
|
'unicorn/no-thenable': 'error',
|
|
1073
1079
|
'unicorn/no-this-assignment': 'error',
|
|
1074
1080
|
'unicorn/no-typeof-undefined': 'error',
|
|
1081
|
+
'unicorn/no-unnecessary-array-flat-depth': 'error',
|
|
1082
|
+
'unicorn/no-unnecessary-array-splice-count': 'error',
|
|
1075
1083
|
'unicorn/no-unnecessary-await': 'error',
|
|
1076
1084
|
'unicorn/no-unnecessary-polyfills': 'error',
|
|
1085
|
+
'unicorn/no-unnecessary-slice-end': 'error',
|
|
1077
1086
|
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
1078
1087
|
'unicorn/no-unreadable-iife': 'error',
|
|
1079
1088
|
'unicorn/no-unused-properties': 'error',
|
|
@@ -1101,9 +1110,10 @@ export default [
|
|
|
1101
1110
|
'unicorn/prefer-dom-node-dataset': 'off', // `setAttribute` is faster than `dataset`. See https://www.measurethat.net/Benchmarks/Show/7740/0/classname-vs-setattribute-vs-classlist-vs-dataset
|
|
1102
1111
|
'unicorn/prefer-dom-node-remove': 'error',
|
|
1103
1112
|
'unicorn/prefer-dom-node-text-content': 'error',
|
|
1104
|
-
'unicorn/prefer-event-target': '
|
|
1113
|
+
'unicorn/prefer-event-target': 'error',
|
|
1105
1114
|
'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
|
|
1106
|
-
'unicorn/prefer-global-this': '
|
|
1115
|
+
'unicorn/prefer-global-this': 'off', // This makes only sense if the same code may run on the server-side. Often the auto-fixing of this rule doesn't make sense
|
|
1116
|
+
'unicorn/prefer-import-meta-properties': 'off', // @todo Regarding `n/no-unsupported-features/node-builtins` it's still an experimental feature, so check back in 2026
|
|
1107
1117
|
'unicorn/prefer-includes': 'error',
|
|
1108
1118
|
'unicorn/prefer-json-parse-buffer': 'off', // TypeScript states that string needs to be used as of the ES specification. @see https://github.com/microsoft/TypeScript/issues/11842
|
|
1109
1119
|
'unicorn/prefer-keyboard-event-key': 'error',
|
|
@@ -1116,7 +1126,6 @@ export default [
|
|
|
1116
1126
|
'unicorn/prefer-native-coercion-functions': 'off',
|
|
1117
1127
|
'unicorn/prefer-negative-index': 'error',
|
|
1118
1128
|
'unicorn/prefer-number-properties': 'error',
|
|
1119
|
-
'unicorn/prefer-object-has-own': 'off', // Not widely supported yet. Can be activated in 2024
|
|
1120
1129
|
'unicorn/prefer-object-from-entries': 'error',
|
|
1121
1130
|
'unicorn/prefer-optional-catch-binding': 'error',
|
|
1122
1131
|
'unicorn/prefer-prototype-methods': 'error',
|
|
@@ -1124,8 +1133,9 @@ export default [
|
|
|
1124
1133
|
'unicorn/prefer-reflect-apply': 'error',
|
|
1125
1134
|
'unicorn/prefer-set-has': 'error',
|
|
1126
1135
|
'unicorn/prefer-set-size': 'error',
|
|
1136
|
+
'unicorn/prefer-single-call': 'error',
|
|
1127
1137
|
'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
|
|
1128
|
-
'unicorn/prefer-string-raw': '
|
|
1138
|
+
'unicorn/prefer-string-raw': 'off', // The overhead of writing String.raw`...` is not worth the inconsistency in writing strings
|
|
1129
1139
|
'unicorn/prefer-string-replace-all': 'off', // @todo Available since 2020 in browsers. Should this be preferred?
|
|
1130
1140
|
'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.
|
|
1131
1141
|
'unicorn/prefer-string-starts-ends-with': 'error',
|
|
@@ -1133,7 +1143,7 @@ export default [
|
|
|
1133
1143
|
'unicorn/prefer-structured-clone': 'error',
|
|
1134
1144
|
'unicorn/prefer-switch': 'error',
|
|
1135
1145
|
'unicorn/prefer-ternary': 'off', // We prefer readability over saving a few chars
|
|
1136
|
-
'unicorn/prefer-top-level-await': '
|
|
1146
|
+
'unicorn/prefer-top-level-await': 'error',
|
|
1137
1147
|
'unicorn/prefer-regexp-test': 'error',
|
|
1138
1148
|
'unicorn/prefer-type-error': 'error',
|
|
1139
1149
|
'unicorn/prevent-abbreviations': ['error', { ignore: ['args', 'i', 'j', 'i18n', /[Rr]ef/u, /[Pp]arams/u, /[Pp]rops/u] }],
|
|
@@ -36,14 +36,17 @@ export default [
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
files: [
|
|
39
|
+
files: [
|
|
40
|
+
'**/*.css.d.ts',
|
|
41
|
+
'**/*.scss.d.ts'
|
|
42
|
+
],
|
|
40
43
|
rules: {
|
|
41
44
|
/**
|
|
42
45
|
* eslint
|
|
43
46
|
*
|
|
44
47
|
* @see https://eslint.org/docs/rules/
|
|
45
48
|
*/
|
|
46
|
-
'linebreak-style': 'off' // Ignore for automatically generated .
|
|
49
|
+
'linebreak-style': 'off' // Ignore for automatically generated .(s)css.d.ts files, since that does not affect the project.
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
];
|
package/helper/get-git-files.js
CHANGED
|
@@ -18,16 +18,14 @@ let gitFiles;
|
|
|
18
18
|
* @returns {Promise<string[]>} The list of changed files
|
|
19
19
|
*/
|
|
20
20
|
export async function getGitFiles () {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
21
|
+
gitFilesProcessPromise ??= {
|
|
22
|
+
// Returns changed files, also stashed and committed
|
|
23
|
+
diff: runProcess('git diff --name-only -z @{upstream}'),
|
|
24
|
+
// Returns unstashed files (including deleted)
|
|
25
|
+
modified: runProcess('git ls-files -o -m --exclude-standard --full-name --deduplicate -z'),
|
|
26
|
+
// Returns unstashed, deleted files - @todo Is there a way to also get a list of deleted stashed/committed files?
|
|
27
|
+
deleted: runProcess('git ls-files -d --exclude-standard --full-name --deduplicate -z')
|
|
28
|
+
};
|
|
31
29
|
|
|
32
30
|
const gitProcessResult = {
|
|
33
31
|
diff: await gitFilesProcessPromise.diff,
|
package/lint.js
CHANGED
|
@@ -23,7 +23,7 @@ const require = createRequire(import.meta.url);
|
|
|
23
23
|
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* @typedef {'files' | 'tsc' | 'ts' | 'sass' | 'md' | 'audit'} TaskNames
|
|
26
|
+
* @typedef {'files' | 'tsc' | 'ts' | 'css' | 'sass' | 'md' | 'audit'} TaskNames
|
|
27
27
|
* @typedef {Partial<Record<string, (string | boolean)[]>>} TaskConfig
|
|
28
28
|
* @typedef {import('./helper/run-process.js').ProcessResult} ProcessResult
|
|
29
29
|
* @typedef {{ taskName: TaskNames; taskConfig: TaskConfig; }} TaskNameAndConfig
|
|
@@ -52,6 +52,7 @@ await (async () => {
|
|
|
52
52
|
case 'ts':
|
|
53
53
|
return runESLintTask(taskName, taskConfig);
|
|
54
54
|
|
|
55
|
+
case 'css':
|
|
55
56
|
case 'sass':
|
|
56
57
|
return runStylelintTask(taskName, taskConfig);
|
|
57
58
|
|
|
@@ -214,7 +215,7 @@ async function runESLintTask (taskName, taskConfig) {
|
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
/**
|
|
217
|
-
* Runs the `
|
|
218
|
+
* Runs the `css` task.
|
|
218
219
|
*
|
|
219
220
|
* @param {TaskNameAndConfig['taskName']} taskName - Name of the task as used in the command line
|
|
220
221
|
* @param {TaskNameAndConfig['taskConfig']} taskConfig - Configuration of the task
|
|
@@ -227,7 +228,7 @@ async function runStylelintTask (taskName, taskConfig) {
|
|
|
227
228
|
verbose: getConfigValue(taskName, taskConfig, 'verbose')
|
|
228
229
|
};
|
|
229
230
|
|
|
230
|
-
const includes = await getIncludes(newTaskConfig, 'src/**/*.scss');
|
|
231
|
+
const includes = await getIncludes(newTaskConfig, 'src/**/*.{css,scss}');
|
|
231
232
|
|
|
232
233
|
if (!includes) {
|
|
233
234
|
return generateDummyJobOutput(taskName, newTaskConfig, {
|
|
@@ -415,7 +416,7 @@ async function validateEnvironment () {
|
|
|
415
416
|
* @throws {Error} If no task has be specified in the arguments
|
|
416
417
|
*/
|
|
417
418
|
function getTasksToRun (argv) {
|
|
418
|
-
const TASKS = new Set(['tsc', 'ts', 'sass', 'md', 'audit', 'files']);
|
|
419
|
+
const TASKS = new Set(['tsc', 'ts', 'css', 'sass', 'md', 'audit', 'files']);
|
|
419
420
|
const ARG_REGEXP = /^--([^=]+)(?:=(.+))?$/u;
|
|
420
421
|
|
|
421
422
|
/** @type {TaskNameAndConfig | null} */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linter-bundle",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
|
|
6
6
|
"keywords": [
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"react",
|
|
16
16
|
"react-hooks",
|
|
17
17
|
"unicorn",
|
|
18
|
-
"scss"
|
|
18
|
+
"scss",
|
|
19
|
+
"css"
|
|
19
20
|
],
|
|
20
21
|
"author": "Jens Duttke <github@duttke.de> (https://github.com/jens-duttke)",
|
|
21
22
|
"license": "MIT",
|
|
@@ -43,32 +44,32 @@
|
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@stylistic/eslint-plugin": "4.2.0",
|
|
45
46
|
"@stylistic/eslint-plugin-jsx": "4.2.0",
|
|
46
|
-
"eslint": "9.
|
|
47
|
+
"eslint": "9.26.0",
|
|
47
48
|
"eslint-formatter-unix": "8.40.0",
|
|
48
|
-
"eslint-import-resolver-typescript": "4.
|
|
49
|
+
"eslint-import-resolver-typescript": "4.3.4",
|
|
49
50
|
"eslint-import-resolver-webpack": "0.13.10",
|
|
50
51
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
51
52
|
"eslint-plugin-functional": "9.0.1",
|
|
52
53
|
"eslint-plugin-import": "2.31.0",
|
|
53
54
|
"eslint-plugin-jest": "28.11.0",
|
|
54
|
-
"eslint-plugin-jsdoc": "50.6.
|
|
55
|
+
"eslint-plugin-jsdoc": "50.6.17",
|
|
55
56
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
56
|
-
"eslint-plugin-n": "17.
|
|
57
|
+
"eslint-plugin-n": "17.18.0",
|
|
57
58
|
"eslint-plugin-promise": "7.2.1",
|
|
58
|
-
"eslint-plugin-react": "7.37.
|
|
59
|
+
"eslint-plugin-react": "7.37.5",
|
|
59
60
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
60
|
-
"eslint-plugin-unicorn": "
|
|
61
|
-
"globals": "16.
|
|
61
|
+
"eslint-plugin-unicorn": "59.0.1",
|
|
62
|
+
"globals": "16.1.0",
|
|
62
63
|
"markdownlint-cli": "0.44.0",
|
|
63
64
|
"micromatch": "4.0.8",
|
|
64
65
|
"postcss-scss": "4.0.9",
|
|
65
|
-
"stylelint": "16.
|
|
66
|
+
"stylelint": "16.19.1",
|
|
66
67
|
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
|
|
67
68
|
"stylelint-high-performance-animation": "1.11.0",
|
|
68
|
-
"stylelint-order": "
|
|
69
|
-
"stylelint-scss": "6.
|
|
69
|
+
"stylelint-order": "7.0.0",
|
|
70
|
+
"stylelint-scss": "6.12.0",
|
|
70
71
|
"stylelint-use-logical-spec": "5.0.1",
|
|
71
|
-
"typescript-eslint": "8.
|
|
72
|
+
"typescript-eslint": "8.32.1"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"@typescript-eslint/utils": "*",
|
|
@@ -78,8 +79,8 @@
|
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"@types/eslint": "9.6.1",
|
|
80
81
|
"@types/micromatch": "4.0.9",
|
|
81
|
-
"@types/node": "22.
|
|
82
|
+
"@types/node": "22.15.18",
|
|
82
83
|
"stylelint-find-new-rules": "5.0.0",
|
|
83
|
-
"typescript": "5.8.
|
|
84
|
+
"typescript": "5.8.3"
|
|
84
85
|
}
|
|
85
86
|
}
|