@alexlit/lint-kit 182.1.0 → 182.2.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 (409) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/package.json +3 -3
  3. package/packages/config-eslint/plugins/unocss.js +4 -6
  4. package/packages/config-stylelint/node_modules/ansi-regex/index.d.ts +33 -0
  5. package/packages/config-stylelint/node_modules/ansi-regex/index.js +14 -0
  6. package/packages/config-stylelint/node_modules/ansi-regex/license +9 -0
  7. package/packages/config-stylelint/node_modules/ansi-regex/package.json +61 -0
  8. package/packages/config-stylelint/node_modules/ansi-regex/readme.md +66 -0
  9. package/packages/config-stylelint/node_modules/file-entry-cache/LICENSE +19 -0
  10. package/packages/config-stylelint/node_modules/file-entry-cache/README.md +630 -0
  11. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.cjs +559 -0
  12. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.cts +304 -0
  13. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.ts +304 -0
  14. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.js +525 -0
  15. package/packages/config-stylelint/node_modules/file-entry-cache/package.json +62 -0
  16. package/packages/config-stylelint/node_modules/flat-cache/LICENSE +19 -0
  17. package/packages/config-stylelint/node_modules/flat-cache/README.md +235 -0
  18. package/packages/config-stylelint/node_modules/flat-cache/dist/index.cjs +495 -0
  19. package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.cts +255 -0
  20. package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.ts +255 -0
  21. package/packages/config-stylelint/node_modules/flat-cache/dist/index.js +455 -0
  22. package/packages/config-stylelint/node_modules/flat-cache/package.json +87 -0
  23. package/packages/config-stylelint/node_modules/globby/ignore.js +337 -0
  24. package/packages/config-stylelint/node_modules/globby/index.d.ts +394 -0
  25. package/packages/config-stylelint/node_modules/globby/index.js +488 -0
  26. package/packages/config-stylelint/node_modules/globby/license +9 -0
  27. package/packages/config-stylelint/node_modules/globby/package.json +94 -0
  28. package/packages/config-stylelint/node_modules/globby/readme.md +388 -0
  29. package/packages/config-stylelint/node_modules/globby/utilities.js +382 -0
  30. package/packages/config-stylelint/node_modules/meow/build/dependencies.js +7347 -0
  31. package/packages/config-stylelint/node_modules/meow/build/index.d.ts +2684 -0
  32. package/packages/config-stylelint/node_modules/meow/build/index.js +185 -0
  33. package/packages/config-stylelint/node_modules/meow/build/licenses.md +1254 -0
  34. package/packages/config-stylelint/node_modules/meow/build/options.js +147 -0
  35. package/packages/config-stylelint/node_modules/meow/build/parser.js +113 -0
  36. package/packages/config-stylelint/node_modules/meow/build/utils.js +7 -0
  37. package/packages/config-stylelint/node_modules/meow/build/validate.js +145 -0
  38. package/packages/config-stylelint/node_modules/meow/license +9 -0
  39. package/packages/config-stylelint/node_modules/meow/package.json +103 -0
  40. package/packages/config-stylelint/node_modules/meow/readme.md +387 -0
  41. package/packages/config-stylelint/node_modules/postcss-safe-parser/LICENSE +20 -0
  42. package/packages/config-stylelint/node_modules/postcss-safe-parser/README.md +25 -0
  43. package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parse.js +12 -0
  44. package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parser.js +100 -0
  45. package/packages/config-stylelint/node_modules/postcss-safe-parser/package.json +36 -0
  46. package/packages/config-stylelint/node_modules/slash/index.d.ts +23 -0
  47. package/packages/config-stylelint/node_modules/slash/index.js +9 -0
  48. package/packages/config-stylelint/node_modules/slash/license +9 -0
  49. package/packages/config-stylelint/node_modules/slash/package.json +39 -0
  50. package/packages/config-stylelint/node_modules/slash/readme.md +36 -0
  51. package/packages/config-stylelint/node_modules/string-width/index.d.ts +39 -0
  52. package/packages/config-stylelint/node_modules/string-width/index.js +119 -0
  53. package/packages/config-stylelint/node_modules/string-width/license +9 -0
  54. package/packages/config-stylelint/node_modules/string-width/package.json +65 -0
  55. package/packages/config-stylelint/node_modules/string-width/readme.md +66 -0
  56. package/packages/config-stylelint/node_modules/strip-ansi/index.d.ts +15 -0
  57. package/packages/config-stylelint/node_modules/strip-ansi/index.js +19 -0
  58. package/packages/config-stylelint/node_modules/strip-ansi/license +9 -0
  59. package/packages/config-stylelint/node_modules/strip-ansi/package.json +59 -0
  60. package/packages/config-stylelint/node_modules/strip-ansi/readme.md +37 -0
  61. package/packages/config-stylelint/node_modules/stylelint/LICENSE +20 -0
  62. package/packages/config-stylelint/node_modules/stylelint/README.md +113 -0
  63. package/packages/config-stylelint/node_modules/stylelint/bin/stylelint.mjs +7 -0
  64. package/packages/config-stylelint/node_modules/stylelint/lib/assignDisabledRanges.mjs +483 -0
  65. package/packages/config-stylelint/node_modules/stylelint/lib/augmentConfig.mjs +586 -0
  66. package/packages/config-stylelint/node_modules/stylelint/lib/cli.mjs +746 -0
  67. package/packages/config-stylelint/node_modules/stylelint/lib/constants.mjs +25 -0
  68. package/packages/config-stylelint/node_modules/stylelint/lib/createPartialStylelintResult.mjs +114 -0
  69. package/packages/config-stylelint/node_modules/stylelint/lib/createPlugin.mjs +9 -0
  70. package/packages/config-stylelint/node_modules/stylelint/lib/createStylelint.mjs +37 -0
  71. package/packages/config-stylelint/node_modules/stylelint/lib/descriptionlessDisables.mjs +51 -0
  72. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/calcSeverityCounts.mjs +21 -0
  73. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/compactFormatter.mjs +23 -0
  74. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/index.mjs +23 -0
  75. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/jsonFormatter.mjs +10 -0
  76. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/preprocessWarnings.mjs +74 -0
  77. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/stringFormatter.mjs +308 -0
  78. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/tapFormatter.mjs +85 -0
  79. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/terminalLink.mjs +21 -0
  80. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/unixFormatter.mjs +32 -0
  81. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/verboseFormatter.mjs +175 -0
  82. package/packages/config-stylelint/node_modules/stylelint/lib/getConfigForFile.mjs +110 -0
  83. package/packages/config-stylelint/node_modules/stylelint/lib/getPostcssResult.mjs +130 -0
  84. package/packages/config-stylelint/node_modules/stylelint/lib/index.mjs +38 -0
  85. package/packages/config-stylelint/node_modules/stylelint/lib/invalidScopeDisables.mjs +41 -0
  86. package/packages/config-stylelint/node_modules/stylelint/lib/isPathIgnored.mjs +48 -0
  87. package/packages/config-stylelint/node_modules/stylelint/lib/lintPostcssResult.mjs +172 -0
  88. package/packages/config-stylelint/node_modules/stylelint/lib/lintSource.mjs +135 -0
  89. package/packages/config-stylelint/node_modules/stylelint/lib/needlessDisables.mjs +91 -0
  90. package/packages/config-stylelint/node_modules/stylelint/lib/normalizeAllRuleSettings.mjs +29 -0
  91. package/packages/config-stylelint/node_modules/stylelint/lib/normalizeRuleSettings.mjs +56 -0
  92. package/packages/config-stylelint/node_modules/stylelint/lib/postcssPlugin.mjs +50 -0
  93. package/packages/config-stylelint/node_modules/stylelint/lib/prepareReturnValue.mjs +63 -0
  94. package/packages/config-stylelint/node_modules/stylelint/lib/printConfig.mjs +44 -0
  95. package/packages/config-stylelint/node_modules/stylelint/lib/reference/atKeywords.mjs +83 -0
  96. package/packages/config-stylelint/node_modules/stylelint/lib/reference/functions.mjs +96 -0
  97. package/packages/config-stylelint/node_modules/stylelint/lib/reference/keywords.mjs +663 -0
  98. package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaFeatures.mjs +115 -0
  99. package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaTypes.mjs +14 -0
  100. package/packages/config-stylelint/node_modules/stylelint/lib/reference/prefixes.mjs +17 -0
  101. package/packages/config-stylelint/node_modules/stylelint/lib/reference/properties.mjs +1112 -0
  102. package/packages/config-stylelint/node_modules/stylelint/lib/reference/selectors.mjs +472 -0
  103. package/packages/config-stylelint/node_modules/stylelint/lib/reference/units.mjs +82 -0
  104. package/packages/config-stylelint/node_modules/stylelint/lib/reportDisables.mjs +48 -0
  105. package/packages/config-stylelint/node_modules/stylelint/lib/reportUnknownRuleNames.mjs +76 -0
  106. package/packages/config-stylelint/node_modules/stylelint/lib/resolveConfig.mjs +43 -0
  107. package/packages/config-stylelint/node_modules/stylelint/lib/rules/alpha-value-notation/index.mjs +207 -0
  108. package/packages/config-stylelint/node_modules/stylelint/lib/rules/annotation-no-unknown/index.mjs +88 -0
  109. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-allowed-list/index.mjs +62 -0
  110. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-no-unknown/index.mjs +108 -0
  111. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-value-no-unknown/index.mjs +64 -0
  112. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-disallowed-list/index.mjs +62 -0
  113. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-empty-line-before/index.mjs +178 -0
  114. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-deprecated/index.mjs +86 -0
  115. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-unknown/index.mjs +80 -0
  116. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-vendor-prefix/index.mjs +82 -0
  117. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-prelude-no-invalid/index.mjs +76 -0
  118. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-property-required-list/index.mjs +92 -0
  119. package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-empty/index.mjs +116 -0
  120. package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-redundant-nested-style-rules/index.mjs +52 -0
  121. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-alias-notation/index.mjs +87 -0
  122. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-notation/index.mjs +168 -0
  123. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-alpha/index.mjs +75 -0
  124. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-length/index.mjs +128 -0
  125. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/colordUtils.mjs +109 -0
  126. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/index.mjs +183 -0
  127. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-hex/index.mjs +69 -0
  128. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-invalid-hex/index.mjs +68 -0
  129. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-empty-line-before/index.mjs +131 -0
  130. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-no-empty/index.mjs +50 -0
  131. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-pattern/index.mjs +51 -0
  132. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-whitespace-inside/index.mjs +149 -0
  133. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-word-disallowed-list/index.mjs +63 -0
  134. package/packages/config-stylelint/node_modules/stylelint/lib/rules/container-name-pattern/index.mjs +107 -0
  135. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-media-pattern/index.mjs +61 -0
  136. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-empty-line-before/index.mjs +156 -0
  137. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-no-missing-var-function/index.mjs +148 -0
  138. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-pattern/index.mjs +100 -0
  139. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-custom-properties/index.mjs +82 -0
  140. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-properties/index.mjs +301 -0
  141. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/index.mjs +411 -0
  142. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides/index.mjs +74 -0
  143. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-single-line-max-declarations/index.mjs +62 -0
  144. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-empty-line-before/index.mjs +160 -0
  145. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-no-important/index.mjs +51 -0
  146. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-max-values/index.mjs +79 -0
  147. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-allowed-list/index.mjs +108 -0
  148. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-disallowed-list/index.mjs +94 -0
  149. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-allowed-list/index.mjs +66 -0
  150. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-disallowed-list/index.mjs +66 -0
  151. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-keyword-no-deprecated/index.mjs +203 -0
  152. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-no-unknown/index.mjs +424 -0
  153. package/packages/config-stylelint/node_modules/stylelint/lib/rules/display-notation/index.mjs +225 -0
  154. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-name-quotes/index.mjs +243 -0
  155. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-duplicate-names/index.mjs +122 -0
  156. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-missing-generic-family-keyword/index.mjs +122 -0
  157. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-weight-notation/index.mjs +221 -0
  158. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-allowed-list/index.mjs +114 -0
  159. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-calc-no-unspaced-operator/index.mjs +589 -0
  160. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-disallowed-list/index.mjs +73 -0
  161. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-linear-gradient-no-nonstandard-direction/index.mjs +145 -0
  162. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-name-case/index.mjs +120 -0
  163. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-no-unknown/index.mjs +83 -0
  164. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-no-scheme-relative/index.mjs +67 -0
  165. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-quotes/index.mjs +230 -0
  166. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-allowed-list/index.mjs +70 -0
  167. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-disallowed-list/index.mjs +70 -0
  168. package/packages/config-stylelint/node_modules/stylelint/lib/rules/hue-degree-notation/index.mjs +123 -0
  169. package/packages/config-stylelint/node_modules/stylelint/lib/rules/import-notation/index.mjs +104 -0
  170. package/packages/config-stylelint/node_modules/stylelint/lib/rules/index.mjs +180 -0
  171. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-block-no-duplicate-selectors/index.mjs +68 -0
  172. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-declaration-no-important/index.mjs +54 -0
  173. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-selector-notation/index.mjs +202 -0
  174. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframes-name-pattern/index.mjs +63 -0
  175. package/packages/config-stylelint/node_modules/stylelint/lib/rules/layer-name-pattern/index.mjs +91 -0
  176. package/packages/config-stylelint/node_modules/stylelint/lib/rules/length-zero-no-unit/index.mjs +221 -0
  177. package/packages/config-stylelint/node_modules/stylelint/lib/rules/lightness-notation/index.mjs +165 -0
  178. package/packages/config-stylelint/node_modules/stylelint/lib/rules/max-nesting-depth/index.mjs +195 -0
  179. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-allowed-list/index.mjs +67 -0
  180. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-disallowed-list/index.mjs +67 -0
  181. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-unknown/index.mjs +79 -0
  182. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-vendor-prefix/index.mjs +94 -0
  183. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-unit-allowed-list/index.mjs +110 -0
  184. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-allowed-list/index.mjs +100 -0
  185. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-no-unknown/index.mjs +277 -0
  186. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-range-notation/index.mjs +187 -0
  187. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-query-no-invalid/index.mjs +193 -0
  188. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-type-no-deprecated/index.mjs +82 -0
  189. package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/index.mjs +117 -0
  190. package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/utils/findNotContiguousOrRectangular.mjs +57 -0
  191. package/packages/config-stylelint/node_modules/stylelint/lib/rules/nesting-selector-no-missing-scoping-root/index.mjs +165 -0
  192. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-descending-specificity/index.mjs +200 -0
  193. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-at-import-rules/index.mjs +156 -0
  194. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-selectors/index.mjs +218 -0
  195. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-empty-source/index.mjs +61 -0
  196. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/index.mjs +77 -0
  197. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-at-import-rule/index.mjs +76 -0
  198. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-declaration/index.mjs +86 -0
  199. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-irregular-whitespace/index.mjs +236 -0
  200. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-animations/index.mjs +71 -0
  201. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-media/index.mjs +77 -0
  202. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-properties/index.mjs +72 -0
  203. package/packages/config-stylelint/node_modules/stylelint/lib/rules/number-max-precision/index.mjs +209 -0
  204. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-allowed-list/index.mjs +58 -0
  205. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-disallowed-list/index.mjs +58 -0
  206. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-deprecated/index.mjs +143 -0
  207. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-unknown/index.mjs +126 -0
  208. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-vendor-prefix/index.mjs +100 -0
  209. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-empty-line-before/index.mjs +156 -0
  210. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-nesting-at-rule-required-list/index.mjs +85 -0
  211. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-selector-property-disallowed-list/index.mjs +119 -0
  212. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-anb-no-unmatchable/index.mjs +121 -0
  213. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-name-disallowed-list/index.mjs +69 -0
  214. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-allowed-list/index.mjs +70 -0
  215. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-disallowed-list/index.mjs +70 -0
  216. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-quotes/index.mjs +107 -0
  217. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-class-pattern/index.mjs +71 -0
  218. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-allowed-list/index.mjs +81 -0
  219. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-disallowed-list/index.mjs +81 -0
  220. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-disallowed-list/index.mjs +115 -0
  221. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-id-pattern/index.mjs +66 -0
  222. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-attribute/index.mjs +92 -0
  223. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-class/index.mjs +75 -0
  224. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-combinators/index.mjs +77 -0
  225. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-compound-selectors/index.mjs +123 -0
  226. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-id/index.mjs +107 -0
  227. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-pseudo-class/index.mjs +85 -0
  228. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-specificity/index.mjs +146 -0
  229. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-type/index.mjs +219 -0
  230. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-universal/index.mjs +95 -0
  231. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-nested-pattern/index.mjs +95 -0
  232. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-qualifying-type/index.mjs +323 -0
  233. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-vendor-prefix/index.mjs +92 -0
  234. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-not-notation/index.mjs +217 -0
  235. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-allowed-list/index.mjs +84 -0
  236. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-disallowed-list/index.mjs +84 -0
  237. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-no-unknown/index.mjs +179 -0
  238. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-allowed-list/index.mjs +75 -0
  239. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation/index.mjs +93 -0
  240. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-disallowed-list/index.mjs +74 -0
  241. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-no-unknown/index.mjs +91 -0
  242. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-case/index.mjs +118 -0
  243. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-no-unknown/index.mjs +148 -0
  244. package/packages/config-stylelint/node_modules/stylelint/lib/rules/shorthand-property-no-redundant-values/index.mjs +359 -0
  245. package/packages/config-stylelint/node_modules/stylelint/lib/rules/string-no-newline/index.mjs +120 -0
  246. package/packages/config-stylelint/node_modules/stylelint/lib/rules/syntax-string-no-invalid/index.mjs +80 -0
  247. package/packages/config-stylelint/node_modules/stylelint/lib/rules/time-min-milliseconds/index.mjs +167 -0
  248. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-allowed-list/index.mjs +116 -0
  249. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-disallowed-list/index.mjs +211 -0
  250. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-no-unknown/index.mjs +207 -0
  251. package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-keyword-case/index.mjs +253 -0
  252. package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-no-vendor-prefix/index.mjs +92 -0
  253. package/packages/config-stylelint/node_modules/stylelint/lib/standalone.mjs +381 -0
  254. package/packages/config-stylelint/node_modules/stylelint/lib/timing.mjs +134 -0
  255. package/packages/config-stylelint/node_modules/stylelint/lib/unscopedDisables.mjs +66 -0
  256. package/packages/config-stylelint/node_modules/stylelint/lib/utils/FileCache.mjs +115 -0
  257. package/packages/config-stylelint/node_modules/stylelint/lib/utils/addEmptyLineBefore.mjs +21 -0
  258. package/packages/config-stylelint/node_modules/stylelint/lib/utils/addSemicolonForEditInfo.mjs +35 -0
  259. package/packages/config-stylelint/node_modules/stylelint/lib/utils/appendRuleName.mjs +13 -0
  260. package/packages/config-stylelint/node_modules/stylelint/lib/utils/arrayEqual.mjs +14 -0
  261. package/packages/config-stylelint/node_modules/stylelint/lib/utils/beforeBlockString.mjs +28 -0
  262. package/packages/config-stylelint/node_modules/stylelint/lib/utils/blockString.mjs +19 -0
  263. package/packages/config-stylelint/node_modules/stylelint/lib/utils/blurInterpolation.mjs +8 -0
  264. package/packages/config-stylelint/node_modules/stylelint/lib/utils/cachedImport.mjs +68 -0
  265. package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkAgainstRule.mjs +71 -0
  266. package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkInvalidCLIOptions.mjs +105 -0
  267. package/packages/config-stylelint/node_modules/stylelint/lib/utils/configurationComment.mjs +74 -0
  268. package/packages/config-stylelint/node_modules/stylelint/lib/utils/containsString.mjs +52 -0
  269. package/packages/config-stylelint/node_modules/stylelint/lib/utils/createMapWithSet.mjs +19 -0
  270. package/packages/config-stylelint/node_modules/stylelint/lib/utils/dynamicImport.mjs +13 -0
  271. package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachDeclarationBlock.mjs +59 -0
  272. package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachNodeUpToRoot.mjs +22 -0
  273. package/packages/config-stylelint/node_modules/stylelint/lib/utils/emitWarning.mjs +83 -0
  274. package/packages/config-stylelint/node_modules/stylelint/lib/utils/errors.mjs +55 -0
  275. package/packages/config-stylelint/node_modules/stylelint/lib/utils/filterFilePaths.mjs +17 -0
  276. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAnimationName.mjs +74 -0
  277. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAtRuleContext.mjs +27 -0
  278. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findFontFamily.mjs +148 -0
  279. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findMediaFeatureNames.mjs +151 -0
  280. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findNodeUpToRoot.mjs +25 -0
  281. package/packages/config-stylelint/node_modules/stylelint/lib/utils/fixEmptyLinesBefore.mjs +26 -0
  282. package/packages/config-stylelint/node_modules/stylelint/lib/utils/functionArgumentsSearch.mjs +64 -0
  283. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getAtRuleParams.mjs +7 -0
  284. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDeclarationValue.mjs +9 -0
  285. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDimension.mjs +62 -0
  286. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFileIgnorer.mjs +41 -0
  287. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatter.mjs +43 -0
  288. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatterOptionsText.mjs +12 -0
  289. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getImportantPosition.mjs +15 -0
  290. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getLexer.mjs +39 -0
  291. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getModulePath.mjs +35 -0
  292. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getNextNonSharedLineCommentNode.mjs +34 -0
  293. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getPreviousNonSharedLineCommentNode.mjs +36 -0
  294. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRelativePath.mjs +12 -0
  295. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRuleSelector.mjs +9 -0
  296. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSchemeFromUrl.mjs +36 -0
  297. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSelectorSourceIndex.mjs +12 -0
  298. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStrippedSelectorSource.mjs +47 -0
  299. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStylelintRule.mjs +22 -0
  300. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasBlock.mjs +9 -0
  301. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasEmptyLine.mjs +13 -0
  302. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasInterpolation.mjs +24 -0
  303. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasLessInterpolation.mjs +11 -0
  304. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasPsvInterpolation.mjs +11 -0
  305. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasScssInterpolation.mjs +11 -0
  306. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasTplInterpolation.mjs +11 -0
  307. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hash.mjs +10 -0
  308. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterBlock.mjs +15 -0
  309. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterComment.mjs +15 -0
  310. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterSingleLineComment.mjs +19 -0
  311. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterStandardPropertyDeclaration.mjs +19 -0
  312. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAutoprefixable.mjs +364 -0
  313. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterBlocklessAtRule.mjs +21 -0
  314. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterSameNameBlocklessAtRule.mjs +21 -0
  315. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isContextFunctionalPseudoClass.mjs +24 -0
  316. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterIncrementCustomIdentValue.mjs +19 -0
  317. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterResetCustomIdentValue.mjs +19 -0
  318. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomElement.mjs +34 -0
  319. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomFunction.mjs +9 -0
  320. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomMediaQuery.mjs +8 -0
  321. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomProperty.mjs +8 -0
  322. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomSelector.mjs +9 -0
  323. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isDescriptorDeclaration.mjs +22 -0
  324. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNested.mjs +83 -0
  325. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNodeOfRoot.mjs +17 -0
  326. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isHexColor.mjs +9 -0
  327. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isInDocument.mjs +32 -0
  328. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeRule.mjs +17 -0
  329. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeSelector.mjs +29 -0
  330. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isMathFunction.mjs +11 -0
  331. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNonNegativeInteger.mjs +6 -0
  332. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNumbery.mjs +9 -0
  333. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isOnlyWhitespace.mjs +17 -0
  334. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isPathNotFoundError.mjs +9 -0
  335. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isScssVariable.mjs +19 -0
  336. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSharedLineComment.mjs +53 -0
  337. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSingleLineString.mjs +10 -0
  338. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.mjs +32 -0
  339. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxColorFunction.mjs +24 -0
  340. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxCombinator.mjs +32 -0
  341. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxComment.mjs +13 -0
  342. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxDeclaration.mjs +57 -0
  343. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxFunction.mjs +28 -0
  344. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxHexColor.mjs +14 -0
  345. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxKeyframesName.mjs +15 -0
  346. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxProperty.mjs +32 -0
  347. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxRule.mjs +24 -0
  348. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxSelector.mjs +56 -0
  349. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxTypeSelector.mjs +56 -0
  350. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxUrl.mjs +49 -0
  351. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxValue.mjs +51 -0
  352. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeRangeDescriptor.mjs +24 -0
  353. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeSupported.mjs +26 -0
  354. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUrlFunction.mjs +9 -0
  355. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidFontSize.mjs +38 -0
  356. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidHex.mjs +11 -0
  357. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidIdentifier.mjs +39 -0
  358. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVarFunction.mjs +9 -0
  359. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVariable.mjs +9 -0
  360. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isWhitespace.mjs +9 -0
  361. package/packages/config-stylelint/node_modules/stylelint/lib/utils/matchesStringOrRegExp.mjs +97 -0
  362. package/packages/config-stylelint/node_modules/stylelint/lib/utils/mergeSyntaxDefinitions.mjs +137 -0
  363. package/packages/config-stylelint/node_modules/stylelint/lib/utils/narrowFixRange.mjs +68 -0
  364. package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeContextLookup.mjs +41 -0
  365. package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeFieldIndices.mjs +119 -0
  366. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFilePath.mjs +26 -0
  367. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFixMode.mjs +22 -0
  368. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeSelector.mjs +166 -0
  369. package/packages/config-stylelint/node_modules/stylelint/lib/utils/optionsMatches.mjs +20 -0
  370. package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseCustomMediaQuery.mjs +15 -0
  371. package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseMediaQuery.mjs +15 -0
  372. package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseSelector.mjs +19 -0
  373. package/packages/config-stylelint/node_modules/stylelint/lib/utils/pathExists.mjs +16 -0
  374. package/packages/config-stylelint/node_modules/stylelint/lib/utils/pluralize.mjs +10 -0
  375. package/packages/config-stylelint/node_modules/stylelint/lib/utils/putIfAbsent.mjs +20 -0
  376. package/packages/config-stylelint/node_modules/stylelint/lib/utils/rangesOverlap.mjs +19 -0
  377. package/packages/config-stylelint/node_modules/stylelint/lib/utils/rawNodeString.mjs +29 -0
  378. package/packages/config-stylelint/node_modules/stylelint/lib/utils/regexes.mjs +135 -0
  379. package/packages/config-stylelint/node_modules/stylelint/lib/utils/removeEmptyLinesBefore.mjs +13 -0
  380. package/packages/config-stylelint/node_modules/stylelint/lib/utils/report.mjs +321 -0
  381. package/packages/config-stylelint/node_modules/stylelint/lib/utils/reportCommentProblem.mjs +39 -0
  382. package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveFilePath.mjs +38 -0
  383. package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveNestedSelectorsForRule.mjs +108 -0
  384. package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveOptionValue.mjs +30 -0
  385. package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveSilent.mjs +144 -0
  386. package/packages/config-stylelint/node_modules/stylelint/lib/utils/ruleMessages.mjs +18 -0
  387. package/packages/config-stylelint/node_modules/stylelint/lib/utils/setAtRuleParams.mjs +18 -0
  388. package/packages/config-stylelint/node_modules/stylelint/lib/utils/setDeclarationValue.mjs +18 -0
  389. package/packages/config-stylelint/node_modules/stylelint/lib/utils/suppressionsService.mjs +317 -0
  390. package/packages/config-stylelint/node_modules/stylelint/lib/utils/toPath.mjs +23 -0
  391. package/packages/config-stylelint/node_modules/stylelint/lib/utils/typeGuards.mjs +90 -0
  392. package/packages/config-stylelint/node_modules/stylelint/lib/utils/uniteSets.mjs +9 -0
  393. package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateObjectWithArrayProps.mjs +29 -0
  394. package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateObjectWithProps.mjs +28 -0
  395. package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateOptions.mjs +176 -0
  396. package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateTypes.mjs +148 -0
  397. package/packages/config-stylelint/node_modules/stylelint/lib/utils/vendor.mjs +43 -0
  398. package/packages/config-stylelint/node_modules/stylelint/lib/validateDisableSettings.mjs +67 -0
  399. package/packages/config-stylelint/node_modules/stylelint/lib/writeOutputFile.mjs +15 -0
  400. package/packages/config-stylelint/node_modules/stylelint/package.json +212 -0
  401. package/packages/config-stylelint/node_modules/stylelint/types/stylelint/index.d.ts +1590 -0
  402. package/packages/config-stylelint/node_modules/unicorn-magic/default.d.ts +13 -0
  403. package/packages/config-stylelint/node_modules/unicorn-magic/default.js +14 -0
  404. package/packages/config-stylelint/node_modules/unicorn-magic/license +9 -0
  405. package/packages/config-stylelint/node_modules/unicorn-magic/node.d.ts +125 -0
  406. package/packages/config-stylelint/node_modules/unicorn-magic/node.js +49 -0
  407. package/packages/config-stylelint/node_modules/unicorn-magic/package.json +68 -0
  408. package/packages/config-stylelint/node_modules/unicorn-magic/readme.md +31 -0
  409. package/packages/config-stylelint/package.json +2 -2
