linter-bundle 5.1.0 → 6.1.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 (195) hide show
  1. package/.linter-bundle.js +2 -0
  2. package/CHANGELOG.md +83 -9
  3. package/README.md +5 -3
  4. package/TODO.md +5 -0
  5. package/eslint/index.cjs +10 -4
  6. package/eslint/overrides-javascript.cjs +7 -1
  7. package/eslint/overrides-jest.cjs +1 -0
  8. package/eslint/overrides-jsdoc.cjs +1 -0
  9. package/eslint/rules/no-global-undefined-check.js +5 -3
  10. package/eslint/rules/no-unnecessary-typeof.js +26 -24
  11. package/eslint/rules/restricted-filenames.js +3 -1
  12. package/helper/ensure-type.cjs +2 -2
  13. package/helper/get-git-files.js +1 -1
  14. package/helper/get-outdated-dependencies.js +1 -1
  15. package/helper/get-outdated-overrides.js +1 -1
  16. package/helper/get-stylelint-path.js +1 -1
  17. package/helper/is-npm-or-yarn.js +1 -1
  18. package/helper/linter-bundle-config.js +22 -7
  19. package/helper/run-process.js +3 -3
  20. package/lint.js +31 -35
  21. package/package.json +27 -26
  22. package/stylelint/index.cjs +90 -5
  23. package/stylelint/plugins/stylelint-15.11.0-stylistic/LICENSE +20 -0
  24. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/LICENSE +9 -0
  25. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/index.cjs +122 -0
  26. package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/selectors.cjs +327 -0
  27. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/README.md +110 -0
  28. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/index.cjs +66 -0
  29. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/README.md +117 -0
  30. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/index.cjs +55 -0
  31. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/README.md +63 -0
  32. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/index.cjs +87 -0
  33. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/README.md +50 -0
  34. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/index.cjs +70 -0
  35. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/atRuleNameSpaceChecker.cjs +56 -0
  36. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/README.md +238 -0
  37. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/index.cjs +130 -0
  38. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/README.md +196 -0
  39. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/index.cjs +154 -0
  40. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/README.md +93 -0
  41. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/index.cjs +133 -0
  42. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/README.md +174 -0
  43. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/index.cjs +111 -0
  44. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/README.md +138 -0
  45. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/index.cjs +184 -0
  46. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/README.md +191 -0
  47. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/index.cjs +118 -0
  48. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/README.md +218 -0
  49. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/index.cjs +141 -0
  50. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/README.md +58 -0
  51. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/index.cjs +95 -0
  52. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/README.md +72 -0
  53. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +95 -0
  54. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/README.md +67 -0
  55. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/index.cjs +96 -0
  56. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/README.md +141 -0
  57. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/index.cjs +109 -0
  58. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/README.md +120 -0
  59. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/index.cjs +75 -0
  60. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/README.md +147 -0
  61. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/index.cjs +97 -0
  62. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/README.md +130 -0
  63. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/index.cjs +106 -0
  64. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/README.md +108 -0
  65. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/index.cjs +147 -0
  66. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/README.md +78 -0
  67. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/index.cjs +99 -0
  68. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/README.md +111 -0
  69. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/index.cjs +75 -0
  70. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/README.md +72 -0
  71. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/index.cjs +74 -0
  72. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationBangSpaceChecker.cjs +63 -0
  73. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationColonSpaceChecker.cjs +58 -0
  74. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/findMediaOperator.cjs +32 -0
  75. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/README.md +113 -0
  76. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/index.cjs +61 -0
  77. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/README.md +129 -0
  78. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/index.cjs +61 -0
  79. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/README.md +144 -0
  80. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/index.cjs +62 -0
  81. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/README.md +144 -0
  82. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/index.cjs +62 -0
  83. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/README.md +78 -0
  84. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/index.cjs +115 -0
  85. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/README.md +144 -0
  86. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/index.cjs +282 -0
  87. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/README.md +140 -0
  88. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/index.cjs +182 -0
  89. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/README.md +80 -0
  90. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/index.cjs +198 -0
  91. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceChecker.cjs +125 -0
  92. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceFix.cjs +51 -0
  93. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/README.md +339 -0
  94. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/index.cjs +743 -0
  95. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/README.md +21 -0
  96. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/index.cjs +132 -0
  97. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/README.md +116 -0
  98. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/index.cjs +225 -0
  99. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/README.md +151 -0
  100. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/index.cjs +200 -0
  101. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/README.md +72 -0
  102. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/index.cjs +91 -0
  103. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/README.md +72 -0
  104. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/index.cjs +91 -0
  105. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/README.md +108 -0
  106. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/index.cjs +93 -0
  107. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/README.md +62 -0
  108. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/index.cjs +112 -0
  109. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/README.md +72 -0
  110. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/index.cjs +109 -0
  111. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/README.md +72 -0
  112. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/index.cjs +109 -0
  113. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/README.md +113 -0
  114. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/index.cjs +97 -0
  115. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/README.md +111 -0
  116. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/index.cjs +49 -0
  117. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/README.md +136 -0
  118. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/index.cjs +93 -0
  119. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/README.md +136 -0
  120. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/index.cjs +93 -0
  121. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaFeatureColonSpaceChecker.cjs +54 -0
  122. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaQueryListCommaWhitespaceChecker.cjs +73 -0
  123. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/README.md +34 -0
  124. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/index.cjs +63 -0
  125. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/README.md +79 -0
  126. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/index.cjs +302 -0
  127. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/README.md +78 -0
  128. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/index.cjs +246 -0
  129. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/README.md +34 -0
  130. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/index.cjs +62 -0
  131. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/README.md +74 -0
  132. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/index.cjs +197 -0
  133. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/README.md +40 -0
  134. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.cjs +139 -0
  135. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/README.md +192 -0
  136. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/index.cjs +95 -0
  137. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/README.md +112 -0
  138. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/index.cjs +214 -0
  139. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/README.md +162 -0
  140. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/index.cjs +109 -0
  141. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/README.md +162 -0
  142. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/index.cjs +88 -0
  143. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/README.md +78 -0
  144. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/index.cjs +67 -0
  145. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/README.md +78 -0
  146. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/index.cjs +67 -0
  147. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/README.md +40 -0
  148. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/index.cjs +95 -0
  149. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/README.md +120 -0
  150. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/index.cjs +126 -0
  151. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/README.md +112 -0
  152. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/index.cjs +101 -0
  153. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/README.md +110 -0
  154. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/index.cjs +92 -0
  155. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/README.md +110 -0
  156. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/index.cjs +92 -0
  157. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/README.md +103 -0
  158. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/index.cjs +74 -0
  159. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/README.md +108 -0
  160. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/index.cjs +104 -0
  161. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/README.md +62 -0
  162. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/index.cjs +162 -0
  163. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/README.md +128 -0
  164. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/index.cjs +90 -0
  165. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorAttributeOperatorSpaceChecker.cjs +95 -0
  166. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorCombinatorSpaceChecker.cjs +113 -0
  167. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorListCommaWhitespaceChecker.cjs +64 -0
  168. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/README.md +130 -0
  169. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/index.cjs +256 -0
  170. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/README.md +41 -0
  171. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/index.cjs +67 -0
  172. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/README.md +126 -0
  173. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/index.cjs +133 -0
  174. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/README.md +102 -0
  175. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/index.cjs +107 -0
  176. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/README.md +100 -0
  177. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/index.cjs +49 -0
  178. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/README.md +136 -0
  179. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/index.cjs +94 -0
  180. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/README.md +136 -0
  181. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/index.cjs +94 -0
  182. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/README.md +121 -0
  183. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/index.cjs +68 -0
  184. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/valueListCommaWhitespaceChecker.cjs +74 -0
  185. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/LICENSE +13 -0
  186. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/index.cjs +216 -0
  187. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/addEmptyLineAfter.cjs +30 -0
  188. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/hasEmptyBlock.cjs +14 -0
  189. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/nextNonCommentNode.cjs +21 -0
  190. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/removeEmptyLinesAfter.cjs +16 -0
  191. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/whitespaceChecker.cjs +361 -0
  192. package/stylelint/plugins/stylelint-selector-no-empty.js +8 -8
  193. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +4 -4
  194. package/stylelint/plugins/stylelint-high-performance-animation.js +0 -276
  195. package/stylelint/plugins/stylelint-stylistic.js +0 -188
