linter-bundle 7.3.0 → 7.5.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/eslint/index.mjs +2 -2
  3. package/eslint/react.mjs +2 -1
  4. package/eslint/rules/restricted-filenames.mjs +5 -1
  5. package/helper/get-git-files.js +8 -10
  6. package/package.json +11 -11
  7. package/stylelint/index.mjs +3 -0
  8. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/index.mjs +0 -2
  9. package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/selectors.mjs +0 -1
  10. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/index.mjs +0 -1
  11. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/index.mjs +1 -2
  12. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/index.mjs +0 -1
  13. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/index.mjs +0 -1
  14. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/atRuleNameSpaceChecker.mjs +1 -2
  15. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/index.mjs +1 -2
  16. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/index.mjs +2 -3
  17. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/index.mjs +4 -5
  18. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/index.mjs +2 -3
  19. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/index.mjs +4 -5
  20. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/index.mjs +0 -1
  21. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/index.mjs +0 -1
  22. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/index.mjs +3 -4
  23. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.mjs +3 -4
  24. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/index.mjs +3 -4
  25. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/index.mjs +1 -2
  26. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/index.mjs +0 -1
  27. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/index.mjs +0 -1
  28. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/index.mjs +3 -4
  29. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/index.mjs +2 -3
  30. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/index.mjs +4 -5
  31. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/index.mjs +2 -3
  32. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/index.mjs +2 -3
  33. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationBangSpaceChecker.mjs +2 -4
  34. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationColonSpaceChecker.mjs +15 -16
  35. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/findMediaOperator.mjs +2 -4
  36. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/index.mjs +0 -1
  37. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/index.mjs +0 -1
  38. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/index.mjs +0 -1
  39. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/index.mjs +0 -1
  40. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/index.mjs +5 -6
  41. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/index.mjs +3 -4
  42. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/index.mjs +1 -2
  43. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/index.mjs +2 -3
  44. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceChecker.mjs +5 -9
  45. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceFix.mjs +2 -4
  46. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/index.mjs +12 -13
  47. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/index.mjs +8 -10
  48. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/index.mjs +3 -4
  49. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/index.mjs +2 -3
  50. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/index.mjs +2 -3
  51. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/index.mjs +2 -3
  52. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/index.mjs +12 -12
  53. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/index.mjs +9 -9
  54. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/index.mjs +6 -8
  55. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/index.mjs +3 -4
  56. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/index.mjs +0 -1
  57. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/index.mjs +2 -3
  58. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/index.mjs +2 -3
  59. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaFeatureColonSpaceChecker.mjs +3 -5
  60. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaQueryListCommaWhitespaceChecker.mjs +5 -7
  61. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/index.mjs +1 -2
  62. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/index.mjs +2 -4
  63. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/index.mjs +3 -5
  64. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/index.mjs +0 -1
  65. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/index.mjs +2 -3
  66. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.mjs +1 -2
  67. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/index.mjs +0 -1
  68. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/index.mjs +8 -12
  69. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/index.mjs +2 -3
  70. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/index.mjs +4 -5
  71. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/index.mjs +0 -1
  72. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/index.mjs +0 -1
  73. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/index.mjs +5 -6
  74. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/index.mjs +3 -4
  75. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/index.mjs +2 -3
  76. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/index.mjs +2 -3
  77. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/index.mjs +2 -3
  78. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/index.mjs +5 -6
  79. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/index.mjs +0 -1
  80. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/index.mjs +0 -1
  81. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/index.mjs +1 -2
  82. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorAttributeOperatorSpaceChecker.mjs +1 -2
  83. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorCombinatorSpaceChecker.mjs +5 -13
  84. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorListCommaWhitespaceChecker.mjs +2 -4
  85. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/index.mjs +2 -3
  86. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/index.mjs +0 -1
  87. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/index.mjs +2 -3
  88. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/index.mjs +4 -5
  89. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/index.mjs +0 -1
  90. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/index.mjs +3 -4
  91. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/index.mjs +3 -4
  92. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/index.mjs +5 -6
  93. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/valueListCommaWhitespaceChecker.mjs +2 -4
  94. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/index.mjs +3 -4
  95. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/addEmptyLineAfter.mjs +3 -4
  96. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/hasEmptyBlock.mjs +1 -2
  97. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/nextNonCommentNode.mjs +1 -2
  98. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/removeEmptyLinesAfter.mjs +2 -3
  99. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/transformSelector.mjs +3 -3
  100. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/whitespaceChecker.mjs +1 -2
  101. package/stylelint/plugins/stylelint-selector-no-empty.js +0 -2
  102. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,7 +6,41 @@ 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.3.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.5.0...HEAD)
