linter-bundle 5.0.1 → 6.0.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 (197) hide show
  1. package/.linter-bundle.js +4 -0
  2. package/.linter-bundle.schema.json +125 -0
  3. package/CHANGELOG.md +79 -3
  4. package/README.md +5 -3
  5. package/TODO.md +10 -0
  6. package/eslint/index.cjs +6 -3
  7. package/eslint/overrides-javascript.cjs +1 -1
  8. package/eslint/overrides-jest.cjs +1 -0
  9. package/eslint/overrides-jsdoc.cjs +1 -0
  10. package/eslint/rules/no-global-undefined-check.js +5 -3
  11. package/eslint/rules/no-unnecessary-typeof.js +26 -24
  12. package/eslint/rules/restricted-filenames.js +3 -1
  13. package/helper/ensure-type.cjs +2 -2
  14. package/helper/get-git-files.js +1 -1
  15. package/helper/get-outdated-dependencies.js +1 -1
  16. package/helper/get-outdated-overrides.js +1 -1
  17. package/helper/get-stylelint-path.js +1 -1
  18. package/helper/is-npm-or-yarn.js +1 -1
  19. package/helper/linter-bundle-config.d.ts +7 -7
  20. package/helper/linter-bundle-config.js +28 -6
  21. package/helper/run-process.js +3 -3
  22. package/lint.js +31 -35
  23. package/package.json +27 -26
  24. package/stylelint/index.cjs +89 -5
  25. package/stylelint/plugins/stylelint-15.11.0-stylistic/LICENSE +20 -0
  26. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/LICENSE +9 -0
  27. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/index.cjs +122 -0
  28. package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/selectors.cjs +327 -0
  29. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/README.md +110 -0
  30. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/index.cjs +66 -0
  31. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/README.md +117 -0
  32. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/index.cjs +55 -0
  33. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/README.md +63 -0
  34. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/index.cjs +87 -0
  35. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/README.md +50 -0
  36. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/index.cjs +70 -0
  37. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/atRuleNameSpaceChecker.cjs +56 -0
  38. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/README.md +238 -0
  39. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/index.cjs +130 -0
  40. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/README.md +196 -0
  41. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/index.cjs +154 -0
  42. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/README.md +93 -0
  43. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/index.cjs +133 -0
  44. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/README.md +174 -0
  45. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/index.cjs +111 -0
  46. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/README.md +138 -0
  47. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/index.cjs +184 -0
  48. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/README.md +191 -0
  49. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/index.cjs +118 -0
  50. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/README.md +218 -0
  51. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/index.cjs +141 -0
  52. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/README.md +58 -0
  53. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/index.cjs +95 -0
  54. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/README.md +72 -0
  55. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +95 -0
  56. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/README.md +67 -0
  57. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/index.cjs +96 -0
  58. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/README.md +141 -0
  59. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/index.cjs +109 -0
  60. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/README.md +120 -0
  61. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/index.cjs +75 -0
  62. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/README.md +147 -0
  63. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/index.cjs +97 -0
  64. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/README.md +130 -0
  65. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/index.cjs +106 -0
  66. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/README.md +108 -0
  67. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/index.cjs +147 -0
  68. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/README.md +78 -0
  69. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/index.cjs +99 -0
  70. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/README.md +111 -0
  71. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/index.cjs +75 -0
  72. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/README.md +72 -0
  73. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/index.cjs +74 -0
  74. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationBangSpaceChecker.cjs +63 -0
  75. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationColonSpaceChecker.cjs +58 -0
  76. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/findMediaOperator.cjs +32 -0
  77. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/README.md +113 -0
  78. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/index.cjs +61 -0
  79. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/README.md +129 -0
  80. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/index.cjs +61 -0
  81. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/README.md +144 -0
  82. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/index.cjs +62 -0
  83. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/README.md +144 -0
  84. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/index.cjs +62 -0
  85. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/README.md +78 -0
  86. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/index.cjs +115 -0
  87. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/README.md +144 -0
  88. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/index.cjs +282 -0
  89. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/README.md +140 -0
  90. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/index.cjs +182 -0
  91. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/README.md +80 -0
  92. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/index.cjs +198 -0
  93. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceChecker.cjs +125 -0
  94. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceFix.cjs +51 -0
  95. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/README.md +339 -0
  96. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/index.cjs +743 -0
  97. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/README.md +21 -0
  98. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/index.cjs +132 -0
  99. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/README.md +116 -0
  100. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/index.cjs +225 -0
  101. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/README.md +151 -0
  102. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/index.cjs +200 -0
  103. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/README.md +72 -0
  104. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/index.cjs +91 -0
  105. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/README.md +72 -0
  106. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/index.cjs +91 -0
  107. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/README.md +108 -0
  108. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/index.cjs +93 -0
  109. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/README.md +62 -0
  110. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/index.cjs +112 -0
  111. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/README.md +72 -0
  112. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/index.cjs +109 -0
  113. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/README.md +72 -0
  114. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/index.cjs +109 -0
  115. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/README.md +113 -0
  116. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/index.cjs +97 -0
  117. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/README.md +111 -0
  118. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/index.cjs +49 -0
  119. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/README.md +136 -0
  120. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/index.cjs +93 -0
  121. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/README.md +136 -0
  122. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/index.cjs +93 -0
  123. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaFeatureColonSpaceChecker.cjs +54 -0
  124. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaQueryListCommaWhitespaceChecker.cjs +73 -0
  125. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/README.md +34 -0
  126. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/index.cjs +63 -0
  127. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/README.md +79 -0
  128. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/index.cjs +302 -0
  129. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/README.md +78 -0
  130. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/index.cjs +246 -0
  131. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/README.md +34 -0
  132. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/index.cjs +62 -0
  133. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/README.md +74 -0
  134. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/index.cjs +197 -0
  135. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/README.md +40 -0
  136. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.cjs +139 -0
  137. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/README.md +192 -0
  138. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/index.cjs +95 -0
  139. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/README.md +112 -0
  140. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/index.cjs +214 -0
  141. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/README.md +162 -0
  142. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/index.cjs +109 -0
  143. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/README.md +162 -0
  144. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/index.cjs +88 -0
  145. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/README.md +78 -0
  146. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/index.cjs +67 -0
  147. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/README.md +78 -0
  148. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/index.cjs +67 -0
  149. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/README.md +40 -0
  150. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/index.cjs +95 -0
  151. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/README.md +120 -0
  152. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/index.cjs +126 -0
  153. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/README.md +112 -0
  154. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/index.cjs +101 -0
  155. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/README.md +110 -0
  156. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/index.cjs +92 -0
  157. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/README.md +110 -0
  158. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/index.cjs +92 -0
  159. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/README.md +103 -0
  160. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/index.cjs +74 -0
  161. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/README.md +108 -0
  162. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/index.cjs +104 -0
  163. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/README.md +62 -0
  164. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/index.cjs +162 -0
  165. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/README.md +128 -0
  166. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/index.cjs +90 -0
  167. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorAttributeOperatorSpaceChecker.cjs +95 -0
  168. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorCombinatorSpaceChecker.cjs +113 -0
  169. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorListCommaWhitespaceChecker.cjs +64 -0
  170. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/README.md +130 -0
  171. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/index.cjs +256 -0
  172. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/README.md +41 -0
  173. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/index.cjs +67 -0
  174. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/README.md +126 -0
  175. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/index.cjs +133 -0
  176. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/README.md +102 -0
  177. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/index.cjs +107 -0
  178. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/README.md +100 -0
  179. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/index.cjs +49 -0
  180. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/README.md +136 -0
  181. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/index.cjs +94 -0
  182. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/README.md +136 -0
  183. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/index.cjs +94 -0
  184. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/README.md +121 -0
  185. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/index.cjs +68 -0
  186. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/valueListCommaWhitespaceChecker.cjs +74 -0
  187. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/LICENSE +13 -0
  188. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/index.cjs +216 -0
  189. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/addEmptyLineAfter.cjs +30 -0
  190. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/hasEmptyBlock.cjs +14 -0
  191. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/nextNonCommentNode.cjs +21 -0
  192. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/removeEmptyLinesAfter.cjs +16 -0
  193. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/whitespaceChecker.cjs +361 -0
  194. package/stylelint/plugins/stylelint-selector-no-empty.js +8 -8
  195. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +4 -4
  196. package/stylelint/plugins/stylelint-high-performance-animation.js +0 -276
  197. package/stylelint/plugins/stylelint-stylistic.js +0 -188