package/.linter-bundle.js CHANGED
@@ -9,6 +9,7 @@ const snippets = {
9
9
  };
10
10
 
11
11
  export default {
12
+ verbose: true,
12
13
  timing: true,
13
14
  files: {
14
15
  restrictions: [
@@ -27,6 +28,7 @@ export default {
27
28
  'node_modules/**',
28
29
  'stylelint/index.cjs',
29
30
  `stylelint/plugins/stylelint-${snippets.kebabCase}.js`,
31
+ `stylelint/plugins/stylelint-15.11.0-stylistic/**/{${snippets.camelCase}.cjs,README.md,LICENSE}`,
30
32
  '.editorconfig',
31
33
  '.eslintrc.cjs',
32
34
  '.gitattributes',
package/CHANGELOG.md CHANGED
@@ -6,7 +6,81 @@ 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/v5.1.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v6.1.0...HEAD)
10
+
11
+ ## [6.1.0] - 2024-01-24
12
+
13
+ ### Changed
14
+
15
+ - [eslint] Updated `@typescript-eslint` from `6.19.0` to `6.19.1`
16
+ - [stylelint] Updated `stylelint-scss` from `6.0.0` to `6.1.0`
17
+ - [eslint] Activate `allowConstantLoopConditions` of [`@typescript-eslint/no-unnecessary-condition`](https://typescript-eslint.io/rules/no-unnecessary-condition/) rule, as this is covered by [`no-constant-condition`](https://archive.eslint.org/docs/rules/no-constant-condition)
18
+ - [eslint] Allow "camelCase" and "PascalCase" style in [`@typescript-eslint/naming-convention`](https://typescript-eslint.io/rules/naming-convention/) rule for imports
19
+ - [eslint/overrides-javascript] Disable [`unicorn/prefer-module`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md) for *.js files in the root directory (so that configuration files are ignored)
20
+ - [stylelint] Make use of new [`scss/no-unused-private-members`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-unused-private-members/README.md) rule
21
+
22
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v6.0.0...v6.1.0)
23
+
24
+ ## [6.0.0] - 2024-01-21
25
+
26
+ ### Added
27
+
28
+ - [eslint] Make use of new [`@typescript-eslint/no-useless-empty-export`](https://typescript-eslint.io/rules/no-useless-empty-export) rule
29
+ - [eslint] Make use of new [`@typescript-eslint/no-unsafe-unary-minus`](https://typescript-eslint.io/rules/no-unsafe-unary-minus/) rule
30
+ - [eslint] Make use of new [`no-object-constructor`](https://eslint.org/docs/latest/rules/no-object-constructor) rule
31
+ - [eslint] Make use of new [`unicorn/no-unnecessary-polyfills`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md) rule
32
+ - [markdownlint] Make use of new [`MD054`/link-image-style](https://github.com/DavidAnson/markdownlint/blob/main/doc/md054.md) rule
33
+ - [eslint/overrides-jest] Make use of new [`jest/no-confusing-set-time`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-confusing-set-timeout.md) rule
34
+ - [eslint/overrides-jsdoc] Make use of [`jsdoc/informative-docs`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md) rule
35
+ - [stylelint] Make use of new [`lightness-notation`](https://stylelint.io/user-guide/rules/lightness-notation/) rule with option "percentage"
36
+ - [stylelint] Make use of new [`scss/at-root-no-redundant`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-root-no-redundant/README.md) rule
37
+ - [stylelint] Make use of new [`scss/property-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/property-no-unknown/README.md) rule, replacing [`property-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/property-no-unknown/) rule
38
+ - [stylelint] Make use of new [`scss/function-calculation-no-interpolation`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-calculation-no-interpolation/README.md) rule
39
+ - [stylelint] Added, but disabled new [`scss/block-no-redundant-nesting`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/block-no-redundant-nesting/README.md) rule
40
+ - [stylelint] Added, but disabled new [`scss/load-no-partial-leading-underscore`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/load-no-partial-leading-underscore/README.md) rule
41
+ - [stylelint] Added, but disabled [`scss/at-use-no-redundant-alias`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-use-no-redundant-alias/README.md) rule
42
+
43
+ ### Fixed
44
+
45
+ - [general] Removed '--verbose' argument for `tsc` and `markdownlint`, which don't support it
46
+ - [general] Show errors in linter-bundle configuration file
47
+
48
+ ### Changed
49
+
50
+ - [general] Drop support for Node.js version less than v18.12.0 as `stylelint@16.0.0` doesn't support them anymore
51
+ - [eslint] Updated `@typescript-eslint` from `6.5.0` to `6.19.0`
52
+ - [eslint] Updated `eslint` from `8.48.0` to `8.56.0`
53
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.6.0` to `3.6.1`
54
+ - [eslint] Updated `eslint-import-resolver-webpack` from `0.13.7` to `0.13.8`
55
+ - [eslint] Updated `eslint-plugin-import` from `2.28.1` to `2.29.1`
56
+ - [eslint] Updated `eslint-plugin-jest` from `27.2.3` to `27.6.3`
57
+ - [eslint] Updated `eslint-plugin-jsdoc` from `46.5.1` to `48.0.2`
58
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.7.1` to `6.8.0`
59
+ - [eslint] Updated `eslint-plugin-n` from `16.0.2` to `16.6.2`
60
+ - [eslint] Updated `eslint-plugin-unicorn` from `48.0.1` to `50.0.1`
61
+ - [markdownlint] Updated `markdownlint-cli` from `0.36.0` to `0.38.0`
62
+ - [stylelint] Updated `postcss-scss` from `4.0.7` to `4.0.9`
63
+ - [stylelint] Updated `stylelint` from `15.10.3` to `16.2.0`
64
+ - [stylelint] Updated `stylelint-declaration-block-no-ignored-properties` from `2.7.0` to `2.8.0`
65
+ - [stylelint] Updated `stylelint-order` from `6.0.3` to `6.0.4`
66
+ - [stylelint] Updated `stylelint-scss` from `5.1.0` to `6.0.0`
67
+ - [stylelint] Updated `stylelint-use-logical-spec` from `5.0.0` to `5.0.1`
68
+ - [stylelint] Forked 73 stylistic rules from `stylelint@15.11.0` which have been removed in `stylelint@16.0.0`
69
+ - [audit] Updated `better-npm-audit` from `1.9.1` to `3.7.3`
70
+ - [audit] Updated `improved-yarn-audit` from `2.3.3` to `3.0.0`
71
+ - [eslint] Enable `ignoreOverrideMethods` and `ignoreClassesThatImplementAnInterface` of [`@typescript-eslint/class-methods-use-this`](https://typescript-eslint.io/rules/class-methods-use-this/) rule
72
+ - [eslint] Enable `includeTypes` option of [`import/no-extraneous-dependencies`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md) rule
73
+ - [eslint/overrides-javascript] Activated rule [`unicorn/prefer-module`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md) rule
74
+ - [stylelint] Re-use [`stylelint-high-performance-animation`](https://www.npmjs.com/package/stylelint-high-performance-animation) instead of the fork, as it seems to be maintained again
75
+
76
+ ### Removed
77
+
78
+ - [eslint] Remove deprecated `no-new-object` rule
79
+ - [markdownlint] Update removed the deprecated `MD002`/`MD006` rules
80
+ - [markdownlint] Update removed rule aliases for "header"
81
+ - [stylelint] Removed deprecated `scss/at-import-no-partial-leading-underscore` rule
82
+
83
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v5.1.0...v6.0.0)
10
84
 
11
85
  ## [5.1.0] - 2023-09-03
12
86
 
@@ -170,7 +244,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
170
244
  - [eslint] Updated `eslint-plugin-react` from `7.32.2` to `7.33.0`
171
245
  - [eslint] Updated `eslint-plugin-unicorn` from `48.0.0` to `48.0.1`
172
246
  - [eslint] Reactivated `unicorn/no-empty-file`
173
- - [eslint] Activated `ignoreConditionalTests` and `ignoreMixedLogicalExpressions` options of [@typescript-eslint/prefer-nullish-coalescing](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md) rule
247
+ - [eslint] Activated `ignoreConditionalTests` and `ignoreMixedLogicalExpressions` options of [@typescript-eslint/prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing.md) rule
174
248
  - [styleint] Set `ignoreFunctions` option to `/^custom-/u` of [`scss/function-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-no-unknown/README.md) rule
175
249
  - [stylelint] Ignore SCSS variables in [`declaration-property-value-no-unknown`](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown/) rule
176
250
  - [stylelint] Ignore wrapping parentheses for `grid-template-areas` values in [`declaration-property-value-no-unknown`](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown/) rule
@@ -316,12 +390,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
316
390
 
317
391
  ### Added
318
392
 
319
- - [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
320
- - [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
321
- - [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
322
- - [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
323
- - [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
324
- - [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
393
+ - [eslint] Added new [`@typescript-eslint/key-spacing`](https://typescript-eslint.io/rules/key-spacing.md) rule
394
+ - [eslint] Added new [`@typescript-eslint/no-duplicate-type-constituents.md`](https://typescript-eslint.io/rules/no-duplicate-type-constituents.md) rule
395
+ - [eslint] Added new [`@typescript-eslint/no-import-type-side-effects`](https://typescript-eslint.io/rules/no-import-type-side-effects.md) rule
396
+ - [eslint] Added new [`@typescript-eslint/no-mixed-enums`](https://typescript-eslint.io/rules/no-mixed-enums.md) rule
397
+ - [eslint] Added new [`@typescript-eslint/no-unsafe-enum-comparison`](https://typescript-eslint.io/rules/no-unsafe-enum-comparison.md) rule
398
+ - [eslint] Added new [`@typescript-eslint/sort-type-constituents`](https://typescript-eslint.io/rules/sort-type-constituents.md) rule
325
399
  - [eslint] Added new [`no-constant-binary-expression`](https://github.com/eslint/eslint/blob/main/docs/src/rules/no-constant-binary-expression.md) rule
326
400
  - [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
327
401
  - [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`
@@ -839,7 +913,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
839
913
  - [eslint] Updated `@typescript-eslint` from v5.11.0 to v5.12.0
840
914
  - [eslint] Updated `eslint` from v8.8.0 to v8.9.0
841
915
  - [eslint] Updated `eslint-plugin-jsdoc` from v37.8.2 to v37.9.1
842
- - [eslint] Ignore `generics` in [`@typescript-eslint/comma-dangle`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/comma-dangle.md) to allow [generic component definitions for function components](https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/#crayon-620a96e97d44a141656396)
916
+ - [eslint] Ignore `generics` in [`@typescript-eslint/comma-dangle`](https://typescript-eslint.io/rules/comma-dangle.md) to allow [generic component definitions for function components](https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/#crayon-620a96e97d44a141656396)
843
917
 
844
918
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.5.0...v2.6.0)
845
919
 
package/README.md CHANGED
@@ -44,13 +44,15 @@ Beside that, the following additional rules are part of this bundle:
44
44
  ### stylelint
45
45
 
46
46
  - [stylelint-declaration-block-no-ignored-properties](https://www.npmjs.com/package/stylelint-declaration-block-no-ignored-properties)
47
- - [stylelint-high-performance-animation](https://www.npmjs.com/package/stylelint-high-performance-animation) (Forked version)
47
+ - [stylelint-high-performance-animation](https://www.npmjs.com/package/stylelint-high-performance-animation)
48
48
  - [stylelint-order](https://www.npmjs.com/package/stylelint-order)
49
49
  - [stylelint-scss](https://www.npmjs.com/package/stylelint-scss)
50
50
  - [stylelint-selector-no-empty](https://www.npmjs.com/package/stylelint-selector-no-empty) (Forked version)
51
51
  - [stylelint-selector-tag-no-without-class](https://www.npmjs.com/package/stylelint-selector-tag-no-without-class) (Forked version)
52
52
  - [stylelint-use-logical-spec](https://www.npmjs.com/package/stylelint-use-logical-spec)
53
53
 
54
+ Beside that [73 stylistic rules](https://github.com/jens-duttke/linter-bundle/tree/main/stylelint/plugins/stylelint-15.11.0-stylistic/rules) has been forked from `stylelint@15.11.0`, which have been removed in `stylelint@16.0.0`, are part of this bundle.
55
+
54
56
  ### Previously used, but now unmaintained plugins
55
57
 
56
58
  Unfortunately a couple of previously used plugins are not regularly maintained or depend on unmaintained third-party code which blocks them from updating, so they don't provide updates for the major releases of the linters (ESLint and Stylelint).
@@ -62,7 +64,7 @@ If these plugins are maintained again, the plugins will also be used again.
62
64
 
63
65
  ## Install
64
66
 
65
- Ensure you are using atleast Node.js version 16.
67
+ Ensure you are using atleast Node.js version 18.2.0.
66
68
 
67
69
  ```sh
68
70
  npm install linter-bundle --save-dev
@@ -561,7 +563,7 @@ Will execute:
561
563
  eslint "./**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}" --format unix
562
564
  ```
563
565
 
564
- Additionally, the environment variable `TIMING` is set to `10`.
566
+ Additionally, the environment variable `TIMING` is set to `10`, to show timing information about the 10 slowest rules.
565
567
 
566
568
  #### Optional command line arguments for `lint ts`
567
569
 
package/TODO.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # @todo
2
2
 
3
+ - Aktuell sind die Versionen von den Audit-Tools hardcodiert in der lint.js hinterlegt:
4
+ 'better-npm-audit@3.7.3',
5
+ 'improved-yarn-audit@3.0.0',
6
+ Das sollte irgendwo hinterlegt werden, so z.B. check-outdated drauf zugreifen kann. (z.B. die optionalDependencies? Sind diese nach dem regulären Installieren noch vorhanden und lassen sich entsprechend auslesen? Werden diese von check-outdated geprüft?)
7
+
3
8
  - Timing funktioniert nicht - siehe HexEd.it-core
4
9
 
5
10
  - Wie erreichen wir auto-completion in der .linter-bundle.js datei?
package/eslint/index.cjs CHANGED
@@ -261,12 +261,12 @@ module.exports = {
261
261
  'no-nested-ternary': 'error',
262
262
  'no-new-func': 'error',
263
263
  'no-new-native-nonconstructor': 'error',
264
- 'no-new-object': 'error',
265
264
  'no-new-symbol': 'error',
266
265
  'no-new-wrappers': 'error',
267
266
  'no-new': 'error',
268
267
  'no-nonoctal-decimal-escape': 'error',
269
268
  'no-obj-calls': 'error',
269
+ 'no-object-constructor': 'error',
270
270
  'no-octal-escape': 'error',
271
271
  'no-octal': 'error',
272
272
  'no-param-reassign': 'off', // Parameter reassignment used wisely makes the code more readable
@@ -423,7 +423,7 @@ module.exports = {
423
423
  }],
424
424
  '@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
425
425
  '@typescript-eslint/class-literal-property-style': 'error',
426
- '@typescript-eslint/class-methods-use-this': ['error', { exceptMethods: ['componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'shouldComponentUpdate'] }],
426
+ '@typescript-eslint/class-methods-use-this': ['error', { exceptMethods: ['componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'shouldComponentUpdate'], ignoreOverrideMethods: true, ignoreClassesThatImplementAnInterface: true }],
427
427
  '@typescript-eslint/comma-dangle': ['error', { generics: 'ignore' }],
428
428
  '@typescript-eslint/comma-spacing': 'error',
429
429
  '@typescript-eslint/consistent-generic-constructors': 'error',
@@ -650,6 +650,9 @@ module.exports = {
650
650
  // Interface
651
651
  { selector: 'interface', format: ['PascalCase'] },
652
652
 
653
+ // Import
654
+ { selector: 'import', format: ['camelCase', 'PascalCase'] },
655
+
653
656
  // Type alias
654
657
  { selector: 'typeAlias', format: ['PascalCase'] },
655
658
 
@@ -718,7 +721,7 @@ module.exports = {
718
721
  allowTupleTypes: 'in-unions-and-intersections'
719
722
  }],
720
723
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
721
- '@typescript-eslint/no-unnecessary-condition': 'error',
724
+ '@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }],
722
725
  '@typescript-eslint/no-unnecessary-qualifier': 'error',
723
726
  '@typescript-eslint/no-unnecessary-type-arguments': 'error',
724
727
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
@@ -730,10 +733,12 @@ module.exports = {
730
733
  '@typescript-eslint/no-unsafe-enum-comparison': 'error',
731
734
  '@typescript-eslint/no-unsafe-member-access': 'error',
732
735
  '@typescript-eslint/no-unsafe-return': 'error',
736
+ '@typescript-eslint/no-unsafe-unary-minus': 'error',
733
737
  '@typescript-eslint/no-unused-expressions': 'error',
734
738
  '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }],
735
739
  '@typescript-eslint/no-use-before-define': ['error', { functions: false }],
736
740
  '@typescript-eslint/no-useless-constructor': 'error',
741
+ '@typescript-eslint/no-useless-empty-export': 'error',
737
742
  '@typescript-eslint/no-var-requires': 'error',
738
743
  '@typescript-eslint/non-nullable-type-assertion-style': 'off', // Conflicts with `no-non-null-assertion`, which we prefer
739
744
  '@typescript-eslint/object-curly-spacing': ['error', 'always'],
@@ -832,7 +837,7 @@ module.exports = {
832
837
  'import/no-duplicates': 'error',
833
838
  'import/no-dynamic-require': 'error',
834
839
  'import/no-empty-named-blocks': 'error',
835
- 'import/no-extraneous-dependencies': 'error',
840
+ 'import/no-extraneous-dependencies': ['error', { includeTypes: true }],
836
841
  'import/no-internal-modules': ['off', { // @todo Throws an "Cannot read property 'value' of null" error in src/help/scss/help.scss.d.ts:2 since the update to v2.21.1. If this issue does not get fixed in the next releases, report it!
837
842
  allow: [
838
843
  'workbox-window/utils/WorkboxEvent'
@@ -978,6 +983,7 @@ module.exports = {
978
983
  'unicorn/no-this-assignment': 'error',
979
984
  'unicorn/no-typeof-undefined': 'error',
980
985
  'unicorn/no-unnecessary-await': 'error',
986
+ 'unicorn/no-unnecessary-polyfills': 'error',
981
987
  'unicorn/no-unreadable-array-destructuring': 'error',
982
988
  'unicorn/no-unreadable-iife': 'error',
983
989
  'unicorn/no-unused-properties': 'error',
@@ -99,7 +99,7 @@ module.exports = {
99
99
  }
100
100
  }],
101
101
  'unicorn/no-process-exit': 'off', // n/no-process-exit
102
- 'unicorn/prefer-module': 'off', // @todo Requires Node.js v13.2. Activate in 2023
102
+ 'unicorn/prefer-module': 'error',
103
103
  'unicorn/prefer-node-protocol': 'off', // @todo Requires Node.js v16. Activate in 2025
104
104
  'unicorn/prevent-abbreviations': ['error', { ignore: ['args', 'dev', 'env', 'i', 'j', 'i18n', 'pkg', 'ref', 'Ref', 'req', 'res', 'setupDevServerMiddleware'] }],
105
105
  'unicorn/text-encoding-identifier-case': 'off'
@@ -110,6 +110,12 @@ module.exports = {
110
110
  rules: {
111
111
  'unicorn/prefer-top-level-await': 'error'
112
112
  }
113
+ },
114
+ {
115
+ files: ['./*.js'],
116
+ rules: {
117
+ 'unicorn/prefer-module': 'off'
118
+ }
113
119
  }
114
120
  ]
115
121
  };
@@ -70,6 +70,7 @@ module.exports = {
70
70
  'jest/no-commented-out-tests': 'error',
71
71
  'jest/no-conditional-expect': 'error',
72
72
  'jest/no-conditional-in-test': 'error',
73
+ 'jest/no-confusing-set-time': 'error',
73
74
  'jest/no-deprecated-functions': 'error',
74
75
  'jest/no-disabled-tests': 'error',
75
76
  'jest/no-done-callback': 'error',
@@ -35,6 +35,7 @@ module.exports = {
35
35
  'jsdoc/empty-tags': 'error',
36
36
  'jsdoc/implements-on-classes': 'error',
37
37
  'jsdoc/imports-as-dependencies': 'off', // @todo Doesn't cover `peerDependencies` yet. As of v46.2.5 it should cover Node.js modules (like `child_process`), which must be checked, before activation.
38
+ 'jsdoc/informative-docs': 'error',
38
39
  'jsdoc/match-description': 'error',
39
40
  'jsdoc/match-name': 'off',
40
41
  'jsdoc/multiline-blocks': ['error', { noSingleLineBlocks: true, singleLineTags: ['lends', 'type', 'typedef'], noFinalLineText: false }],
@@ -4,6 +4,8 @@
4
4
  * @see https://www.joshwcomeau.com/react/the-perils-of-rehydration/
5
5
  */
6
6
 
7
+ /* eslint-disable unicorn/prefer-module -- For ESLint, we still need to rely on CommonJS modules */
8
+
7
9
  const DISALLOWED_OBJECTS = new Set(['globalThis', 'window', 'self']);
8
10
 
9
11
  /**
@@ -58,8 +60,8 @@ module.exports = {
58
60
  /**
59
61
  * Get the name (identifier) of a global scope of an BinaryExpression operator.
60
62
  *
61
- * @param {import('estree').Expression} node - The node to check.
62
- * @returns {string | null} Returns the name of the `node`, or null if not compared with a global scope identifier.
63
+ * @param {import('estree').Expression} node - The node to check
64
+ * @returns {string | null} Returns the name of the `node`, or null if not compared with a global scope identifier
63
65
  */
64
66
  function getExpressionValue (node) {
65
67
  if (node.type === 'UnaryExpression' && node.operator === 'typeof' && node.argument.type === 'Identifier' && DISALLOWED_OBJECTS.has(node.argument.name)) {
@@ -73,7 +75,7 @@ function getExpressionValue (node) {
73
75
  * Check if a given `node` is a literal expression consisting of the text "undefined".
74
76
  *
75
77
  * @param {import('estree').Expression} node - The node to check
76
- * @returns {boolean} `true` if the node is a literal expression consisting of the text "undefined", otherwise `false`.
78
+ * @returns {boolean} `true` if the node is a literal expression consisting of the text "undefined", otherwise `false`
77
79
  */
78
80
  function checkLiteral (node) {
79
81
  return (
@@ -2,6 +2,8 @@
2
2
  * @file ESLint rule which ensures that a `typeof` operant has more than one type in TypeScript, to prevent unnecessary checks of types at runtime.
3
3
  */
4
4
 
5
+ /* eslint-disable unicorn/prefer-module -- For ESLint, we still need to rely on CommonJS modules */
6
+
5
7
  /** @typedef {ts.Type & { intrinsicName?: string; types?: ts.Type[]; objectFlags?: ts.ObjectFlags; }} Type */
6
8
 
7
9
  const ts = require('typescript');
@@ -69,9 +71,9 @@ module.exports = {
69
71
  /**
70
72
  * Check if the number of types equals one, and returns the type.
71
73
  *
72
- * @param {ts.TypeChecker} checker - TypeScript type checker.
73
- * @param {Type} type - TypeScript type node.
74
- * @returns {string | null} Type as string match the `typeof` string, or `null` if it's not a primitive type.
74
+ * @param {ts.TypeChecker} checker - TypeScript type checker
75
+ * @param {Type} type - TypeScript type node
76
+ * @returns {string | null} Type as string match the `typeof` string, or `null` if it's not a primitive type
75
77
  */
76
78
  function getSingleType (checker, type) {
77
79
  if (isAnyOrUnknown(type)) {
@@ -100,9 +102,9 @@ function getSingleType (checker, type) {
100
102
  /**
101
103
  * Converts a TypeScript type into a `typeof` compatible string, or `null` if it's not a primitive type.
102
104
  *
103
- * @param {ts.TypeChecker} checker - TypeScript type checker.
104
- * @param {Type} type - TypeScript type node.
105
- * @returns {string | null} Type as string match the `typeof` string, or `null` if it's not a primitive type.
105
+ * @param {ts.TypeChecker} checker - TypeScript type checker
106
+ * @param {Type} type - TypeScript type node
107
+ * @returns {string | null} Type as string match the `typeof` string, or `null` if it's not a primitive type
106
108
  */
107
109
  function getTypeString (checker, type) {
108
110
  if (isAnyOrUnknown(type)) {
@@ -130,8 +132,8 @@ function getTypeString (checker, type) {
130
132
  /**
131
133
  * Check if the type is either `any` or `unknown`, which represents multiple types.
132
134
  *
133
- * @param {ts.Type} type - TypeScript type node.
134
- * @returns {boolean} Returns `true` if the type is either `any` or `unknown`, or an object which is based on `unknown`.
135
+ * @param {ts.Type} type - TypeScript type node
136
+ * @returns {boolean} Returns `true` if the type is either `any` or `unknown`, or an object which is based on `unknown`
135
137
  */
136
138
  function isAnyOrUnknown (type) {
137
139
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- `symbol` on Object is `undefined` for `Omit<unknown, 'undefined'>`
@@ -141,8 +143,8 @@ function isAnyOrUnknown (type) {
141
143
  /**
142
144
  * Checks if the given `type` is a `string`.
143
145
  *
144
- * @param {Type} type - TypeScript type node.
145
- * @returns {boolean} Returns `true` if the type is a `string`.
146
+ * @param {Type} type - TypeScript type node
147
+ * @returns {boolean} Returns `true` if the type is a `string`
146
148
  */
147
149
  function isString (type) {
148
150
  return [ts.TypeFlags.String, ts.TypeFlags.StringLiteral, ts.TypeFlags.StringMapping].includes(type.flags);
@@ -151,8 +153,8 @@ function isString (type) {
151
153
  /**
152
154
  * Checks if the given `type` is a `number`.
153
155
  *
154
- * @param {Type} type - TypeScript type node.
155
- * @returns {boolean} Returns `true` if the type is a `number`.
156
+ * @param {Type} type - TypeScript type node
157
+ * @returns {boolean} Returns `true` if the type is a `number`
156
158
  */
157
159
  function isNumber (type) {
158
160
  return [ts.TypeFlags.Number, ts.TypeFlags.NumberLiteral].includes(type.flags);
@@ -161,8 +163,8 @@ function isNumber (type) {
161
163
  /**
162
164
  * Checks if the given `type` is a `bigint`.
163
165
  *
164
- * @param {Type} type - TypeScript type node.
165
- * @returns {boolean} Returns `true` if the type is a `bigint`.
166
+ * @param {Type} type - TypeScript type node
167
+ * @returns {boolean} Returns `true` if the type is a `bigint`
166
168
  */
167
169
  function isBigInt (type) {
168
170
  return [ts.TypeFlags.BigInt, ts.TypeFlags.BigIntLiteral].includes(type.flags);
@@ -171,8 +173,8 @@ function isBigInt (type) {
171
173
  /**
172
174
  * Checks if the given `type` is a `boolean`.
173
175
  *
174
- * @param {Type} type - TypeScript type node.
175
- * @returns {boolean} Returns `true` if the type is a `boolean`.
176
+ * @param {Type} type - TypeScript type node
177
+ * @returns {boolean} Returns `true` if the type is a `boolean`
176
178
  */
177
179
  function isBoolean (type) {
178
180
  return [ts.TypeFlags.Boolean, ts.TypeFlags.BooleanLiteral].includes(type.flags);
@@ -181,8 +183,8 @@ function isBoolean (type) {
181
183
  /**
182
184
  * Checks if the given `type` is a `symbol`.
183
185
  *
184
- * @param {Type} type - TypeScript type node.
185
- * @returns {boolean} Returns `true` if the type is a `symbol`.
186
+ * @param {Type} type - TypeScript type node
187
+ * @returns {boolean} Returns `true` if the type is a `symbol`
186
188
  */
187
189
  function isSymbol (type) {
188
190
  return [ts.TypeFlags.ESSymbol, ts.TypeFlags.UniqueESSymbol].includes(type.flags);
@@ -191,8 +193,8 @@ function isSymbol (type) {
191
193
  /**
192
194
  * Checks if the given `type` is a `function`.
193
195
  *
194
- * @param {Type} type - TypeScript type node.
195
- * @returns {boolean} Returns `true` if the type is a `function`.
196
+ * @param {Type} type - TypeScript type node
197
+ * @returns {boolean} Returns `true` if the type is a `function`
196
198
  */
197
199
  function isFunction (type) {
198
200
  return (type.flags === ts.TypeFlags.Object && type.objectFlags === ts.ObjectFlags.Anonymous);
@@ -201,8 +203,8 @@ function isFunction (type) {
201
203
  /**
202
204
  * Checks if the given `type` is a `undefined`.
203
205
  *
204
- * @param {Type} type - TypeScript type node.
205
- * @returns {boolean} Returns `true` if the type is `undefined`.
206
+ * @param {Type} type - TypeScript type node
207
+ * @returns {boolean} Returns `true` if the type is `undefined`
206
208
  */
207
209
  function isUndefined (type) {
208
210
  return [ts.TypeFlags.Undefined].includes(type.flags);
@@ -213,8 +215,8 @@ function isUndefined (type) {
213
215
  *
214
216
  * We don't check `ts.TypeFlags.Object`, because for TypeScript Object seems to be the fallback for everything - even unknown types.
215
217
  *
216
- * @param {Type} type - TypeScript type node.
217
- * @returns {boolean} Returns `true` if the type is an `object`.
218
+ * @param {Type} type - TypeScript type node
219
+ * @returns {boolean} Returns `true` if the type is an `object`
218
220
  */
219
221
  function isObject (type) {
220
222
  return [ts.TypeFlags.Null].includes(type.flags);
@@ -2,6 +2,8 @@
2
2
  * @file ESLint rule which ensures that only files which match given glob patterns are part of your project.
3
3
  */
4
4
 
5
+ /* eslint-disable unicorn/prefer-module -- For ESLint, we still need to rely on CommonJS modules */
6
+
5
7
  const path = require('node:path');
6
8
 
7
9
  const micromatch = require('micromatch');
@@ -87,7 +89,7 @@ module.exports = {
87
89
  /**
88
90
  * Add rule listener which reports the error.
89
91
  *
90
- * @returns {import('eslint').Rule.RuleListener} Returns a `Program` rule lister which reports the error.
92
+ * @returns {import('eslint').Rule.RuleListener} Returns a `Program` rule lister which reports the error
91
93
  */
92
94
  function report () {
93
95
  return {
@@ -9,8 +9,8 @@
9
9
  *
10
10
  * @public
11
11
  * @template T
12
- * @param {T} value - The value which should be checked.
13
- * @returns {T extends Array<any> ? T : []} Either the input array, or an empty array, if the input array is not an array.
12
+ * @param {T} value - The value which should be checked
13
+ * @returns {T extends Array<any> ? T : []} Either the input array, or an empty array, if the input array is not an array
14
14
  */
15
15
  function array (value) {
16
16
  // @ts-expect-error -- Right now the type definition of `Array.isArray()` is incorrect since it uses `arg is any[]` instead of the correct type of `arg`.
@@ -15,7 +15,7 @@ let gitFiles;
15
15
  * Returns a list of changed files based on Git.
16
16
  *
17
17
  * @public
18
- * @returns {Promise<string[]>} The list of changed files.
18
+ * @returns {Promise<string[]>} The list of changed files
19
19
  */
20
20
  export async function getGitFiles () {
21
21
  if (!gitFilesProcessPromise) {
@@ -17,7 +17,7 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
17
17
  * Detects if installed versions of dependencies don't match to the required dependencies.
18
18
  *
19
19
  * @public
20
- * @returns {Promise<Dependency[]>} An array of missing overrides (=wrong versions).
20
+ * @returns {Promise<Dependency[]>} An array of missing overrides (=wrong versions)
21
21
  */
22
22
  export async function getOutdatedDependencies () {
23
23
  const linterBundleDependencies = JSON.parse(await fs.readFile(path.resolve(dirname, '../package.json'), 'utf8')).dependencies;
@@ -17,7 +17,7 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
17
17
  * Detects outdated "overrides"/"resolutions" dependencies.
18
18
  *
19
19
  * @public
20
- * @returns {Promise<{ overrides: Dependency[]; resolutions: Dependency[]; }>} Either the input array, or an empty array, if the input array is not an array.
20
+ * @returns {Promise<{ overrides: Dependency[]; resolutions: Dependency[]; }>} Either the input array, or an empty array, if the input array is not an array
21
21
  */
22
22
  export async function getOutdatedOverrides () {
23
23
  const linterBundleDependencies = JSON.parse(await fs.readFile(path.resolve(dirname, '../package.json'), 'utf8')).dependencies;
@@ -12,7 +12,7 @@ const require = createRequire(import.meta.url);
12
12
  * Returns if the project is using npm or yarn.
13
13
  *
14
14
  * @public
15
- * @returns {Promise<string | null>} Return the path to the Stylelint CLI script, or `null` if it can't be found.
15
+ * @returns {Promise<string | null>} Return the path to the Stylelint CLI script, or `null` if it can't be found
16
16
  */
17
17
  export async function getStylelintPath () {
18
18
  const stylelintLibPath = path.dirname(require.resolve('stylelint'));
@@ -9,7 +9,7 @@ import * as path from 'node:path';
9
9
  * Returns if the project is using npm or yarn.
10
10
  *
11
11
  * @public
12
- * @returns {Promise<'none' | 'npm' | 'yarn' | 'both'>} Returns which package manager name.
12
+ * @returns {Promise<'none' | 'npm' | 'yarn' | 'both'>} Returns which package manager name
13
13
  */
14
14
  export async function isNpmOrYarn () {
15
15
  let npm = false;
@@ -16,20 +16,26 @@ export const linterBundleConfig = (
16
16
  /**
17
17
  * Load a config file if it exist.
18
18
  *
19
- * @param {string} fileName - The name of the config file
20
- * @returns {Promise<import('./linter-bundle-config.js').LinterBundleConfig | undefined>} - Either the file content for `undefined` if the file does not exist.
19
+ * @param {string} fileName - The name of the config file in the current working directory
20
+ * @returns {Promise<import('./linter-bundle-config.js').LinterBundleConfig | undefined>} Either the file content for `undefined` if the file does not exist
21
21
  * */
22
22
  async function loadConfig (fileName) {
23
+ const filePath = path.join(process.cwd(), fileName);
24
+
25
+ if (!await fs.access(filePath, fs.constants.F_OK).then(() => true).catch(() => false)) {
26
+ return;
27
+ }
28
+
23
29
  try {
24
30
  if (fileName.endsWith('.json')) {
25
- const content = await fs.readFile(path.join(process.cwd(), fileName), 'utf8');
31
+ const content = await fs.readFile(filePath, 'utf8');
26
32
 
27
33
  return JSON.parse(content);
28
34
  }
29
35
 
30
- const filePath = path.join('file://', process.cwd(), fileName);
36
+ const fileUri = path.join('file://', filePath);
31
37
 
32
- const config = await import(filePath);
38
+ const config = await import(fileUri);
33
39
 
34
40
  if ('default' in config) {
35
41
  return config.default;
@@ -37,7 +43,16 @@ async function loadConfig (fileName) {
37
43
 
38
44
  return config;
39
45
  }
40
- catch {
41
- return;
46
+ catch (error) {
47
+ process.stderr.write(`Error reading ${filePath}\n`);
48
+
49
+ if (error instanceof Error) {
50
+ process.stderr.write(`${error.stack}\n`);
51
+ }
52
+ else {
53
+ process.stderr.write(`${error}\n`);
54
+ }
42
55
  }
56
+
57
+ return;
43
58
  }
@@ -11,8 +11,8 @@ import * as os from 'node:os';
11
11
  * Executes a process asynchronously.
12
12
  *
13
13
  * @public
14
- * @param {string} command - The process to execute.
15
- * @param {childProcess.ExecOptions | undefined} [options] - The options of the `childProcess.exec()` method.
14
+ * @param {string} command - The process to execute
15
+ * @param {childProcess.ExecOptions | undefined} [options] - The options of the `childProcess.exec()` method
16
16
  * @returns {Promise<ProcessResult>} An object containing the result of the process execution
17
17
  */
18
18
  export async function runProcess (command, options) {
@@ -33,7 +33,7 @@ export async function runProcess (command, options) {
33
33
  ...options?.env,
34
34
  LINTER_BUNDLE: '1'
35
35
  },
36
- shell: os.userInfo().shell
36
+ shell: os.userInfo().shell ?? undefined
37
37
  });
38
38
 
39
39
  lintingProcess.stdout?.on('data', (/** @type {string} */data) => {