10
+
11
+ ## [7.5.0] - 2025-04-08
12
+
13
+ - [eslint] Updated `eslint` from `9.23.0` to `9.24.0`
14
+ - [eslint] Updated `eslint-import-resolver-typescript` from `4.2.2` to `4.3.2`
15
+ - [eslint] Updated `eslint-plugin-jsdoc` from `50.6.8` to `50.6.9`
16
+ - [eslint] Updated `eslint-plugin-n` from `17.16.2` to `17.17.0`
17
+ - [eslint] Updated `eslint-plugin-react` from `7.37.4` to `7.37.5`
18
+ - [eslint] Updated `eslint-plugin-unicorn` from `57.0.0` to `58.0.0`
19
+ - [eslint] Updated `typescript-eslint` from `8.27.0` to `8.29.1`
20
+ - [stylelint] Updated `stylelint` from `16.16.0` to `16.18.0`
21
+ - [eslint] Disabled [`unicorn/prefer-global-this`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md) rule
22
+ - [eslint] Disabled [`unicorn/prefer-string-raw`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md) rule
23
+ - [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`
24
+ - [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
25
+ - [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
26
+
27
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.4.0...v7.5.0)
28
+
29
+ ### Changed
30
+
31
+ - [eslint] Updated `eslint` from `9.22.0` to `9.23.0`
32
+ - [eslint/react] Activated `allowExpressions` of the `@typescript-eslint/explicit-function-return-type`rule also for the React overrides
33
+
34
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.3.0...v7.4.0)
35
+
36
+ ## [7.4.0] - 2025-03-23
37
+
38
+ ### Changed
39
+
40
+ - [eslint] Updated `eslint` from `9.22.0` to `9.23.0`
41
+ - [eslint/react] Activated `allowExpressions` of the `@typescript-eslint/explicit-function-return-type`rule also for the React overrides
42
+
43
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.3.0...v7.4.0)
10
44
 
11
45
  ## [7.3.0] - 2025-03-20
12
46
 
package/eslint/index.mjs CHANGED
@@ -1103,7 +1103,7 @@ export default [
1103
1103
  'unicorn/prefer-dom-node-text-content': 'error',
1104
1104
  'unicorn/prefer-event-target': 'off', // @todo Disabled for now, since `EventTarget` requires Node.js 16. Activate in 2025
1105
1105
  'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
1106
- 'unicorn/prefer-global-this': 'error',
1106
+ '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
1107
1107
  'unicorn/prefer-includes': 'error',
1108
1108
  '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
1109
  'unicorn/prefer-keyboard-event-key': 'error',
@@ -1125,7 +1125,7 @@ export default [
1125
1125
  'unicorn/prefer-set-has': 'error',
1126
1126
  'unicorn/prefer-set-size': 'error',
1127
1127
  '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': 'error',
1128
+ 'unicorn/prefer-string-raw': 'off', // The overhead of writing String.raw`...` is not worth the inconsistency in writing strings
1129
1129
  'unicorn/prefer-string-replace-all': 'off', // @todo Available since 2020 in browsers. Should this be preferred?
1130
1130
  '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
1131
  'unicorn/prefer-string-starts-ends-with': 'error',
package/eslint/react.mjs CHANGED
@@ -42,7 +42,8 @@ export default [
42
42
  'getSnapshotBeforeUpdate',
43
43
  'render',
44
44
  'shouldComponentUpdate'
45
- ]
45
+ ],
46
+ allowExpressions: true
46
47
  }],
47
48
  '@typescript-eslint/no-empty-object-type': ['error', { // Empty interfaces for Component props should be allowed to make it directly visible, that a component has no props.
48
49
  allowWithName: 'Props$'
@@ -54,8 +54,12 @@ export default {
54
54
  },
55
55
  create: (context) => {
56
56
  const filePath = context.filename;
57
+
58
+ // The type is ensured by `meta.schema`
59
+ const contextOptions = /** @type {{ basePath: string, allowed?: string[]; disallowed?: string[]; }[]} */(context.options);
60
+
57
61
  /** @type {{ basePath: string, allowed?: string[]; disallowed?: string[]; }[]} */
58
- const options = (linterBundleConfig?.files?.restrictions ? [...linterBundleConfig.files.restrictions, ...context.options] : context.options);
62
+ const options = (linterBundleConfig?.files?.restrictions ? [...linterBundleConfig.files.restrictions, ...contextOptions] : contextOptions);
59
63
 
60
64
  for (const { basePath, allowed, disallowed } of options) {
61
65
  const normalizedName = path.relative(path.join(process.cwd(), basePath), filePath);
@@ -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
- if (!gitFilesProcessPromise) {
22
- gitFilesProcessPromise = {
23
- // Returns changed files, also stashed and committed
24
- diff: runProcess('git diff --name-only -z @{upstream}'),
25
- // Returns unstashed files (including deleted)
26
- modified: runProcess('git ls-files -o -m --exclude-standard --full-name --deduplicate -z'),
27
- // Returns unstashed, deleted files - @todo Is there a way to also get a list of deleted stashed/committed files?
28
- deleted: runProcess('git ls-files -d --exclude-standard --full-name --deduplicate -z')
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "7.3.0",
3
+ "version": "7.5.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": [
@@ -43,32 +43,32 @@
43
43
  "dependencies": {
44
44
  "@stylistic/eslint-plugin": "4.2.0",
45
45
  "@stylistic/eslint-plugin-jsx": "4.2.0",
46
- "eslint": "9.22.0",
46
+ "eslint": "9.24.0",
47
47
  "eslint-formatter-unix": "8.40.0",
48
- "eslint-import-resolver-typescript": "4.2.2",
48
+ "eslint-import-resolver-typescript": "4.3.2",
49
49
  "eslint-import-resolver-webpack": "0.13.10",
50
50
  "eslint-plugin-eslint-comments": "3.2.0",
51
51
  "eslint-plugin-functional": "9.0.1",
52
52
  "eslint-plugin-import": "2.31.0",
53
53
  "eslint-plugin-jest": "28.11.0",
54
- "eslint-plugin-jsdoc": "50.6.8",
54
+ "eslint-plugin-jsdoc": "50.6.9",
55
55
  "eslint-plugin-jsx-a11y": "6.10.2",
56
- "eslint-plugin-n": "17.16.2",
56
+ "eslint-plugin-n": "17.17.0",
57
57
  "eslint-plugin-promise": "7.2.1",
58
- "eslint-plugin-react": "7.37.4",
58
+ "eslint-plugin-react": "7.37.5",
59
59
  "eslint-plugin-react-hooks": "5.2.0",
60
- "eslint-plugin-unicorn": "57.0.0",
60
+ "eslint-plugin-unicorn": "58.0.0",
61
61
  "globals": "16.0.0",
62
62
  "markdownlint-cli": "0.44.0",
63
63
  "micromatch": "4.0.8",
64
64
  "postcss-scss": "4.0.9",
65
- "stylelint": "16.16.0",
65
+ "stylelint": "16.18.0",
66
66
  "stylelint-declaration-block-no-ignored-properties": "2.8.0",
67
67
  "stylelint-high-performance-animation": "1.11.0",
68
68
  "stylelint-order": "6.0.4",
69
69
  "stylelint-scss": "6.11.1",
70
70
  "stylelint-use-logical-spec": "5.0.1",
71
- "typescript-eslint": "8.27.0"
71
+ "typescript-eslint": "8.29.1"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@typescript-eslint/utils": "*",
@@ -78,8 +78,8 @@
78
78
  "devDependencies": {
79
79
  "@types/eslint": "9.6.1",
80
80
  "@types/micromatch": "4.0.9",
81
- "@types/node": "22.13.10",
81
+ "@types/node": "22.14.0",
82
82
  "stylelint-find-new-rules": "5.0.0",
83
- "typescript": "5.8.2"
83
+ "typescript": "5.8.3"
84
84
  }
85
85
  }
@@ -164,6 +164,7 @@ export default {
164
164
  'font-face': ['font-family', 'font-style', 'font-weight', 'src']
165
165
  }],
166
166
  'block-no-empty': true,
167
+ 'color-function-alias-notation': 'without-alpha',
167
168
  'color-function-notation': [
168
169
  'modern', {
169
170
  ignore: ['with-var-inside']
@@ -185,6 +186,7 @@ export default {
185
186
  'comment-pattern': /^[^\s].+[^\s]$/u,
186
187
  'comment-whitespace-inside': 'always',
187
188
  'comment-word-disallowed-list': null,
189
+ 'container-name-pattern': (linterBundleConfig.sass?.patternPrefix ? `${linterBundleConfig.sass.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)+` : null),
188
190
  'custom-media-pattern': (linterBundleConfig.sass?.patternPrefix ? `${linterBundleConfig.sass.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)+` : null),
189
191
  'custom-property-empty-line-before': null, // Empty lines between custom properties are optional
190
192
  'custom-property-no-missing-var-function': true,
@@ -248,6 +250,7 @@ export default {
248
250
  'keyframe-declaration-no-important': true,
249
251
  'keyframe-selector-notation': 'percentage',
250
252
  'keyframes-name-pattern': String.raw`^[a-z]+(-[a-z]+)*\d*$`,
253
+ 'layer-name-pattern': (linterBundleConfig.sass?.patternPrefix ? `${linterBundleConfig.sass.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)+` : null),
251
254
  'length-zero-no-unit': true,
252
255
  'max-nesting-depth': 6,
253
256
  'media-feature-name-allowed-list': null,
@@ -1,5 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
-
3
1
  export default [
4
2
  'a',
5
3
  'abbr',
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import uniteSets from 'stylelint/lib/utils/uniteSets.mjs';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -40,7 +39,7 @@ const rule = (primary, _secondary) => {
40
39
  checkedRuleName: ruleName,
41
40
  fix: (atRule) => {
42
41
  if (typeof atRule.raws.afterName === 'string') {
43
- atRule.raws.afterName = atRule.raws.afterName.replace(/^\s*/, ' ');
42
+ atRule.raws.afterName = atRule.raws.afterName.replace(/^\s*/u, ' ');
44
43
  }
45
44
  }
46
45
  });
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import isStandardSyntaxAtRule from 'stylelint/lib/utils/isStandardSyntaxAtRule.mjs';
@@ -49,4 +48,4 @@ export default function atRuleNameSpaceChecker (options) {
49
48
  errTarget: `@${node.name}`
50
49
  });
51
50
  }
52
- };
51
+ }
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -63,7 +62,7 @@ const rule = (primary, secondaryOptions, context) => (root, result) => {
63
62
  }
64
63
 
65
64
  // Get whitespace after ""}", ignoring extra semicolon
66
- const before = (statement.raws.after || '').replace(/;+/, '');
65
+ const before = (statement.raws.after || '').replace(/;+/u, '');
67
66
 
68
67
  // Calculate index
69
68
  const statementString = statement.toString();
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -87,7 +86,7 @@ const rule = (primary, secondaryOptions, context) => {
87
86
  // Allow an end-of-line comment x spaces after the brace
88
87
  const nextNodeIsSingleLineComment =
89
88
  nextNode.type === 'comment' &&
90
- !(/[^ ]/).test(nextNode.raws.before || '') &&
89
+ !(/[^ ]/u).test(nextNode.raws.before || '') &&
91
90
  !nextNode.toString().includes('\n');
92
91
 
93
92
  const nodeToCheck = nextNodeIsSingleLineComment ? nextNode.next() : nextNode;
@@ -125,7 +124,7 @@ const rule = (primary, secondaryOptions, context) => {
125
124
  if (typeof nodeToCheckRaws.before !== 'string') { return; }
126
125
 
127
126
  if (primary.startsWith('always')) {
128
- const index = nodeToCheckRaws.before.search(/\r?\n/);
127
+ const index = nodeToCheckRaws.before.search(/\r?\n/u);
129
128
 
130
129
  nodeToCheckRaws.before =
131
130
  index >= 0 ?
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -49,7 +48,7 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
49
48
  }
50
49
 
51
50
  // Ignore extra semicolon
52
- const after = (statement.raws.after || '').replace(/;+/, '');
51
+ const after = (statement.raws.after || '').replace(/;+/u, '');
53
52
 
54
53
  if (after === undefined) {
55
54
  return;
@@ -99,14 +98,14 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
99
98
  if (typeof statementRaws.after !== 'string') { return; }
100
99
 
101
100
  if (primary.startsWith('always')) {
102
- const firstWhitespaceIndex = statementRaws.after.search(/\s/);
101
+ const firstWhitespaceIndex = statementRaws.after.search(/\s/u);
103
102
  const newlineBefore =
104
103
  firstWhitespaceIndex >= 0 ?
105
104
  statementRaws.after.slice(0, firstWhitespaceIndex)
106
105
  : statementRaws.after;
107
106
  const newlineAfter =
108
107
  firstWhitespaceIndex >= 0 ? statementRaws.after.slice(firstWhitespaceIndex) : '';
109
- const newlineIndex = newlineAfter.search(/\r?\n/);
108
+ const newlineIndex = newlineAfter.search(/\r?\n/u);
110
109
 
111
110
  statementRaws.after =
112
111
  newlineIndex >= 0 ?
@@ -117,7 +116,7 @@ const rule = (primary, _secondaryOptions, context) => (root, result) => {
117
116
  }
118
117
 
119
118
  if (primary === 'never-multi-line') {
120
- statementRaws.after = statementRaws.after.replace(/\s/g, '');
119
+ statementRaws.after = statementRaws.after.replace(/\s/gu, '');
121
120
 
122
121
  return;
123
122
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -87,13 +86,13 @@ const rule = (primary, _secondaryOptions) => {
87
86
  if (typeof statementRaws.after !== 'string') { return; }
88
87
 
89
88
  if (primary.startsWith('always')) {
90
- statementRaws.after = statementRaws.after.replace(/\s*$/, ' ');
89
+ statementRaws.after = statementRaws.after.replace(/\s*$/u, ' ');
91
90
 
92
91
  return;
93
92
  }
94
93
 
95
94
  if (primary.startsWith('never')) {
96
- statementRaws.after = statementRaws.after.replace(/\s*$/, '');
95
+ statementRaws.after = statementRaws.after.replace(/\s*$/u, '');
97
96
 
98
97
  return;
99
98
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -80,7 +79,7 @@ const rule = (primary, secondaryOptions, context) => {
80
79
  if (!startNode?.next) { return; }
81
80
 
82
81
  if (startNode.type === 'comment') {
83
- const reNewLine = /\r?\n/;
82
+ const reNewLine = /\r?\n/u;
84
83
  const newLineMatch = reNewLine.test(startNode.raws.before || '');
85
84
 
86
85
  const next = startNode.next();
@@ -121,7 +120,7 @@ const rule = (primary, secondaryOptions, context) => {
121
120
  if (typeof nodeToCheckRaws.before !== 'string') { return; }
122
121
 
123
122
  if (primary.startsWith('always')) {
124
- const index = nodeToCheckRaws.before.search(/\r?\n/);
123
+ const index = nodeToCheckRaws.before.search(/\r?\n/u);
125
124
 
126
125
  nodeToCheckRaws.before =
127
126
  index >= 0 ?
@@ -142,7 +141,7 @@ const rule = (primary, secondaryOptions, context) => {
142
141
  backupCommentNextBefores.clear();
143
142
 
144
143
  // Fix
145
- const reNewLine = /\r?\n/;
144
+ const reNewLine = /\r?\n/u;
146
145
  let fixTarget = statement.first;
147
146
 
148
147
  while (fixTarget) {
@@ -151,7 +150,7 @@ const rule = (primary, secondaryOptions, context) => {
151
150
  if (typeof fixTargetRaws.before !== 'string') { continue; }
152
151
 
153
152
  if (reNewLine.test(fixTargetRaws.before || '')) {
154
- fixTargetRaws.before = fixTargetRaws.before.replace(/\r?\n/g, '');
153
+ fixTargetRaws.before = fixTargetRaws.before.replace(/\r?\n/gu, '');
155
154
  }
156
155
 
157
156
  if (fixTarget.type !== 'comment') {
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,10 +1,9 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import valueParser from 'postcss-value-parser';
5
4
  import stylelint from 'stylelint';
6
- import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
7
5
  import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
6
+ import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
8
7
  import report from 'stylelint/lib/utils/report.mjs';
9
8
  import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
10
9
  import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
@@ -21,8 +20,8 @@ const meta = {
21
20
  fixable: true
22
21
  };
23
22
 
24
- const HEX = /^#[\da-z]+/i;
25
- const CONTAINS_HEX = /#[\da-z]+/i;
23
+ const HEX = /^#[\da-z]+/iu;
24
+ const CONTAINS_HEX = /#[\da-z]+/iu;
26
25
  const IGNORED_FUNCTIONS = new Set(['url']);
27
26
 
28
27
  /** @type {import('stylelint').Rule} */
@@ -1,9 +1,8 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
5
- import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
6
4
  import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
5
+ import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
7
6
  import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
8
7
  import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
9
8
  import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
@@ -70,13 +69,13 @@ const rule = (primary, _secondaryOptions) => {
70
69
  const targetAfter = target.slice(bangIndex + 1);
71
70
 
72
71
  if (primary === 'always') {
73
- setFixed(targetBefore + targetAfter.replace(/^\s*/, ' '));
72
+ setFixed(targetBefore + targetAfter.replace(/^\s*/u, ' '));
74
73
 
75
74
  return true;
76
75
  }
77
76
 
78
77
  if (primary === 'never') {
79
- setFixed(targetBefore + targetAfter.replace(/^\s*/, ''));
78
+ setFixed(targetBefore + targetAfter.replace(/^\s*/u, ''));
80
79
 
81
80
  return true;
82
81
  }
@@ -1,9 +1,8 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
5
- import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
6
4
  import getDeclarationValue from 'stylelint/lib/utils/getDeclarationValue.mjs';
5
+ import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
7
6
  import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
8
7
  import setDeclarationValue from 'stylelint/lib/utils/setDeclarationValue.mjs';
9
8
  import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
@@ -70,13 +69,13 @@ const rule = (primary, _secondaryOptions) => {
70
69
  const targetAfter = target.slice(bangIndex);
71
70
 
72
71
  if (primary === 'always') {
73
- setFixed(targetBefore.replace(/\s*$/, '') + ' ' + targetAfter);
72
+ setFixed(targetBefore.replace(/\s*$/u, '') + ' ' + targetAfter);
74
73
 
75
74
  return true;
76
75
  }
77
76
 
78
77
  if (primary === 'never') {
79
- setFixed(targetBefore.replace(/\s*$/, '') + targetAfter);
78
+ setFixed(targetBefore.replace(/\s*$/u, '') + targetAfter);
80
79
 
81
80
  return true;
82
81
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -80,7 +79,7 @@ const rule = (primary, _secondaryOptions, context) => {
80
79
  ruleName,
81
80
  fix: () => {
82
81
  if (primary.startsWith('always')) {
83
- const index = nodeToCheck.raws.before.search(/\r?\n/);
82
+ const index = nodeToCheck.raws.before.search(/\r?\n/u);
84
83
 
85
84
  nodeToCheck.raws.before =
86
85
  index >= 0 ?
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -76,7 +75,7 @@ const rule = (primary, _secondaryOptions) => {
76
75
  decl.raws.important = ' !important ';
77
76
  }
78
77
  else {
79
- setDeclarationValue(decl, value.replace(/\s*$/, ' '));
78
+ setDeclarationValue(decl, value.replace(/\s*$/u, ' '));
80
79
  }
81
80
 
82
81
  return;
@@ -84,10 +83,10 @@ const rule = (primary, _secondaryOptions) => {
84
83
 
85
84
  if (primary.startsWith('never')) {
86
85
  if (decl.raws.important) {
87
- decl.raws.important = decl.raws.important.replace(/\s*$/, '');
86
+ decl.raws.important = decl.raws.important.replace(/\s*$/u, '');
88
87
  }
89
88
  else {
90
- setDeclarationValue(decl, value.replace(/\s*$/, ''));
89
+ setDeclarationValue(decl, value.replace(/\s*$/u, ''));
91
90
  }
92
91
 
93
92
  return;
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -22,7 +21,7 @@ const meta = {
22
21
  };
23
22
 
24
23
  /** @type {import('stylelint').Rule} */
25
- const rule = (primary, secondaryOptions, context) => (root, result) => {
24
+ const rule = (primary, secondaryOptions, _context) => (root, result) => {
26
25
  const validOptions = validateOptions(
27
26
  result,
28
27
  ruleName,
@@ -108,7 +107,7 @@ const rule = (primary, secondaryOptions, context) => (root, result) => {
108
107
  node.raws.between = '';
109
108
  node.parent.raws.after = ' ';
110
109
  }
111
- }
110
+ };
112
111
 
113
112
  message = messages.expected;
114
113
  }
@@ -1,9 +1,8 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
5
- import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
6
4
  import isStandardSyntaxDeclaration from 'stylelint/lib/utils/isStandardSyntaxDeclaration.mjs';
5
+ import { declarationValueIndex } from 'stylelint/lib/utils/nodeFieldIndices.mjs';
7
6
  import report from 'stylelint/lib/utils/report.mjs';
8
7
  import ruleMessages from 'stylelint/lib/utils/ruleMessages.mjs';
9
8
  import validateOptions from 'stylelint/lib/utils/validateOptions.mjs';
@@ -53,7 +52,7 @@ const rule = (primary, _secondaryOptions, context) => {
53
52
  continue;
54
53
  }
55
54
 
56
- const indexToCheck = (/^[^\S\n\r]*\/\*/).test(propertyPlusColon.slice(i + 1)) ?
55
+ const indexToCheck = (/^[^\S\n\r]*\/\*/u).test(propertyPlusColon.slice(i + 1)) ?
57
56
  propertyPlusColon.indexOf('*/', i) + 1
58
57
  : i;
59
58
 
@@ -79,8 +78,8 @@ const rule = (primary, _secondaryOptions, context) => {
79
78
  const betweenBefore = between.slice(0, sliceIndex);
80
79
  const betweenAfter = between.slice(sliceIndex);
81
80
 
82
- decl.raws.between = (/^\s*\n/).test(betweenAfter) ?
83
- betweenBefore + betweenAfter.replace(/^[^\S\n\r]*/, '')
81
+ decl.raws.between = (/^\s*\n/u).test(betweenAfter) ?
82
+ betweenBefore + betweenAfter.replace(/^[^\S\n\r]*/u, '')
84
83
  : betweenBefore + context.newline + betweenAfter;
85
84
 
86
85
  return;
@@ -1,4 +1,3 @@
1
- /* eslint-disable -- We want to keep as much of the original code as possible */
2
1
  // @ts-nocheck
3
2
 
4
3
  import stylelint from 'stylelint';
@@ -49,14 +48,14 @@ const rule = (primary, _secondaryOptions) => {
49
48
 
50
49
  if (primary.startsWith('always')) {
51
50
  decl.raws.between =
52
- between.slice(0, colonIndex) + between.slice(colonIndex).replace(/^:\s*/, ': ');
51
+ between.slice(0, colonIndex) + between.slice(colonIndex).replace(/^:\s*/u, ': ');
53
52
 
54
53
  return true;
55
54
  }
56
55
 
57
56
  if (primary === 'never') {
58
57
  decl.raws.between =
59
- between.slice(0, colonIndex) + between.slice(colonIndex).replace(/^:\s*/, ':');
58
+ between.slice(0, colonIndex) + between.slice(colonIndex).replace(/^:\s*/u, ':');
60
59
 
61
60
  return true;
62
61
  }