@@ -0,0 +1,25 @@
1
+ export const DEFAULT_CACHE_LOCATION = './.stylelintcache';
2
+ export const CACHE_STRATEGY_METADATA = 'metadata';
3
+ export const CACHE_STRATEGY_CONTENT = 'content';
4
+ export const DEFAULT_CACHE_STRATEGY = CACHE_STRATEGY_METADATA;
5
+
6
+ export const DEFAULT_IGNORE_FILENAME = '.stylelintignore';
7
+
8
+ export const DEFAULT_SUPPRESSION_FILENAME = 'stylelint-suppressions.json';
9
+
10
+ export const DEFAULT_FORMATTER = 'string';
11
+
12
+ // NOTE: Partially based on `sysexits.h`.
13
+ export const EXIT_CODE_SUCCESS = 0;
14
+ export const EXIT_CODE_FATAL_ERROR = 1;
15
+ export const EXIT_CODE_LINT_PROBLEM = 2;
16
+ export const EXIT_CODE_INVALID_USAGE = 64;
17
+ export const EXIT_CODE_INVALID_CONFIG = 78;
18
+
19
+ export const RULE_NAME_ALL = 'all';
20
+
21
+ export const SEVERITY_ERROR = 'error';
22
+ export const SEVERITY_WARNING = 'warning';
23
+ export const DEFAULT_SEVERITY = SEVERITY_ERROR;
24
+
25
+ export const DEFAULT_FIX_MODE = 'strict';
@@ -0,0 +1,114 @@
1
+ import { SEVERITY_ERROR } from './constants.mjs';
2
+ import process from 'node:process';
3
+
4
+ /** @import {LintResult as StylelintResult, PostcssResult} from 'stylelint' */
5
+
6
+ /**
7
+ * @param {PostcssResult} [postcssResult]
8
+ * @param {import('stylelint').CssSyntaxError} [cssSyntaxError]
9
+ * @returns {StylelintResult}
10
+ */
11
+ export default function createPartialStylelintResult(postcssResult, cssSyntaxError) {
12
+ /** @type {StylelintResult} */
13
+ let stylelintResult;
14
+ /** @type {string | undefined} */
15
+ let source;
16
+
17
+ if (postcssResult && postcssResult.root) {
18
+ if (postcssResult.root.source) {
19
+ source = postcssResult.root.source.input.file;
20
+
21
+ if (!source && 'id' in postcssResult.root.source.input) {
22
+ source = postcssResult.root.source.input.id;
23
+ }
24
+ }
25
+
26
+ // @ts-expect-error -- TS2339: Property 'noDeprecation' does not exist on type 'Process'.
27
+ // https://github.com/nodejs/node/blob/main/doc/api/process.md#processnodeprecation
28
+ const includeDeprecations = !process.noDeprecation;
29
+ const deprecationMessages = includeDeprecations
30
+ ? postcssResult.messages.filter((message) => message.stylelintType === 'deprecation')
31
+ : [];
32
+ const deprecations = deprecationMessages.map((deprecationMessage) => {
33
+ return {
34
+ text: deprecationMessage.text,
35
+ reference: deprecationMessage.stylelintReference,
36
+ };
37
+ });
38
+
39
+ const invalidOptionMessages = postcssResult.messages.filter(
40
+ (message) => message.stylelintType === 'invalidOption',
41
+ );
42
+ const invalidOptionWarnings = invalidOptionMessages.map((invalidOptionMessage) => {
43
+ return {
44
+ text: invalidOptionMessage.text,
45
+ };
46
+ });
47
+
48
+ const parseErrors = postcssResult.messages.filter(
49
+ (message) => message.stylelintType === 'parseError',
50
+ );
51
+
52
+ // Remove deprecation warnings, invalid options, and parse errors from the messages
53
+ postcssResult.messages = postcssResult.messages.filter(
54
+ (message) =>
55
+ message.stylelintType !== 'deprecation' &&
56
+ message.stylelintType !== 'invalidOption' &&
57
+ message.stylelintType !== 'parseError',
58
+ );
59
+
60
+ // This defines the stylelint result object that formatters receive
61
+ stylelintResult = {
62
+ source,
63
+ deprecations,
64
+ invalidOptionWarnings,
65
+ // @ts-expect-error -- TS2322: Type 'Message[]' is not assignable to type '(Warning & { stylelintType: string; })[]'.
66
+ parseErrors,
67
+ errored: postcssResult.stylelint.stylelintError,
68
+ warnings: postcssResult.messages.map((message) => {
69
+ return {
70
+ line: message.line,
71
+ column: message.column,
72
+ endLine: message.endLine,
73
+ endColumn: message.endColumn,
74
+ fix: message.fix,
75
+ rule: message.rule,
76
+ severity: message.severity,
77
+ text: message.text,
78
+ url: message.url,
79
+ };
80
+ }),
81
+ ignored: postcssResult.stylelint.ignored,
82
+ _postcssResult: postcssResult,
83
+ };
84
+ } else if (cssSyntaxError) {
85
+ if (cssSyntaxError.name !== 'CssSyntaxError') {
86
+ throw cssSyntaxError;
87
+ }
88
+
89
+ stylelintResult = {
90
+ source: cssSyntaxError.file || '<input css 1>',
91
+ deprecations: [],
92
+ invalidOptionWarnings: [],
93
+ parseErrors: [],
94
+ errored: true,
95
+ warnings: [
96
+ {
97
+ line: cssSyntaxError.line,
98
+ column: cssSyntaxError.column,
99
+ endLine: cssSyntaxError.endLine,
100
+ endColumn: cssSyntaxError.endColumn,
101
+ rule: cssSyntaxError.name,
102
+ severity: SEVERITY_ERROR,
103
+ text: `${cssSyntaxError.reason} (${cssSyntaxError.name})`,
104
+ },
105
+ ],
106
+ };
107
+ } else {
108
+ throw new Error(
109
+ 'createPartialStylelintResult must be called with either postcssResult or CssSyntaxError',
110
+ );
111
+ }
112
+
113
+ return stylelintResult;
114
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @type {import('stylelint').PublicApi['createPlugin']}
3
+ */
4
+ export default function createPlugin(ruleName, rule) {
5
+ return {
6
+ ruleName,
7
+ rule,
8
+ };
9
+ }
@@ -0,0 +1,37 @@
1
+ import process from 'node:process';
2
+
3
+ import { cosmiconfig } from 'cosmiconfig';
4
+
5
+ import FileCache from './utils/FileCache.mjs';
6
+ import { augmentConfigExtended } from './augmentConfig.mjs';
7
+
8
+ const IS_TEST = process.env.NODE_ENV === 'test';
9
+ const STOP_DIR = IS_TEST ? process.cwd() : undefined;
10
+
11
+ /**
12
+ * @type {import('stylelint').PublicApi['_createLinter']}
13
+ */
14
+ export default function createStylelint(options = {}) {
15
+ const cwd = options.cwd || process.cwd();
16
+
17
+ return {
18
+ _options: { ...options, cwd },
19
+
20
+ _extendExplorer: cosmiconfig('', {
21
+ transform: augmentConfigExtended(cwd),
22
+ stopDir: STOP_DIR,
23
+ searchStrategy: 'global', // for backward compatibility
24
+ }),
25
+
26
+ _configExplorer: cosmiconfig('stylelint', {
27
+ stopDir: STOP_DIR,
28
+ searchStrategy: 'global', // for backward compatibility
29
+ }),
30
+
31
+ _specifiedConfigCache: new Map(),
32
+ _augmentedConfigCache: new Map(),
33
+ _postcssResultCache: new Map(),
34
+ _compiledOverridesCache: new Map(),
35
+ _fileCache: new FileCache(options.cacheLocation, options.cacheStrategy, cwd),
36
+ };
37
+ }
@@ -0,0 +1,51 @@
1
+ import { RULE_NAME_ALL } from './constants.mjs';
2
+
3
+ import optionsMatches from './utils/optionsMatches.mjs';
4
+ import reportCommentProblem from './utils/reportCommentProblem.mjs';
5
+ import validateDisableSettings from './validateDisableSettings.mjs';
6
+
7
+ /**
8
+ * @param {import('stylelint').PostcssResult} postcssResult
9
+ * @returns {void}
10
+ */
11
+ export default function descriptionlessDisables(postcssResult) {
12
+ const [enabled, options] = validateDisableSettings(
13
+ postcssResult,
14
+ 'reportDescriptionlessDisables',
15
+ );
16
+
17
+ if (!options) return;
18
+
19
+ /** @type {Set<import('postcss').Node>} */
20
+ const alreadyReported = new Set();
21
+
22
+ for (const [rule, ruleRanges] of Object.entries(postcssResult.stylelint.disabledRanges)) {
23
+ for (const range of ruleRanges) {
24
+ if (range.description) continue;
25
+
26
+ const node = range.node;
27
+
28
+ if (alreadyReported.has(node)) continue;
29
+
30
+ if (enabled === optionsMatches(options, 'except', rule)) {
31
+ // An 'all' rule will get copied for each individual rule. If the
32
+ // configuration is `[false, {except: ['specific-rule']}]`, we
33
+ // don't want to report the copies that match except, so we record
34
+ // the comment as already reported.
35
+ if (!enabled && rule === RULE_NAME_ALL) alreadyReported.add(node);
36
+
37
+ continue;
38
+ }
39
+
40
+ alreadyReported.add(node);
41
+
42
+ reportCommentProblem({
43
+ rule: '--report-descriptionless-disables',
44
+ message: `Disable for "${rule}" is missing a description`,
45
+ severity: options.severity,
46
+ node,
47
+ postcssResult,
48
+ });
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,21 @@
1
+ import { SEVERITY_ERROR, SEVERITY_WARNING } from '../constants.mjs';
2
+
3
+ /**
4
+ * @import {Severity} from 'stylelint'
5
+ *
6
+ * @param {Severity} severity
7
+ * @param {Record<Severity, number>} counts
8
+ * @returns {void}
9
+ */
10
+ export default function calcSeverityCounts(severity, counts) {
11
+ switch (severity) {
12
+ case SEVERITY_ERROR:
13
+ counts.error += 1;
14
+ break;
15
+ case SEVERITY_WARNING:
16
+ counts.warning += 1;
17
+ break;
18
+ default:
19
+ throw new Error(`Unknown severity: "${severity}"`);
20
+ }
21
+ }
@@ -0,0 +1,23 @@
1
+ import preprocessWarnings from './preprocessWarnings.mjs';
2
+
3
+ /**
4
+ * @type {import('stylelint').Formatter}
5
+ */
6
+ export default function compactFormatter(results) {
7
+ const lines = results.flatMap((result) => {
8
+ const { warnings } = preprocessWarnings(result);
9
+
10
+ return warnings.map(
11
+ (warning) =>
12
+ `${result.source}: ` +
13
+ `line ${warning.line}, ` +
14
+ `col ${warning.column}, ` +
15
+ `${warning.severity} - ` +
16
+ `${warning.text}`,
17
+ );
18
+ });
19
+
20
+ lines.push('');
21
+
22
+ return lines.join('\n');
23
+ }
@@ -0,0 +1,23 @@
1
+ /** @type {import('stylelint').PublicApi['formatters']} */
2
+ const formatters = {
3
+ get compact() {
4
+ return import('./compactFormatter.mjs').then((m) => m.default);
5
+ },
6
+ get json() {
7
+ return import('./jsonFormatter.mjs').then((m) => m.default);
8
+ },
9
+ get string() {
10
+ return import('./stringFormatter.mjs').then((m) => m.default);
11
+ },
12
+ get tap() {
13
+ return import('./tapFormatter.mjs').then((m) => m.default);
14
+ },
15
+ get unix() {
16
+ return import('./unixFormatter.mjs').then((m) => m.default);
17
+ },
18
+ get verbose() {
19
+ return import('./verboseFormatter.mjs').then((m) => m.default);
20
+ },
21
+ };
22
+
23
+ export default formatters;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Omit any properties starting with `_`, which are fake-private
3
+ *
4
+ * @type {import('stylelint').Formatter}
5
+ */
6
+ export default function jsonFormatter(results) {
7
+ return JSON.stringify(results, (key, value) => {
8
+ return key[0] === '_' ? undefined : value;
9
+ });
10
+ }
@@ -0,0 +1,74 @@
1
+ import { DEFAULT_SEVERITY, SEVERITY_ERROR } from '../constants.mjs';
2
+
3
+ /** @import {LintResult} from 'stylelint' */
4
+ /** @typedef {LintResult['parseErrors'][0]} ParseError */
5
+ /** @typedef {LintResult['warnings'][0]} Warning */
6
+ /** @typedef {Warning['severity']} Severity */
7
+
8
+ /**
9
+ * Preprocess warnings in a given lint result.
10
+ * Note that this function has a side-effect.
11
+ *
12
+ * @param {LintResult} result
13
+ * @returns {LintResult}
14
+ */
15
+ export default function preprocessWarnings(result) {
16
+ for (const error of result.parseErrors || []) {
17
+ result.warnings.push(parseErrorToWarning(error));
18
+ }
19
+
20
+ for (const warning of result.warnings) {
21
+ warning.severity = normalizeSeverity(warning);
22
+ }
23
+
24
+ result.warnings.sort(byLocationOrder);
25
+
26
+ return result;
27
+ }
28
+
29
+ /**
30
+ * @param {ParseError} error
31
+ * @returns {Warning}
32
+ */
33
+ function parseErrorToWarning(error) {
34
+ return {
35
+ line: error.line,
36
+ column: error.column,
37
+ rule: error.stylelintType,
38
+ severity: SEVERITY_ERROR,
39
+ text: `${error.text} (${error.stylelintType})`,
40
+ };
41
+ }
42
+
43
+ /**
44
+ * @param {Warning} warning
45
+ * @returns {Severity}
46
+ */
47
+ function normalizeSeverity(warning) {
48
+ // NOTE: Plugins may add a warning without severity, for example,
49
+ // by directly using the PostCSS `Result#warn()` API.
50
+ return warning.severity || DEFAULT_SEVERITY;
51
+ }
52
+
53
+ /**
54
+ * @param {Warning} a
55
+ * @param {Warning} b
56
+ * @returns {number}
57
+ */
58
+ function byLocationOrder(a, b) {
59
+ // positionless first
60
+ if (!a.line && b.line) return -1;
61
+
62
+ // positionless first
63
+ if (a.line && !b.line) return 1;
64
+
65
+ if (a.line < b.line) return -1;
66
+
67
+ if (a.line > b.line) return 1;
68
+
69
+ if (a.column < b.column) return -1;
70
+
71
+ if (a.column > b.column) return 1;
72
+
73
+ return 0;
74
+ }
@@ -0,0 +1,308 @@
1
+ import { relative, sep } from 'node:path';
2
+ import process from 'node:process';
3
+
4
+ import { getBorderCharacters, table } from 'table';
5
+ import picocolors from 'picocolors';
6
+ import stringWidth from 'string-width';
7
+
8
+ import { assertNumber } from '../utils/validateTypes.mjs';
9
+ import calcSeverityCounts from './calcSeverityCounts.mjs';
10
+ import isUnicodeSupported from '../utils/isUnicodeSupported.mjs';
11
+ import pluralize from '../utils/pluralize.mjs';
12
+ import preprocessWarnings from './preprocessWarnings.mjs';
13
+ import terminalLink from './terminalLink.mjs';
14
+
15
+ const { yellow, dim, underline, blue, red, green } = picocolors;
16
+
17
+ const NON_ASCII_PATTERN = /\P{ASCII}/u;
18
+ const MARGIN_WIDTHS = 9;
19
+
20
+ /**
21
+ * @param {string} s
22
+ * @returns {string}
23
+ */
24
+ function identity(s) {
25
+ return s;
26
+ }
27
+
28
+ const levelColors = {
29
+ info: blue,
30
+ warning: yellow,
31
+ error: red,
32
+ success: identity,
33
+ };
34
+
35
+ const supportsUnicode = isUnicodeSupported();
36
+
37
+ const symbols = {
38
+ info: blue(supportsUnicode ? 'ℹ' : 'i'),
39
+ warning: yellow(supportsUnicode ? '⚠' : '‼'),
40
+ error: red(supportsUnicode ? '✖' : '×'),
41
+ success: green(supportsUnicode ? '✔' : '√'),
42
+ };
43
+
44
+ /**
45
+ * @param {import('stylelint').LintResult[]} results
46
+ * @returns {string}
47
+ */
48
+ function deprecationsFormatter(results) {
49
+ const allDeprecationWarnings = results.flatMap((result) => result.deprecations || []);
50
+
51
+ if (allDeprecationWarnings.length === 0) {
52
+ return '';
53
+ }
54
+
55
+ const seenText = new Set();
56
+ const lines = [];
57
+
58
+ for (const { text, reference } of allDeprecationWarnings) {
59
+ if (seenText.has(text)) continue;
60
+
61
+ seenText.add(text);
62
+
63
+ let line = ` ${dim('-')} ${text}`;
64
+
65
+ if (reference) {
66
+ line += dim(` See: ${underline(reference)}`);
67
+ }
68
+
69
+ lines.push(line);
70
+ }
71
+
72
+ return ['', yellow('Deprecation warnings:'), ...lines, ''].join('\n');
73
+ }
74
+
75
+ /**
76
+ * @param {import('stylelint').LintResult[]} results
77
+ * @returns {string}
78
+ */
79
+ function invalidOptionsFormatter(results) {
80
+ const allInvalidOptionWarnings = results.flatMap((result) =>
81
+ (result.invalidOptionWarnings || []).map((warning) => warning.text),
82
+ );
83
+ const uniqueInvalidOptionWarnings = [...new Set(allInvalidOptionWarnings)];
84
+
85
+ return uniqueInvalidOptionWarnings.reduce((output, warning) => {
86
+ output += red('Invalid Option: ');
87
+ output += warning;
88
+
89
+ return `${output}\n`;
90
+ }, '\n');
91
+ }
92
+
93
+ /**
94
+ * @param {string} fromValue
95
+ * @param {string} cwd
96
+ * @returns {string}
97
+ */
98
+ function logFrom(fromValue, cwd) {
99
+ if (fromValue.startsWith('<')) {
100
+ return underline(fromValue);
101
+ }
102
+
103
+ const filePath = relative(cwd, fromValue).split(sep).join('/');
104
+
105
+ return terminalLink(filePath, `file://${fromValue}`);
106
+ }
107
+
108
+ /**
109
+ * @param {{[k: number]: number}} columnWidths
110
+ * @returns {number}
111
+ */
112
+ function getMessageWidth(columnWidths) {
113
+ const width = columnWidths[3];
114
+
115
+ assertNumber(width);
116
+
117
+ if (!process.stdout.isTTY) {
118
+ return width;
119
+ }
120
+
121
+ const availableWidth = process.stdout.columns < 80 ? 80 : process.stdout.columns;
122
+ const fullWidth = Object.values(columnWidths).reduce((a, b) => a + b);
123
+
124
+ // If there is no reason to wrap the text, we won't align the last column to the right
125
+ if (availableWidth > fullWidth + MARGIN_WIDTHS) {
126
+ return width;
127
+ }
128
+
129
+ return availableWidth - (fullWidth - width + MARGIN_WIDTHS);
130
+ }
131
+
132
+ /**
133
+ * @param {import('stylelint').Warning[]} messages
134
+ * @param {string} source
135
+ * @param {string} cwd
136
+ * @returns {string}
137
+ */
138
+ function formatter(messages, source, cwd) {
139
+ if (messages.length === 0) return '';
140
+
141
+ /**
142
+ * Create a list of column widths, needed to calculate
143
+ * the size of the message column and if needed wrap it.
144
+ * @type {{[k: string]: number}}
145
+ */
146
+ const columnWidths = { 0: 1, 1: 1, 2: 1, 3: 1, 4: 1 };
147
+
148
+ /**
149
+ * @param {[string, string, string, string, string]} columns
150
+ * @returns {[string, string, string, string, string]}
151
+ */
152
+ function calculateWidths(columns) {
153
+ for (const [key, value] of Object.entries(columns)) {
154
+ const normalisedValue = value ? value.toString() : value;
155
+ const width = columnWidths[key];
156
+
157
+ assertNumber(width);
158
+ columnWidths[key] = Math.max(width, stringWidth(normalisedValue));
159
+ }
160
+
161
+ return columns;
162
+ }
163
+
164
+ let output = '\n';
165
+
166
+ if (source) {
167
+ output += `${logFrom(source, cwd)}\n`;
168
+ }
169
+
170
+ /**
171
+ * @param {import('stylelint').Warning} message
172
+ * @returns {string}
173
+ */
174
+ function formatMessageText(message) {
175
+ let result = message.text;
176
+
177
+ result = result
178
+ // Remove all control characters (newline, tab and etc)
179
+ .replace(/[\u0001-\u001A]+/g, ' ') // eslint-disable-line no-control-regex
180
+ .replace(/\.$/, '');
181
+
182
+ const ruleString = ` (${message.rule})`;
183
+
184
+ if (result.endsWith(ruleString)) {
185
+ result = result.slice(0, result.lastIndexOf(ruleString));
186
+ }
187
+
188
+ return result;
189
+ }
190
+
191
+ const cleanedMessages = messages.map((message) => {
192
+ const { line, column, severity } = message;
193
+ /**
194
+ * @type {[string, string, string, string, string]}
195
+ */
196
+ const row = [
197
+ line ? line.toString() : '',
198
+ column ? column.toString() : '',
199
+ symbols[severity] ? levelColors[severity](symbols[severity]) : severity,
200
+ formatMessageText(message),
201
+ dim(message.rule || ''),
202
+ ];
203
+
204
+ calculateWidths(row);
205
+
206
+ return row;
207
+ });
208
+
209
+ const messageWidth = getMessageWidth(columnWidths);
210
+ const hasNonAsciiChar = messages.some((msg) => NON_ASCII_PATTERN.test(msg.text));
211
+
212
+ output += table(cleanedMessages, {
213
+ border: getBorderCharacters('void'),
214
+ columns: {
215
+ 0: { alignment: 'right', width: columnWidths[0], paddingRight: 0, paddingLeft: 2 },
216
+ 1: { alignment: 'left', width: columnWidths[1] },
217
+ 2: { alignment: 'center', width: columnWidths[2] },
218
+ 3: {
219
+ alignment: 'left',
220
+ width: messageWidth,
221
+ wrapWord: messageWidth > 1 && !hasNonAsciiChar,
222
+ },
223
+ 4: { alignment: 'left', width: columnWidths[4], paddingRight: 0 },
224
+ },
225
+ drawHorizontalLine: () => false,
226
+ })
227
+ .split('\n')
228
+ .map((el) => el.replace(/(\d+)\s+(\d+)/, (_m, p1, p2) => dim(`${p1}:${p2}`)).trimEnd())
229
+ .join('\n');
230
+
231
+ return output;
232
+ }
233
+
234
+ /**
235
+ * @type {import('stylelint').Formatter}
236
+ */
237
+ export default function stringFormatter(results, returnValue) {
238
+ let output = invalidOptionsFormatter(results);
239
+
240
+ output += deprecationsFormatter(results);
241
+
242
+ const resultCounts = { error: 0, warning: 0 };
243
+ const fixableCounts = { error: 0, warning: 0 };
244
+
245
+ output = results.reduce((accum, result) => {
246
+ preprocessWarnings(result);
247
+
248
+ accum += formatter(
249
+ result.warnings,
250
+ result.source || '',
251
+ (returnValue && returnValue.cwd) || process.cwd(),
252
+ );
253
+
254
+ for (const warning of result.warnings) {
255
+ calcSeverityCounts(warning.severity, resultCounts);
256
+ const fixable = returnValue.ruleMetadata?.[warning.rule]?.fixable;
257
+
258
+ if (fixable === true) {
259
+ calcSeverityCounts(warning.severity, fixableCounts);
260
+ }
261
+ }
262
+
263
+ return accum;
264
+ }, output);
265
+
266
+ // Ensure consistent padding
267
+ output = output.trim();
268
+
269
+ if (output !== '') {
270
+ output = `\n${output}\n`;
271
+
272
+ const errorCount = resultCounts.error;
273
+ const warningCount = resultCounts.warning;
274
+ const total = errorCount + warningCount;
275
+
276
+ if (total > 0) {
277
+ const error = red(`${errorCount} ${pluralize('error', errorCount)}`);
278
+ const warning = yellow(`${warningCount} ${pluralize('warning', warningCount)}`);
279
+ const symbol = errorCount > 0 ? symbols.error : symbols.warning;
280
+
281
+ output += `\n${symbol} ${total} ${pluralize('problem', total)} (${error}, ${warning})`;
282
+ }
283
+
284
+ const fixErrorCount = fixableCounts.error;
285
+ const fixWarningCount = fixableCounts.warning;
286
+
287
+ if (fixErrorCount > 0 || fixWarningCount > 0) {
288
+ let fixErrorText;
289
+ let fixWarningText;
290
+
291
+ if (fixErrorCount > 0) {
292
+ fixErrorText = `${fixErrorCount} ${pluralize('error', fixErrorCount)}`;
293
+ }
294
+
295
+ if (fixWarningCount > 0) {
296
+ fixWarningText = `${fixWarningCount} ${pluralize('warning', fixWarningCount)}`;
297
+ }
298
+
299
+ const countText = [fixErrorText, fixWarningText].filter(Boolean).join(' and ');
300
+
301
+ output += `\n ${countText} potentially fixable with the "--fix" option.`;
302
+ }
303
+
304
+ output += '\n\n';
305
+ }
306
+
307
+ return output;
308
+ }