package/.linter-bundle.js CHANGED
@@ -9,6 +9,8 @@ const snippets = {
9
9
  };
10
10
 
11
11
  export default {
12
+ verbose: true,
13
+ timing: true,
12
14
  files: {
13
15
  restrictions: [
14
16
  {
@@ -26,11 +28,13 @@ export default {
26
28
  'node_modules/**',
27
29
  'stylelint/index.cjs',
28
30
  `stylelint/plugins/stylelint-${snippets.kebabCase}.js`,
31
+ `stylelint/plugins/stylelint-15.11.0-stylistic/**/{${snippets.camelCase}.cjs,README.md,LICENSE}`,
29
32
  '.editorconfig',
30
33
  '.eslintrc.cjs',
31
34
  '.gitattributes',
32
35
  '.gitignore',
33
36
  '.linter-bundle.js',
37
+ '.linter-bundle.schema.json',
34
38
  '.markdownlint.json',
35
39
  '.npmignore',
36
40
  '*.md',
@@ -0,0 +1,125 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "verbose": {
6
+ "type": "boolean"
7
+ },
8
+ "timing": {
9
+ "type": "boolean"
10
+ },
11
+ "git": {
12
+ "type": "boolean"
13
+ },
14
+ "files": {
15
+ "type": "object",
16
+ "properties": {
17
+ "restrictions": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "basePath": {
23
+ "type": "string"
24
+ },
25
+ "allowed": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "disallowed": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string"
35
+ }
36
+ }
37
+ },
38
+ "required": [
39
+ "restrictions"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ },
45
+ "required": [
46
+ "restrictions"
47
+ ],
48
+ "additionalProperties": false
49
+ },
50
+ "tsc": {
51
+ "type": "object",
52
+ "properties": {
53
+ "tsconfig": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ "additionalProperties": false
58
+ },
59
+ "ts": {
60
+ "type": "object",
61
+ "properties": {
62
+ "tsconfig": {
63
+ "type": "string"
64
+ },
65
+ "include": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "exclude": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "string"
75
+ }
76
+ },
77
+ "overrides": {
78
+ "type": "object",
79
+ "properties": {
80
+ "general": {
81
+ "type": "object"
82
+ },
83
+ "react": {
84
+ "type": "object"
85
+ }
86
+ },
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "additionalProperties": false
91
+ },
92
+ "sass": {
93
+ "type": "object",
94
+ "properties": {
95
+ "patternPrefix": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "additionalProperties": false
100
+ },
101
+ "audit": {
102
+ "type": "object",
103
+ "properties": {
104
+ "minSeverity": {
105
+ "type": "string",
106
+ "enum": [
107
+ "info",
108
+ "low",
109
+ "moderate",
110
+ "high",
111
+ "critical"
112
+ ]
113
+ },
114
+ "exclude": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ }
119
+ }
120
+ },
121
+ "additionalProperties": false
122
+ }
123
+ },
124
+ "additionalProperties": false
125
+ }
package/CHANGELOG.md CHANGED
@@ -6,7 +6,80 @@ 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.0.1...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v6.0.0...HEAD)
10
+
11
+ ## [6.0.0] - 2024-01-21
12
+
13
+ ### Added
14
+
15
+ - [eslint] Make use of new [`@typescript-eslint/no-useless-empty-export`](https://typescript-eslint.io/rules/no-useless-empty-export) rule
16
+ - [eslint] Make use of new [`@typescript-eslint/no-unsafe-unary-minus`](https://typescript-eslint.io/rules/no-unsafe-unary-minus/) rule
17
+ - [eslint] Make use of new [`no-object-constructor`](https://eslint.org/docs/latest/rules/no-object-constructor) rule
18
+ - [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
19
+ - [markdownlint] Make use of new [`MD054`/link-image-style](https://github.com/DavidAnson/markdownlint/blob/main/doc/md054.md) rule
20
+ - [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
21
+ - [eslint/overrides-jsdoc] Make use of [`jsdoc/informative-docs`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md) rule
22
+ - [stylelint] Make use of new [`lightness-notation`](https://stylelint.io/user-guide/rules/lightness-notation/) rule with option "percentage"
23
+ - [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
24
+ - [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
25
+ - [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
26
+ - [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
27
+ - [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
28
+ - [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
29
+
30
+ ### Fixed
31
+
32
+ - [general] Removed '--verbose' argument for `tsc` and `markdownlint`, which don't support it
33
+ - [general] Show errors in linter-bundle configuration file
34
+
35
+ ### Changed
36
+
37
+ - [general] Drop support for Node.js version less than v18.12.0 as `stylelint@16.0.0` doesn't support them anymore
38
+ - [eslint] Updated `@typescript-eslint` from `6.5.0` to `6.19.0`
39
+ - [eslint] Updated `eslint` from `8.48.0` to `8.56.0`
40
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.6.0` to `3.6.1`
41
+ - [eslint] Updated `eslint-import-resolver-webpack` from `0.13.7` to `0.13.8`
42
+ - [eslint] Updated `eslint-plugin-import` from `2.28.1` to `2.29.1`
43
+ - [eslint] Updated `eslint-plugin-jest` from `27.2.3` to `27.6.3`
44
+ - [eslint] Updated `eslint-plugin-jsdoc` from `46.5.1` to `48.0.2`
45
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.7.1` to `6.8.0`
46
+ - [eslint] Updated `eslint-plugin-n` from `16.0.2` to `16.6.2`
47
+ - [eslint] Updated `eslint-plugin-unicorn` from `48.0.1` to `50.0.1`
48
+ - [markdownlint] Updated `markdownlint-cli` from `0.36.0` to `0.38.0`
49
+ - [stylelint] Updated `postcss-scss` from `4.0.7` to `4.0.9`
50
+ - [stylelint] Updated `stylelint` from `15.10.3` to `16.2.0`
51
+ - [stylelint] Updated `stylelint-declaration-block-no-ignored-properties` from `2.7.0` to `2.8.0`
52
+ - [stylelint] Updated `stylelint-order` from `6.0.3` to `6.0.4`
53
+ - [stylelint] Updated `stylelint-scss` from `5.1.0` to `6.0.0`
54
+ - [stylelint] Updated `stylelint-use-logical-spec` from `5.0.0` to `5.0.1`
55
+ - [stylelint] Forked 73 stylistic rules from `stylelint@15.11.0` which have been removed in `stylelint@16.0.0`
56
+ - [audit] Updated `better-npm-audit` from `1.9.1` to `3.7.3`
57
+ - [audit] Updated `improved-yarn-audit` from `2.3.3` to `3.0.0`
58
+ - [eslint] Enable `ignoreOverrideMethods` and `ignoreClassesThatImplementAnInterface` of [`@typescript-eslint/class-methods-use-this`](https://typescript-eslint.io/rules/class-methods-use-this/) rule
59
+ - [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
60
+ - [eslint/overrides-javascript] Activated rule [`unicorn/prefer-module`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md) rule
61
+ - [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
62
+
63
+ ### Removed
64
+
65
+ - [eslint] Remove deprecated `no-new-object` rule
66
+ - [markdownlint] Update removed the deprecated `MD002`/`MD006` rules
67
+ - [markdownlint] Update removed rule aliases for "header"
68
+ - [stylelint] Removed deprecated `scss/at-import-no-partial-leading-underscore` rule
69
+
70
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v5.1.0...v6.0.0)
71
+
72
+ ## [5.1.0] - 2023-09-03
73
+
74
+ ### Added
75
+
76
+ - [general] Added basic schema for `.linter-bundle.json` configuration file
77
+
78
+ ### Fixed
79
+
80
+ - [general] Fix support for `.linter-bundle.json`
81
+
82
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v5.0.1...v5.1.0)
10
83
 
11
84
  ## [5.0.1] - 2023-09-03
12
85
 
@@ -37,7 +110,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
37
110
 
38
111
  ## [4.0.3] - 2023-08-31
39
112
 
40
- ### Changed
113
+ ### Fixed
41
114
 
42
115
  - [files] Don't show "No relevant files changed." if the `--git`` option was not used
43
116
 
@@ -45,7 +118,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
45
118
 
46
119
  ## [4.0.2] - 2023-08-31
47
120
 
48
- ### Changed
121
+ ### Fixed
49
122
 
50
123
  - [files] Don't append `"**"` as fallback argument to the command line
51
124
 
@@ -56,6 +129,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
129
  ### Changed
57
130
 
58
131
  - [eslint] Disabled `unicorn/filename-case` in favour of the new linter-bundle `files` task
132
+
133
+ ### Fixed
134
+
59
135
  - [files] Fixed path to `files` task
60
136
 
61
137
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v4.0.0...v4.0.1)
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,15 @@
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
+
8
+ - Timing funktioniert nicht - siehe HexEd.it-core
9
+
10
+ - Wie erreichen wir auto-completion in der .linter-bundle.js datei?
11
+ .linter-bundle.json vielleicht mit Schema-Datei?
12
+
3
13
  <!-- markdownlint-disable -->
4
14
 
5
15
  - Bereiche in Readme aufklappbar machen:
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',
@@ -730,10 +730,12 @@ module.exports = {
730
730
  '@typescript-eslint/no-unsafe-enum-comparison': 'error',
731
731
  '@typescript-eslint/no-unsafe-member-access': 'error',
732
732
  '@typescript-eslint/no-unsafe-return': 'error',
733
+ '@typescript-eslint/no-unsafe-unary-minus': 'error',
733
734
  '@typescript-eslint/no-unused-expressions': 'error',
734
735
  '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }],
735
736
  '@typescript-eslint/no-use-before-define': ['error', { functions: false }],
736
737
  '@typescript-eslint/no-useless-constructor': 'error',
738
+ '@typescript-eslint/no-useless-empty-export': 'error',
737
739
  '@typescript-eslint/no-var-requires': 'error',
738
740
  '@typescript-eslint/non-nullable-type-assertion-style': 'off', // Conflicts with `no-non-null-assertion`, which we prefer
739
741
  '@typescript-eslint/object-curly-spacing': ['error', 'always'],
@@ -832,7 +834,7 @@ module.exports = {
832
834
  'import/no-duplicates': 'error',
833
835
  'import/no-dynamic-require': 'error',
834
836
  'import/no-empty-named-blocks': 'error',
835
- 'import/no-extraneous-dependencies': 'error',
837
+ 'import/no-extraneous-dependencies': ['error', { includeTypes: true }],
836
838
  '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
839
  allow: [
838
840
  'workbox-window/utils/WorkboxEvent'
@@ -978,6 +980,7 @@ module.exports = {
978
980
  'unicorn/no-this-assignment': 'error',
979
981
  'unicorn/no-typeof-undefined': 'error',
980
982
  'unicorn/no-unnecessary-await': 'error',
983
+ 'unicorn/no-unnecessary-polyfills': 'error',
981
984
  'unicorn/no-unreadable-array-destructuring': 'error',
982
985
  'unicorn/no-unreadable-iife': 'error',
983
986
  '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'
@@ -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;