@alexlit/lint-kit 183.7.0 → 184.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/package.json +5 -5
  3. package/packages/config-stylelint/node_modules/ansi-regex/index.d.ts +33 -0
  4. package/packages/config-stylelint/node_modules/ansi-regex/index.js +14 -0
  5. package/packages/config-stylelint/node_modules/ansi-regex/license +9 -0
  6. package/packages/config-stylelint/node_modules/ansi-regex/package.json +61 -0
  7. package/packages/config-stylelint/node_modules/ansi-regex/readme.md +66 -0
  8. package/packages/config-stylelint/node_modules/file-entry-cache/LICENSE +19 -0
  9. package/packages/config-stylelint/node_modules/file-entry-cache/README.md +630 -0
  10. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.cjs +559 -0
  11. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.cts +304 -0
  12. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.ts +304 -0
  13. package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.js +525 -0
  14. package/packages/config-stylelint/node_modules/file-entry-cache/package.json +62 -0
  15. package/packages/config-stylelint/node_modules/flat-cache/LICENSE +19 -0
  16. package/packages/config-stylelint/node_modules/flat-cache/README.md +235 -0
  17. package/packages/config-stylelint/node_modules/flat-cache/dist/index.cjs +495 -0
  18. package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.cts +255 -0
  19. package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.ts +255 -0
  20. package/packages/config-stylelint/node_modules/flat-cache/dist/index.js +455 -0
  21. package/packages/config-stylelint/node_modules/flat-cache/package.json +80 -0
  22. package/packages/config-stylelint/node_modules/globby/ignore.js +337 -0
  23. package/packages/config-stylelint/node_modules/globby/index.d.ts +394 -0
  24. package/packages/config-stylelint/node_modules/globby/index.js +488 -0
  25. package/packages/config-stylelint/node_modules/globby/license +9 -0
  26. package/packages/config-stylelint/node_modules/globby/package.json +94 -0
  27. package/packages/config-stylelint/node_modules/globby/readme.md +388 -0
  28. package/packages/config-stylelint/node_modules/globby/utilities.js +382 -0
  29. package/packages/config-stylelint/node_modules/meow/build/dependencies.js +7347 -0
  30. package/packages/config-stylelint/node_modules/meow/build/index.d.ts +2684 -0
  31. package/packages/config-stylelint/node_modules/meow/build/index.js +185 -0
  32. package/packages/config-stylelint/node_modules/meow/build/licenses.md +1254 -0
  33. package/packages/config-stylelint/node_modules/meow/build/options.js +147 -0
  34. package/packages/config-stylelint/node_modules/meow/build/parser.js +113 -0
  35. package/packages/config-stylelint/node_modules/meow/build/utils.js +7 -0
  36. package/packages/config-stylelint/node_modules/meow/build/validate.js +145 -0
  37. package/packages/config-stylelint/node_modules/meow/license +9 -0
  38. package/packages/config-stylelint/node_modules/meow/package.json +103 -0
  39. package/packages/config-stylelint/node_modules/meow/readme.md +387 -0
  40. package/packages/config-stylelint/node_modules/postcss-safe-parser/LICENSE +20 -0
  41. package/packages/config-stylelint/node_modules/postcss-safe-parser/README.md +25 -0
  42. package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parse.js +12 -0
  43. package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parser.js +100 -0
  44. package/packages/config-stylelint/node_modules/postcss-safe-parser/package.json +36 -0
  45. package/packages/config-stylelint/node_modules/slash/index.d.ts +23 -0
  46. package/packages/config-stylelint/node_modules/slash/index.js +9 -0
  47. package/packages/config-stylelint/node_modules/slash/license +9 -0
  48. package/packages/config-stylelint/node_modules/slash/package.json +39 -0
  49. package/packages/config-stylelint/node_modules/slash/readme.md +36 -0
  50. package/packages/config-stylelint/node_modules/string-width/index.d.ts +39 -0
  51. package/packages/config-stylelint/node_modules/string-width/index.js +119 -0
  52. package/packages/config-stylelint/node_modules/string-width/license +9 -0
  53. package/packages/config-stylelint/node_modules/string-width/package.json +65 -0
  54. package/packages/config-stylelint/node_modules/string-width/readme.md +66 -0
  55. package/packages/config-stylelint/node_modules/strip-ansi/index.d.ts +15 -0
  56. package/packages/config-stylelint/node_modules/strip-ansi/index.js +19 -0
  57. package/packages/config-stylelint/node_modules/strip-ansi/license +9 -0
  58. package/packages/config-stylelint/node_modules/strip-ansi/package.json +59 -0
  59. package/packages/config-stylelint/node_modules/strip-ansi/readme.md +37 -0
  60. package/packages/config-stylelint/node_modules/stylelint/LICENSE +20 -0
  61. package/packages/config-stylelint/node_modules/stylelint/README.md +113 -0
  62. package/packages/config-stylelint/node_modules/stylelint/bin/stylelint.mjs +7 -0
  63. package/packages/config-stylelint/node_modules/stylelint/lib/assignDisabledRanges.mjs +483 -0
  64. package/packages/config-stylelint/node_modules/stylelint/lib/augmentConfig.mjs +586 -0
  65. package/packages/config-stylelint/node_modules/stylelint/lib/cli.mjs +746 -0
  66. package/packages/config-stylelint/node_modules/stylelint/lib/constants.mjs +25 -0
  67. package/packages/config-stylelint/node_modules/stylelint/lib/createPartialStylelintResult.mjs +114 -0
  68. package/packages/config-stylelint/node_modules/stylelint/lib/createPlugin.mjs +9 -0
  69. package/packages/config-stylelint/node_modules/stylelint/lib/createStylelint.mjs +37 -0
  70. package/packages/config-stylelint/node_modules/stylelint/lib/descriptionlessDisables.mjs +51 -0
  71. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/calcSeverityCounts.mjs +21 -0
  72. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/compactFormatter.mjs +23 -0
  73. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/index.mjs +23 -0
  74. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/jsonFormatter.mjs +10 -0
  75. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/preprocessWarnings.mjs +74 -0
  76. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/stringFormatter.mjs +308 -0
  77. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/tapFormatter.mjs +85 -0
  78. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/terminalLink.mjs +21 -0
  79. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/unixFormatter.mjs +32 -0
  80. package/packages/config-stylelint/node_modules/stylelint/lib/formatters/verboseFormatter.mjs +175 -0
  81. package/packages/config-stylelint/node_modules/stylelint/lib/getConfigForFile.mjs +110 -0
  82. package/packages/config-stylelint/node_modules/stylelint/lib/getPostcssResult.mjs +131 -0
  83. package/packages/config-stylelint/node_modules/stylelint/lib/index.mjs +38 -0
  84. package/packages/config-stylelint/node_modules/stylelint/lib/invalidScopeDisables.mjs +41 -0
  85. package/packages/config-stylelint/node_modules/stylelint/lib/isPathIgnored.mjs +48 -0
  86. package/packages/config-stylelint/node_modules/stylelint/lib/lintPostcssResult.mjs +172 -0
  87. package/packages/config-stylelint/node_modules/stylelint/lib/lintSource.mjs +135 -0
  88. package/packages/config-stylelint/node_modules/stylelint/lib/needlessDisables.mjs +91 -0
  89. package/packages/config-stylelint/node_modules/stylelint/lib/normalizeAllRuleSettings.mjs +29 -0
  90. package/packages/config-stylelint/node_modules/stylelint/lib/normalizeRuleSettings.mjs +56 -0
  91. package/packages/config-stylelint/node_modules/stylelint/lib/postcssPlugin.mjs +50 -0
  92. package/packages/config-stylelint/node_modules/stylelint/lib/prepareReturnValue.mjs +68 -0
  93. package/packages/config-stylelint/node_modules/stylelint/lib/printConfig.mjs +44 -0
  94. package/packages/config-stylelint/node_modules/stylelint/lib/reference/atKeywords.mjs +91 -0
  95. package/packages/config-stylelint/node_modules/stylelint/lib/reference/functions.mjs +100 -0
  96. package/packages/config-stylelint/node_modules/stylelint/lib/reference/keywords.mjs +663 -0
  97. package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaFeatures.mjs +115 -0
  98. package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaTypes.mjs +14 -0
  99. package/packages/config-stylelint/node_modules/stylelint/lib/reference/prefixes.mjs +17 -0
  100. package/packages/config-stylelint/node_modules/stylelint/lib/reference/properties.mjs +1111 -0
  101. package/packages/config-stylelint/node_modules/stylelint/lib/reference/selectors.mjs +472 -0
  102. package/packages/config-stylelint/node_modules/stylelint/lib/reference/units.mjs +82 -0
  103. package/packages/config-stylelint/node_modules/stylelint/lib/reportDisables.mjs +48 -0
  104. package/packages/config-stylelint/node_modules/stylelint/lib/reportUnknownRuleNames.mjs +76 -0
  105. package/packages/config-stylelint/node_modules/stylelint/lib/resolveConfig.mjs +43 -0
  106. package/packages/config-stylelint/node_modules/stylelint/lib/rules/alpha-value-notation/index.mjs +207 -0
  107. package/packages/config-stylelint/node_modules/stylelint/lib/rules/annotation-no-unknown/index.mjs +88 -0
  108. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-allowed-list/index.mjs +62 -0
  109. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-no-unknown/index.mjs +108 -0
  110. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-value-no-unknown/index.mjs +64 -0
  111. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-disallowed-list/index.mjs +62 -0
  112. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-empty-line-before/index.mjs +178 -0
  113. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-deprecated/index.mjs +86 -0
  114. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-unknown/index.mjs +80 -0
  115. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-vendor-prefix/index.mjs +82 -0
  116. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-prelude-no-invalid/index.mjs +76 -0
  117. package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-property-required-list/index.mjs +92 -0
  118. package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-empty/index.mjs +116 -0
  119. package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-redundant-nested-style-rules/index.mjs +52 -0
  120. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-alias-notation/index.mjs +87 -0
  121. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-notation/index.mjs +168 -0
  122. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-alpha/index.mjs +75 -0
  123. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-length/index.mjs +128 -0
  124. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/colordUtils.mjs +109 -0
  125. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/index.mjs +183 -0
  126. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-hex/index.mjs +69 -0
  127. package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-invalid-hex/index.mjs +68 -0
  128. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-empty-line-before/index.mjs +131 -0
  129. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-no-empty/index.mjs +50 -0
  130. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-pattern/index.mjs +51 -0
  131. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-whitespace-inside/index.mjs +149 -0
  132. package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-word-disallowed-list/index.mjs +63 -0
  133. package/packages/config-stylelint/node_modules/stylelint/lib/rules/container-name-pattern/index.mjs +107 -0
  134. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-media-pattern/index.mjs +61 -0
  135. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-empty-line-before/index.mjs +156 -0
  136. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-no-missing-var-function/index.mjs +150 -0
  137. package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-pattern/index.mjs +100 -0
  138. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-custom-properties/index.mjs +82 -0
  139. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-properties/index.mjs +301 -0
  140. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/index.mjs +411 -0
  141. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides/index.mjs +74 -0
  142. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-single-line-max-declarations/index.mjs +62 -0
  143. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-empty-line-before/index.mjs +160 -0
  144. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-no-important/index.mjs +51 -0
  145. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-max-values/index.mjs +79 -0
  146. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-allowed-list/index.mjs +108 -0
  147. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-disallowed-list/index.mjs +94 -0
  148. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-allowed-list/index.mjs +66 -0
  149. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-disallowed-list/index.mjs +66 -0
  150. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-keyword-no-deprecated/index.mjs +207 -0
  151. package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-no-unknown/index.mjs +466 -0
  152. package/packages/config-stylelint/node_modules/stylelint/lib/rules/display-notation/index.mjs +225 -0
  153. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-name-quotes/index.mjs +243 -0
  154. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-duplicate-names/index.mjs +122 -0
  155. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-missing-generic-family-keyword/index.mjs +122 -0
  156. package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-weight-notation/index.mjs +221 -0
  157. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-allowed-list/index.mjs +114 -0
  158. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-calc-no-unspaced-operator/index.mjs +589 -0
  159. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-disallowed-list/index.mjs +73 -0
  160. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-linear-gradient-no-nonstandard-direction/index.mjs +145 -0
  161. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-name-case/index.mjs +120 -0
  162. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-no-unknown/index.mjs +83 -0
  163. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-no-scheme-relative/index.mjs +67 -0
  164. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-quotes/index.mjs +230 -0
  165. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-allowed-list/index.mjs +70 -0
  166. package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-disallowed-list/index.mjs +70 -0
  167. package/packages/config-stylelint/node_modules/stylelint/lib/rules/hue-degree-notation/index.mjs +123 -0
  168. package/packages/config-stylelint/node_modules/stylelint/lib/rules/import-notation/index.mjs +104 -0
  169. package/packages/config-stylelint/node_modules/stylelint/lib/rules/index.mjs +180 -0
  170. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-block-no-duplicate-selectors/index.mjs +68 -0
  171. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-declaration-no-important/index.mjs +54 -0
  172. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-selector-notation/index.mjs +202 -0
  173. package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframes-name-pattern/index.mjs +63 -0
  174. package/packages/config-stylelint/node_modules/stylelint/lib/rules/layer-name-pattern/index.mjs +91 -0
  175. package/packages/config-stylelint/node_modules/stylelint/lib/rules/length-zero-no-unit/index.mjs +221 -0
  176. package/packages/config-stylelint/node_modules/stylelint/lib/rules/lightness-notation/index.mjs +165 -0
  177. package/packages/config-stylelint/node_modules/stylelint/lib/rules/max-nesting-depth/index.mjs +195 -0
  178. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-allowed-list/index.mjs +67 -0
  179. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-disallowed-list/index.mjs +67 -0
  180. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-unknown/index.mjs +79 -0
  181. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-vendor-prefix/index.mjs +94 -0
  182. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-unit-allowed-list/index.mjs +110 -0
  183. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-allowed-list/index.mjs +100 -0
  184. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-no-unknown/index.mjs +296 -0
  185. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-range-notation/index.mjs +187 -0
  186. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-query-no-invalid/index.mjs +193 -0
  187. package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-type-no-deprecated/index.mjs +82 -0
  188. package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/index.mjs +117 -0
  189. package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/utils/findNotContiguousOrRectangular.mjs +57 -0
  190. package/packages/config-stylelint/node_modules/stylelint/lib/rules/nesting-selector-no-missing-scoping-root/index.mjs +165 -0
  191. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-descending-specificity/index.mjs +200 -0
  192. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-at-import-rules/index.mjs +156 -0
  193. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-selectors/index.mjs +218 -0
  194. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-empty-source/index.mjs +61 -0
  195. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/index.mjs +77 -0
  196. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-at-import-rule/index.mjs +76 -0
  197. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-declaration/index.mjs +92 -0
  198. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-irregular-whitespace/index.mjs +236 -0
  199. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-animations/index.mjs +71 -0
  200. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-media/index.mjs +77 -0
  201. package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-properties/index.mjs +72 -0
  202. package/packages/config-stylelint/node_modules/stylelint/lib/rules/number-max-precision/index.mjs +209 -0
  203. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-allowed-list/index.mjs +58 -0
  204. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-disallowed-list/index.mjs +58 -0
  205. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-deprecated/index.mjs +143 -0
  206. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-unknown/index.mjs +126 -0
  207. package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-vendor-prefix/index.mjs +100 -0
  208. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-empty-line-before/index.mjs +156 -0
  209. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-nesting-at-rule-required-list/index.mjs +85 -0
  210. package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-selector-property-disallowed-list/index.mjs +119 -0
  211. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-anb-no-unmatchable/index.mjs +121 -0
  212. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-name-disallowed-list/index.mjs +69 -0
  213. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-allowed-list/index.mjs +70 -0
  214. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-disallowed-list/index.mjs +70 -0
  215. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-quotes/index.mjs +107 -0
  216. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-class-pattern/index.mjs +71 -0
  217. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-allowed-list/index.mjs +81 -0
  218. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-disallowed-list/index.mjs +81 -0
  219. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-disallowed-list/index.mjs +115 -0
  220. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-id-pattern/index.mjs +66 -0
  221. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-attribute/index.mjs +92 -0
  222. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-class/index.mjs +75 -0
  223. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-combinators/index.mjs +77 -0
  224. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-compound-selectors/index.mjs +123 -0
  225. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-id/index.mjs +107 -0
  226. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-pseudo-class/index.mjs +85 -0
  227. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-specificity/index.mjs +146 -0
  228. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-type/index.mjs +219 -0
  229. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-universal/index.mjs +95 -0
  230. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-nested-pattern/index.mjs +95 -0
  231. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-qualifying-type/index.mjs +323 -0
  232. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-vendor-prefix/index.mjs +92 -0
  233. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-not-notation/index.mjs +217 -0
  234. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-allowed-list/index.mjs +84 -0
  235. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-disallowed-list/index.mjs +84 -0
  236. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-no-unknown/index.mjs +179 -0
  237. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-allowed-list/index.mjs +75 -0
  238. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation/index.mjs +93 -0
  239. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-disallowed-list/index.mjs +74 -0
  240. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-no-unknown/index.mjs +91 -0
  241. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-case/index.mjs +118 -0
  242. package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-no-unknown/index.mjs +148 -0
  243. package/packages/config-stylelint/node_modules/stylelint/lib/rules/shorthand-property-no-redundant-values/index.mjs +359 -0
  244. package/packages/config-stylelint/node_modules/stylelint/lib/rules/string-no-newline/index.mjs +120 -0
  245. package/packages/config-stylelint/node_modules/stylelint/lib/rules/syntax-string-no-invalid/index.mjs +80 -0
  246. package/packages/config-stylelint/node_modules/stylelint/lib/rules/time-min-milliseconds/index.mjs +167 -0
  247. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-allowed-list/index.mjs +116 -0
  248. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-disallowed-list/index.mjs +211 -0
  249. package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-no-unknown/index.mjs +222 -0
  250. package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-keyword-case/index.mjs +253 -0
  251. package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-no-vendor-prefix/index.mjs +92 -0
  252. package/packages/config-stylelint/node_modules/stylelint/lib/standalone.mjs +383 -0
  253. package/packages/config-stylelint/node_modules/stylelint/lib/timing.mjs +134 -0
  254. package/packages/config-stylelint/node_modules/stylelint/lib/unscopedDisables.mjs +66 -0
  255. package/packages/config-stylelint/node_modules/stylelint/lib/utils/FileCache.mjs +115 -0
  256. package/packages/config-stylelint/node_modules/stylelint/lib/utils/addEmptyLineBefore.mjs +21 -0
  257. package/packages/config-stylelint/node_modules/stylelint/lib/utils/addSemicolonForEditInfo.mjs +35 -0
  258. package/packages/config-stylelint/node_modules/stylelint/lib/utils/appendRuleName.mjs +13 -0
  259. package/packages/config-stylelint/node_modules/stylelint/lib/utils/arrayEqual.mjs +14 -0
  260. package/packages/config-stylelint/node_modules/stylelint/lib/utils/beforeBlockString.mjs +28 -0
  261. package/packages/config-stylelint/node_modules/stylelint/lib/utils/blockString.mjs +19 -0
  262. package/packages/config-stylelint/node_modules/stylelint/lib/utils/blurInterpolation.mjs +8 -0
  263. package/packages/config-stylelint/node_modules/stylelint/lib/utils/cachedImport.mjs +68 -0
  264. package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkAgainstRule.mjs +71 -0
  265. package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkInvalidCLIOptions.mjs +105 -0
  266. package/packages/config-stylelint/node_modules/stylelint/lib/utils/configurationComment.mjs +74 -0
  267. package/packages/config-stylelint/node_modules/stylelint/lib/utils/containsString.mjs +52 -0
  268. package/packages/config-stylelint/node_modules/stylelint/lib/utils/createMapWithSet.mjs +19 -0
  269. package/packages/config-stylelint/node_modules/stylelint/lib/utils/dynamicImport.mjs +13 -0
  270. package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachDeclarationBlock.mjs +59 -0
  271. package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachNodeUpToRoot.mjs +22 -0
  272. package/packages/config-stylelint/node_modules/stylelint/lib/utils/emitWarning.mjs +84 -0
  273. package/packages/config-stylelint/node_modules/stylelint/lib/utils/errors.mjs +55 -0
  274. package/packages/config-stylelint/node_modules/stylelint/lib/utils/filterFilePaths.mjs +17 -0
  275. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAnimationName.mjs +74 -0
  276. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAtRuleContext.mjs +27 -0
  277. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findFontFamily.mjs +148 -0
  278. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findMediaFeatureNames.mjs +151 -0
  279. package/packages/config-stylelint/node_modules/stylelint/lib/utils/findNodeUpToRoot.mjs +25 -0
  280. package/packages/config-stylelint/node_modules/stylelint/lib/utils/fixEmptyLinesBefore.mjs +26 -0
  281. package/packages/config-stylelint/node_modules/stylelint/lib/utils/functionArgumentsSearch.mjs +65 -0
  282. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getAtRuleParams.mjs +7 -0
  283. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDeclarationValue.mjs +9 -0
  284. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDimension.mjs +62 -0
  285. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFileIgnorer.mjs +41 -0
  286. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatter.mjs +43 -0
  287. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatterOptionsText.mjs +12 -0
  288. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getImportantPosition.mjs +15 -0
  289. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getLexer.mjs +54 -0
  290. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getModulePath.mjs +35 -0
  291. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getNextNonSharedLineCommentNode.mjs +34 -0
  292. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getPreviousNonSharedLineCommentNode.mjs +36 -0
  293. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRelativePath.mjs +12 -0
  294. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRuleSelector.mjs +9 -0
  295. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSchemeFromUrl.mjs +36 -0
  296. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSelectorSourceIndex.mjs +12 -0
  297. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStrippedSelectorSource.mjs +47 -0
  298. package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStylelintRule.mjs +22 -0
  299. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasBlock.mjs +9 -0
  300. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasEmptyLine.mjs +13 -0
  301. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasInterpolation.mjs +24 -0
  302. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasLessInterpolation.mjs +11 -0
  303. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasPsvInterpolation.mjs +11 -0
  304. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasScssInterpolation.mjs +11 -0
  305. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasTplInterpolation.mjs +11 -0
  306. package/packages/config-stylelint/node_modules/stylelint/lib/utils/hash.mjs +14 -0
  307. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterBlock.mjs +15 -0
  308. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterComment.mjs +15 -0
  309. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterSingleLineComment.mjs +19 -0
  310. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterStandardPropertyDeclaration.mjs +19 -0
  311. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAutoprefixable.mjs +364 -0
  312. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterBlocklessAtRule.mjs +21 -0
  313. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterSameNameBlocklessAtRule.mjs +21 -0
  314. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isContextFunctionalPseudoClass.mjs +24 -0
  315. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterIncrementCustomIdentValue.mjs +19 -0
  316. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterResetCustomIdentValue.mjs +19 -0
  317. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomElement.mjs +34 -0
  318. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomFunction.mjs +9 -0
  319. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomMediaQuery.mjs +8 -0
  320. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomProperty.mjs +8 -0
  321. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomSelector.mjs +9 -0
  322. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isDescriptorDeclaration.mjs +22 -0
  323. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNested.mjs +83 -0
  324. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNodeOfRoot.mjs +17 -0
  325. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isHexColor.mjs +9 -0
  326. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isInDocument.mjs +32 -0
  327. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeRule.mjs +17 -0
  328. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeSelector.mjs +29 -0
  329. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isMathFunction.mjs +11 -0
  330. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNonNegativeInteger.mjs +6 -0
  331. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNumbery.mjs +9 -0
  332. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isOnlyWhitespace.mjs +17 -0
  333. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isPathNotFoundError.mjs +9 -0
  334. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isScssVariable.mjs +19 -0
  335. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSharedLineComment.mjs +53 -0
  336. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSingleLineString.mjs +10 -0
  337. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.mjs +32 -0
  338. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxColorFunction.mjs +24 -0
  339. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxCombinator.mjs +32 -0
  340. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxComment.mjs +13 -0
  341. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxDeclaration.mjs +57 -0
  342. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxFunction.mjs +28 -0
  343. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxHexColor.mjs +14 -0
  344. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxKeyframesName.mjs +15 -0
  345. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxProperty.mjs +32 -0
  346. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxRule.mjs +24 -0
  347. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxSelector.mjs +56 -0
  348. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxTypeSelector.mjs +56 -0
  349. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxUrl.mjs +49 -0
  350. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxValue.mjs +51 -0
  351. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeRangeDescriptor.mjs +24 -0
  352. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeSupported.mjs +26 -0
  353. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUrlFunction.mjs +9 -0
  354. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidFontSize.mjs +38 -0
  355. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidHex.mjs +11 -0
  356. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidIdentifier.mjs +39 -0
  357. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVarFunction.mjs +9 -0
  358. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVariable.mjs +9 -0
  359. package/packages/config-stylelint/node_modules/stylelint/lib/utils/isWhitespace.mjs +9 -0
  360. package/packages/config-stylelint/node_modules/stylelint/lib/utils/matchesStringOrRegExp.mjs +97 -0
  361. package/packages/config-stylelint/node_modules/stylelint/lib/utils/mergeSyntaxDefinitions.mjs +160 -0
  362. package/packages/config-stylelint/node_modules/stylelint/lib/utils/narrowFixRange.mjs +68 -0
  363. package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeContextLookup.mjs +41 -0
  364. package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeFieldIndices.mjs +119 -0
  365. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFilePath.mjs +26 -0
  366. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFixMode.mjs +22 -0
  367. package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeSelector.mjs +231 -0
  368. package/packages/config-stylelint/node_modules/stylelint/lib/utils/optionsMatches.mjs +20 -0
  369. package/packages/config-stylelint/node_modules/stylelint/lib/utils/optionsMatchesEntry.mjs +29 -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 +209 -0
  401. package/packages/config-stylelint/node_modules/stylelint/types/stylelint/index.d.ts +1595 -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 +3 -3
@@ -0,0 +1,1595 @@
1
+ import type * as PostCSS from 'postcss';
2
+ import type { Options as GlobbyOptions } from 'globby';
3
+ import type { cosmiconfig, TransformSync as CosmiconfigTransformSync } from 'cosmiconfig';
4
+
5
+ type ConfigExtends = string | string[];
6
+
7
+ type ConfigPlugins = string | stylelint.Plugin | (string | stylelint.Plugin)[];
8
+
9
+ type ConfigIgnoreFiles = string | string[];
10
+
11
+ type ConfigRules = {
12
+ [ruleName: string]: stylelint.ConfigRuleSettings<any, Object>;
13
+ };
14
+
15
+ type ConfigOverride = Omit<stylelint.Config, 'overrides'> & {
16
+ files: string | string[];
17
+ name?: string;
18
+ };
19
+
20
+ type ConfigProcessors = string[];
21
+
22
+ type DisableSettings = stylelint.ConfigRuleSettings<boolean, stylelint.DisableOptions>;
23
+
24
+ // A meta-type that returns a union over all properties of `T` whose values
25
+ // have type `U`.
26
+ // see sindresorhus/type-fest#630
27
+ type PropertyNamesOfType<T, U> = {
28
+ [K in keyof T]-?: T[K] extends U ? K : never;
29
+ }[keyof T];
30
+
31
+ type FileCache = {
32
+ calcHashOfConfig: (config: stylelint.Config) => void;
33
+ hasFileChanged: (absoluteFilepath: string) => boolean;
34
+ reconcile: () => void;
35
+ destroy: () => void;
36
+ removeEntry: (absoluteFilepath: string) => void;
37
+ };
38
+
39
+ type RuleFuncArgs = (string | RegExp | number | boolean | (string | RegExp)[])[];
40
+
41
+ // Note: With strict function types enabled, function signatures are checked contravariantly.
42
+ // This means that it would not be possible for rule authors to narrow the message function
43
+ // parameters to e.g. just `string`. Declaring the type for rule message functions through
44
+ // method declarations tricks TypeScript into bivariant signature checking. More details can
45
+ // be found here: https://stackoverflow.com/questions/52667959/what-is-the-purpose-of-bivariancehack-in-typescript-types.
46
+ // and in the original discussion: https://github.com/stylelint/stylelint/pull/6147#issuecomment-1155337016.
47
+ type RuleMessageFunc = {
48
+ bivariance(...args: RuleFuncArgs): string;
49
+ }['bivariance'];
50
+
51
+ type RuleSeverityFunc = {
52
+ bivariance(...args: RuleFuncArgs): stylelint.Severity | null;
53
+ }['bivariance'];
54
+
55
+ type RuleOptionsPossibleFunc = (value: unknown) => boolean;
56
+
57
+ type DisableReportEntry = {
58
+ source?: string;
59
+ ranges: stylelint.DisableReportRange[];
60
+ };
61
+
62
+ declare namespace stylelint {
63
+ /**
64
+ * Rule severity.
65
+ */
66
+ export type Severity = 'warning' | 'error';
67
+
68
+ /**
69
+ * A Stylelint plugin.
70
+ */
71
+ export type Plugin =
72
+ | { default?: { ruleName: string; rule: Rule } }
73
+ | { ruleName: string; rule: Rule };
74
+
75
+ /** @internal */
76
+ export type ConfigRuleSettings<T, O extends Object> =
77
+ | null
78
+ | undefined
79
+ | NonNullable<T>
80
+ | [NonNullable<T>]
81
+ | [NonNullable<T>, O];
82
+
83
+ /** @internal */
84
+ export type DisableOptions = {
85
+ except?: Array<StringOrRegex>;
86
+ severity?: Severity;
87
+ };
88
+
89
+ type LanguageOptions = {
90
+ syntax?: {
91
+ atRules?: Record<
92
+ string,
93
+ {
94
+ comment?: string;
95
+ prelude?: string;
96
+ descriptors?: Record<string, string>;
97
+ }
98
+ >;
99
+ cssWideKeywords?: string[];
100
+ properties?: Record<string, string>;
101
+ types?: Record<string, string>;
102
+ units?: Record<string, string[]>;
103
+ };
104
+ };
105
+
106
+ /**
107
+ * Configuration.
108
+ */
109
+ export type Config = {
110
+ /**
111
+ * Allows to extend an existing configuration. Configurations can bundle plugins, custom syntaxes,
112
+ * options, and configure rules. They can also extend other configurations
113
+ *
114
+ * @see [extends](https://stylelint.io/user-guide/configure/#extends)
115
+ */
116
+ extends?: ConfigExtends;
117
+ /**
118
+ * Custom rules or sets of custom rules built to support methodologies, toolsets,
119
+ * non-standard CSS features, or very specific use cases
120
+ *
121
+ * @see [plugins](https://stylelint.io/user-guide/configure/#plugins)
122
+ */
123
+ plugins?: ConfigPlugins;
124
+ pluginFunctions?: {
125
+ [pluginName: string]: Rule;
126
+ };
127
+ /**
128
+ * A glob or array of globs to ignore specific files
129
+ *
130
+ * @default 'node_modules'
131
+ *
132
+ * @see [ignoreFiles](https://stylelint.io/user-guide/configure/#ignorefiles)
133
+ */
134
+ ignoreFiles?: ConfigIgnoreFiles;
135
+ ignorePatterns?: string;
136
+ /**
137
+ * An object containing the configured rules
138
+ *
139
+ * @see [rules](https://stylelint.io/user-guide/configure/#rules)
140
+ */
141
+ rules?: ConfigRules;
142
+ /**
143
+ * Only register problems for rules with an "error"-level severity (ignore "warning"-level)
144
+ *
145
+ * @see [quiet](https://stylelint.io/user-guide/options/#quiet)
146
+ */
147
+ quiet?: boolean;
148
+ /**
149
+ * A string to specify the name of a formatter or a path to a custom formatter function
150
+ *
151
+ * @see [formatter](https://stylelint.io/user-guide/configure#formatter)
152
+ */
153
+ formatter?: FormatterType | Formatter;
154
+ /**
155
+ * A string to set the default severity level for all rules that do not have a severity
156
+ * specified in their secondary options
157
+ *
158
+ * @see [defaultSeverity](https://stylelint.io/user-guide/configure#defaultseverity)
159
+ */
160
+ defaultSeverity?: Severity;
161
+ /**
162
+ * A boolean value indicating if 'stylelint-disable' comments will be ignored
163
+ *
164
+ * @see [ignoreDisables](https://stylelint.io/user-guide/configure#ignoredisables)
165
+ */
166
+ ignoreDisables?: boolean;
167
+ /**
168
+ * Report configuration comments that don't match any lints that need to be disabled
169
+ *
170
+ * @see [reportNeedlessDisables](https://stylelint.io/user-guide/configure#reportneedlessdisables)
171
+ */
172
+ reportNeedlessDisables?: DisableSettings;
173
+ /**
174
+ * Report configuration comments that don't match rules that are specified in the configuration object
175
+ *
176
+ * @see [reportInvalidScopeDisables](https://stylelint.io/user-guide/configure#reportinvalidscopedisables)
177
+ */
178
+ reportInvalidScopeDisables?: DisableSettings;
179
+ /**
180
+ * Report configuration comments without a description
181
+ *
182
+ * @see [reportDescriptionlessDisables](https://stylelint.io/user-guide/configure#reportdescriptionlessdisables)
183
+ */
184
+ reportDescriptionlessDisables?: DisableSettings;
185
+ /**
186
+ * Report configuration comments that are not scoped to at least one rule
187
+ *
188
+ * @see [reportUnscopedDisables](https://stylelint.io/user-guide/configure#reportunscopeddisables)
189
+ */
190
+ reportUnscopedDisables?: DisableSettings;
191
+ /**
192
+ * A string to set what configuration comments like 'stylelint-disable' start with.
193
+ * Сan be useful when using multiple instances of Stylelint with different configurations.
194
+ *
195
+ * @see [configurationComment](https://stylelint.io/user-guide/configure#configurationcomment)
196
+ */
197
+ configurationComment?: string;
198
+ /**
199
+ * An array of objects to specify what subset of files to apply a configuration to
200
+ *
201
+ * @see [overrides](https://stylelint.io/user-guide/configure#overrides)
202
+ */
203
+ overrides?: ConfigOverride[];
204
+ /**
205
+ * Allows to specify a custom syntax to use in code
206
+ *
207
+ * @see [customSyntax](https://stylelint.io/user-guide/configure#customsyntax)
208
+ */
209
+ customSyntax?: CustomSyntax;
210
+ /**
211
+ * Functions that allow to hook into Stylelint's pipeline
212
+ *
213
+ * @experimental
214
+ *
215
+ * @see [processors](https://stylelint.io/user-guide/configure#processors)
216
+ */
217
+ processors?: ConfigProcessors;
218
+ languageOptions?: LanguageOptions;
219
+ /** @internal */
220
+ _processorFunctions?: Map<string, ReturnType<Processor>['postprocess']>;
221
+ /**
222
+ * If true, Stylelint does not throw an error when the glob pattern matches no files.
223
+ *
224
+ * Should not be overridden on a per-file basis
225
+ *
226
+ * @see [allowEmptyInput](https://stylelint.io/user-guide/configure#allowemptyinput)
227
+ */
228
+ allowEmptyInput?: boolean;
229
+ /**
230
+ * If true, store the results of processed files so that Stylelint only operates on the changed ones.
231
+ *
232
+ * Should not be overridden on a per-file basis
233
+ *
234
+ * @see [cache](https://stylelint.io/user-guide/configure#cache)
235
+ */
236
+ cache?: boolean;
237
+ /**
238
+ * If true, automatically fix, where possible, problems reported by rules.
239
+ *
240
+ * Should not be overridden on a per-file basis
241
+ *
242
+ * @see [fix](https://stylelint.io/user-guide/configure#fix)
243
+ */
244
+ fix?: boolean;
245
+ computeEditInfo?: boolean;
246
+ /**
247
+ * Force enable/disable the validation of the rules' options
248
+ *
249
+ * @default true
250
+ *
251
+ * @see [validate](https://stylelint.io/user-guide/options/#validate)
252
+ */
253
+ validate?: boolean;
254
+ };
255
+
256
+ /** @internal */
257
+ export type DisablePropertyName = PropertyNamesOfType<Config, DisableSettings>;
258
+
259
+ /** @internal */
260
+ export type CosmiconfigResult =
261
+ | (ReturnType<CosmiconfigTransformSync> & { config: Config })
262
+ | null;
263
+
264
+ /** @internal */
265
+ export type DisabledRange = {
266
+ node: PostCSS.Node;
267
+ start: number;
268
+ strictStart: boolean;
269
+ end?: number;
270
+ strictEnd?: boolean;
271
+ rules?: string[];
272
+ description?: string;
273
+ };
274
+
275
+ /** @internal */
276
+ export type DisabledRangeObject = {
277
+ [ruleName: string]: DisabledRange[];
278
+ };
279
+
280
+ /** @internal */
281
+ export type DisabledWarning = { line: number; rule: string };
282
+
283
+ /** @internal */
284
+ export type StylelintPostcssResult = {
285
+ ruleSeverities: { [ruleName: string]: RuleSeverity };
286
+ customMessages: { [ruleName: string]: RuleMessage };
287
+ customUrls: { [ruleName: string]: string };
288
+ ruleMetadata: { [ruleName: string]: Partial<RuleMeta> };
289
+ rangesOfComputedEditInfos: Array<EditInfo['range']>;
290
+ fixersData: { [ruleName: string]: number };
291
+ quiet?: boolean;
292
+ quietDeprecationWarnings?: boolean;
293
+ disabledRanges: DisabledRangeObject;
294
+ disabledWarnings?: DisabledWarning[];
295
+ ignored?: boolean;
296
+ stylelintError?: boolean;
297
+ stylelintWarning?: boolean;
298
+ config?: Config;
299
+
300
+ // NOTE: The type indeed is `CSSTreeLexer` from `css-tree`, but we don't want
301
+ // to add `@types/css-tree` as a runtime dependency. Ref #9131.
302
+ lexer: unknown;
303
+ };
304
+
305
+ type StylelintWarningType = 'deprecation' | 'invalidOption' | 'parseError';
306
+
307
+ /** @internal */
308
+ export type WarningOptions = PostCSS.WarningOptions & {
309
+ stylelintType?: StylelintWarningType;
310
+ severity?: Severity;
311
+ url?: string;
312
+ rule?: string;
313
+ fix?: EditInfo;
314
+ };
315
+
316
+ /** @internal */
317
+ export type PostcssResult = PostCSS.Result & {
318
+ stylelint: StylelintPostcssResult;
319
+ warn(message: string, options?: WarningOptions): void;
320
+ };
321
+
322
+ /** @internal */
323
+ export type Formatter = (results: LintResult[], returnValue: LinterResult) => string;
324
+
325
+ type Formatters = {
326
+ readonly compact: Promise<Formatter>;
327
+ readonly json: Promise<Formatter>;
328
+ readonly string: Promise<Formatter>;
329
+ readonly tap: Promise<Formatter>;
330
+ readonly unix: Promise<Formatter>;
331
+ readonly verbose: Promise<Formatter>;
332
+ };
333
+
334
+ /** @internal */
335
+ export type FormatterType = keyof Formatters;
336
+
337
+ /** @internal */
338
+ export type CustomSyntax = string | PostCSS.Syntax;
339
+
340
+ /**
341
+ * WARNING: This is an experimental feature. The API may change in the future.
342
+ */
343
+ export type Processor = () => {
344
+ name: string;
345
+ postprocess: (result: LintResult, root?: PostCSS.Root) => void;
346
+ };
347
+
348
+ /** @internal */
349
+ export type RuleMessage = string | RuleMessageFunc;
350
+
351
+ /** @internal */
352
+ export type RuleMessages = { [message: string]: RuleMessage };
353
+
354
+ /** @internal */
355
+ export type RuleOptionsPossible = boolean | number | string | RuleOptionsPossibleFunc;
356
+
357
+ /** @internal */
358
+ export type RuleOptions = {
359
+ actual: unknown;
360
+ possible?:
361
+ | RuleOptionsPossibleFunc
362
+ | RuleOptionsPossible[]
363
+ | Record<string, RuleOptionsPossible[]>;
364
+ optional?: boolean;
365
+ };
366
+
367
+ /** @internal */
368
+ type RuleSeverity = Severity | RuleSeverityFunc;
369
+
370
+ /**
371
+ * A rule context.
372
+ */
373
+ export type RuleContext = {
374
+ configurationComment?: string | undefined;
375
+ fix?: boolean | undefined;
376
+ newline?: string | undefined;
377
+ };
378
+
379
+ /** @internal */
380
+ export type RuleBase<P = any, S = any> = (
381
+ primaryOption: P,
382
+ secondaryOptions: S,
383
+ context: RuleContext,
384
+ ) => (root: PostCSS.Root, result: PostcssResult) => Promise<void> | void;
385
+
386
+ /** @internal */
387
+ export type RuleMeta = {
388
+ url: string;
389
+ deprecated?: boolean;
390
+ fixable?: boolean;
391
+ };
392
+
393
+ /** @internal */
394
+ export type Range = {
395
+ start: Position;
396
+ end: Position;
397
+ };
398
+
399
+ /**
400
+ * A rule.
401
+ */
402
+ export type Rule<P = any, S = any, M = RuleMessages> = RuleBase<P, S> & {
403
+ ruleName: string;
404
+ messages: M;
405
+ primaryOptionArray?: boolean;
406
+ meta?: RuleMeta;
407
+ };
408
+
409
+ type StringOrRegex = string | RegExp;
410
+ type OneOrMany<S> = S | S[];
411
+ type Primary = number | true | OneOrMany<StringOrRegex> | Record<string, any>;
412
+ type Secondary = Record<string, any>;
413
+
414
+ // see sindresorhus/type-fest#821
415
+ type Messages = {
416
+ [key in `expected${string}` | `rejected${string}`]: RuleMessage;
417
+ };
418
+
419
+ type ExpectedMessage<T extends unknown[]> = { expected: (...args: T) => string };
420
+ type RejectedMessage<T extends unknown[]> = { rejected: (...args: T) => string };
421
+ type AutofixMessage = ExpectedMessage<[actual: string, expected: string]>;
422
+ type PatternMessage = ExpectedMessage<[input: string, pattern: StringOrRegex]>;
423
+ type MaximumMessage = ExpectedMessage<[selector: string, maximum: number]>;
424
+
425
+ type CoreRule<
426
+ P extends Primary,
427
+ S extends Secondary = Secondary,
428
+ M extends Messages = Messages,
429
+ > = Rule<P, S, M>;
430
+ type NotationRule<P extends string, S extends object = {}> = CoreRule<
431
+ P,
432
+ S,
433
+ ExpectedMessage<[primary: P]>
434
+ >;
435
+ type PatternRule<S extends object = {}> = CoreRule<StringOrRegex, S, PatternMessage>;
436
+ type MaxRule<S extends object = {}> = CoreRule<number, S, MaximumMessage>;
437
+
438
+ /** @internal */
439
+ export type CoreRules = {
440
+ 'alpha-value-notation': CoreRule<
441
+ 'number' | 'percentage',
442
+ { exceptProperties: OneOrMany<StringOrRegex> },
443
+ AutofixMessage
444
+ >;
445
+ 'annotation-no-unknown': CoreRule<
446
+ true,
447
+ { ignoreAnnotations: OneOrMany<StringOrRegex> },
448
+ RejectedMessage<[annotation: string]>
449
+ >;
450
+ 'at-rule-allowed-list': CoreRule<
451
+ OneOrMany<StringOrRegex>,
452
+ {},
453
+ RejectedMessage<[atRule: string]>
454
+ >;
455
+ 'at-rule-descriptor-no-unknown': CoreRule<
456
+ true,
457
+ {},
458
+ RejectedMessage<[atRule: string, descriptor: string]>
459
+ >;
460
+ 'at-rule-descriptor-value-no-unknown': CoreRule<
461
+ true,
462
+ {},
463
+ RejectedMessage<[descriptor: string, value: string]>
464
+ >;
465
+ 'at-rule-disallowed-list': CoreRule<
466
+ OneOrMany<StringOrRegex>,
467
+ {},
468
+ RejectedMessage<[atRule: string]>
469
+ >;
470
+ 'at-rule-empty-line-before': CoreRule<
471
+ 'always' | 'never',
472
+ {
473
+ except: OneOrMany<
474
+ | 'after-same-name'
475
+ | 'inside-block'
476
+ | 'blockless-after-same-name-blockless'
477
+ | 'blockless-after-blockless'
478
+ | 'first-nested'
479
+ >;
480
+ ignore: OneOrMany<
481
+ | 'after-comment'
482
+ | 'first-nested'
483
+ | 'inside-block'
484
+ | 'blockless-after-same-name-blockless'
485
+ | 'blockless-after-blockless'
486
+ >;
487
+ ignoreAtRules: OneOrMany<StringOrRegex>;
488
+ }
489
+ >;
490
+ 'at-rule-no-deprecated': CoreRule<
491
+ true,
492
+ { ignoreAtRules: OneOrMany<StringOrRegex> },
493
+ RejectedMessage<[atRule: string]>
494
+ >;
495
+ 'at-rule-no-unknown': CoreRule<
496
+ true,
497
+ { ignoreAtRules: OneOrMany<StringOrRegex> },
498
+ RejectedMessage<[atRule: string]>
499
+ >;
500
+ 'at-rule-no-vendor-prefix': CoreRule<
501
+ true,
502
+ { ignoreAtRules: OneOrMany<StringOrRegex> },
503
+ RejectedMessage<[property: string]>
504
+ >;
505
+ 'at-rule-prelude-no-invalid': CoreRule<
506
+ true,
507
+ { ignoreAtRules: OneOrMany<StringOrRegex> },
508
+ RejectedMessage<[atRule: string, prelude: string]>
509
+ >;
510
+ 'at-rule-property-required-list': CoreRule<
511
+ Record<string, OneOrMany<string>>,
512
+ {},
513
+ ExpectedMessage<[atRule: string, property: string] | [atRule: string, descriptor: string]>
514
+ >;
515
+ 'block-no-empty': CoreRule<true, { ignore: OneOrMany<'comments'> }>;
516
+ 'block-no-redundant-nested-style-rules': CoreRule<true>;
517
+ 'color-function-alias-notation': CoreRule<'with-alpha' | 'without-alpha', {}, AutofixMessage>;
518
+ 'color-function-notation': CoreRule<
519
+ 'modern' | 'legacy',
520
+ { ignore: OneOrMany<'with-var-inside'> }
521
+ >;
522
+ 'color-hex-alpha': CoreRule<
523
+ 'always' | 'never',
524
+ {},
525
+ ExpectedMessage<[hex: string]> & RejectedMessage<[hex: string]>
526
+ >;
527
+ 'color-hex-length': CoreRule<'short' | 'long', {}, AutofixMessage>;
528
+ 'color-named': CoreRule<
529
+ 'never' | 'always-where-possible',
530
+ { ignoreProperties: OneOrMany<StringOrRegex>; ignore: OneOrMany<'inside-function'> },
531
+ AutofixMessage & RejectedMessage<[keyword: string]>
532
+ >;
533
+ 'color-no-hex': CoreRule<true, {}, RejectedMessage<[hex: string]>>;
534
+ 'color-no-invalid-hex': CoreRule<true, {}, RejectedMessage<[hex: string]>>;
535
+ 'comment-empty-line-before': CoreRule<
536
+ 'always' | 'never',
537
+ {
538
+ except: OneOrMany<'first-nested'>;
539
+ ignore: OneOrMany<'stylelint-commands' | 'after-comment'>;
540
+ ignoreComments: OneOrMany<StringOrRegex>;
541
+ }
542
+ >;
543
+ 'comment-no-empty': CoreRule<true>;
544
+ 'comment-pattern': CoreRule<StringOrRegex, {}, ExpectedMessage<[pattern: StringOrRegex]>>;
545
+ 'comment-whitespace-inside': CoreRule<'always' | 'never'>;
546
+ 'comment-word-disallowed-list': CoreRule<
547
+ OneOrMany<StringOrRegex>,
548
+ {},
549
+ RejectedMessage<[pattern: StringOrRegex]>
550
+ >;
551
+ 'container-name-pattern': PatternRule;
552
+ 'custom-media-pattern': PatternRule;
553
+ 'custom-property-empty-line-before': CoreRule<
554
+ 'always' | 'never',
555
+ {
556
+ except: OneOrMany<
557
+ 'after-block' | 'after-comment' | 'after-custom-property' | 'first-nested'
558
+ >;
559
+ ignore: OneOrMany<
560
+ 'after-comment' | 'after-custom-property' | 'first-nested' | 'inside-single-line-block'
561
+ >;
562
+ }
563
+ >;
564
+ 'custom-property-no-missing-var-function': CoreRule<
565
+ true,
566
+ {},
567
+ RejectedMessage<[property: string]>
568
+ >;
569
+ 'custom-property-pattern': PatternRule;
570
+ 'display-notation': CoreRule<
571
+ 'short' | 'full',
572
+ {},
573
+ ExpectedMessage<[unexpected: string, expected: string]>
574
+ >;
575
+ 'declaration-block-no-duplicate-custom-properties': CoreRule<
576
+ true,
577
+ { ignoreProperties: OneOrMany<StringOrRegex> },
578
+ RejectedMessage<[property: string]>
579
+ >;
580
+ 'declaration-block-no-duplicate-properties': CoreRule<
581
+ true,
582
+ {
583
+ ignore: OneOrMany<
584
+ | 'consecutive-duplicates'
585
+ | 'consecutive-duplicates-with-different-values'
586
+ | 'consecutive-duplicates-with-different-syntaxes'
587
+ | 'consecutive-duplicates-with-same-prefixless-values'
588
+ >;
589
+ ignoreProperties: OneOrMany<StringOrRegex>;
590
+ },
591
+ RejectedMessage<[property: string]>
592
+ >;
593
+ 'rule-nesting-at-rule-required-list': CoreRule<
594
+ OneOrMany<StringOrRegex>,
595
+ {},
596
+ ExpectedMessage<[patterns: StringOrRegex[]]>
597
+ >;
598
+ 'declaration-block-no-redundant-longhand-properties': CoreRule<
599
+ true,
600
+ {
601
+ ignoreShorthands: OneOrMany<StringOrRegex>;
602
+ ignoreLonghands: OneOrMany<string>;
603
+ },
604
+ ExpectedMessage<[property: string]>
605
+ >;
606
+ 'declaration-block-no-shorthand-property-overrides': CoreRule<
607
+ true,
608
+ {},
609
+ RejectedMessage<[shorthand: string, property: string]>
610
+ >;
611
+ 'declaration-block-single-line-max-declarations': CoreRule<
612
+ number,
613
+ {},
614
+ ExpectedMessage<[maximum: number]>
615
+ >;
616
+ 'declaration-empty-line-before': CoreRule<
617
+ 'always' | 'never',
618
+ {
619
+ except: OneOrMany<'first-nested' | 'after-block' | 'after-comment' | 'after-declaration'>;
620
+ ignore: OneOrMany<
621
+ 'after-comment' | 'after-declaration' | 'first-nested' | 'inside-single-line-block'
622
+ >;
623
+ }
624
+ >;
625
+ 'declaration-no-important': CoreRule<true>;
626
+ 'declaration-property-max-values': CoreRule<
627
+ Record<string, number>,
628
+ {},
629
+ ExpectedMessage<[property: string, maximum: number]>
630
+ >;
631
+ 'declaration-property-unit-allowed-list': CoreRule<
632
+ Record<string, OneOrMany<string>>,
633
+ { ignore: OneOrMany<'inside-function'> },
634
+ RejectedMessage<[property: string, unit: string]>
635
+ >;
636
+ 'declaration-property-unit-disallowed-list': CoreRule<
637
+ Record<string, OneOrMany<string>>,
638
+ {},
639
+ RejectedMessage<[property: string, unit: string]>
640
+ >;
641
+ 'declaration-property-value-allowed-list': CoreRule<
642
+ Record<string, OneOrMany<StringOrRegex>>,
643
+ {},
644
+ RejectedMessage<[property: string, value: string]>
645
+ >;
646
+ 'declaration-property-value-disallowed-list': CoreRule<
647
+ Record<string, OneOrMany<StringOrRegex>>,
648
+ {},
649
+ RejectedMessage<[property: string, value: string]>
650
+ >;
651
+ 'declaration-property-value-keyword-no-deprecated': CoreRule<
652
+ true,
653
+ { ignoreKeywords: OneOrMany<StringOrRegex> },
654
+ AutofixMessage & { rejected: (property: string, keyword: string) => string }
655
+ >;
656
+ 'declaration-property-value-no-unknown': CoreRule<
657
+ true,
658
+ {
659
+ ignoreProperties: Record<string, OneOrMany<StringOrRegex>>;
660
+ propertiesSyntax: Record<string, string>;
661
+ typesSyntax: Record<string, string>;
662
+ },
663
+ RejectedMessage<[property: string, value: string]> & {
664
+ rejectedParseError: (property: string, value: string) => string;
665
+ rejectedMath: (property: string, expression: string) => string;
666
+ }
667
+ >;
668
+ 'font-family-name-quotes': CoreRule<
669
+ 'always-where-required' | 'always-where-recommended' | 'always-unless-keyword',
670
+ {},
671
+ ExpectedMessage<[name: string]> & RejectedMessage<[name: string]>
672
+ >;
673
+ 'font-family-no-duplicate-names': CoreRule<
674
+ true,
675
+ { ignoreFontFamilyNames: OneOrMany<StringOrRegex> },
676
+ RejectedMessage<[name: string]>
677
+ >;
678
+ 'font-family-no-missing-generic-family-keyword': CoreRule<
679
+ true,
680
+ { ignoreFontFamilies: OneOrMany<StringOrRegex> }
681
+ >;
682
+ 'font-weight-notation': CoreRule<
683
+ 'numeric' | 'named-where-possible',
684
+ { ignore: OneOrMany<'relative'> }
685
+ >;
686
+ 'function-allowed-list': CoreRule<
687
+ OneOrMany<StringOrRegex>,
688
+ { exceptWithoutPropertyFallback: OneOrMany<StringOrRegex> },
689
+ RejectedMessage<[name: string]>
690
+ >;
691
+ 'function-calc-no-unspaced-operator': CoreRule<
692
+ true,
693
+ {},
694
+ {
695
+ expectedAfter: (operator: string) => string;
696
+ expectedBefore: (operator: string) => string;
697
+ }
698
+ >;
699
+ 'function-disallowed-list': CoreRule<
700
+ OneOrMany<StringOrRegex>,
701
+ {},
702
+ RejectedMessage<[name: string]>
703
+ >;
704
+ 'function-linear-gradient-no-nonstandard-direction': CoreRule<true>;
705
+ 'function-name-case': CoreRule<
706
+ 'lower' | 'upper',
707
+ { ignoreFunctions: OneOrMany<StringOrRegex> },
708
+ AutofixMessage
709
+ >;
710
+ 'function-no-unknown': CoreRule<
711
+ true,
712
+ { ignoreFunctions: OneOrMany<StringOrRegex> },
713
+ RejectedMessage<[name: string]>
714
+ >;
715
+ 'function-url-no-scheme-relative': CoreRule<true>;
716
+ 'function-url-quotes': CoreRule<'always' | 'never', { except: OneOrMany<'empty'> }>;
717
+ 'function-url-scheme-allowed-list': CoreRule<
718
+ OneOrMany<StringOrRegex>,
719
+ {},
720
+ RejectedMessage<[scheme: string]>
721
+ >;
722
+ 'function-url-scheme-disallowed-list': CoreRule<
723
+ OneOrMany<StringOrRegex>,
724
+ {},
725
+ RejectedMessage<[scheme: string]>
726
+ >;
727
+ 'hue-degree-notation': CoreRule<'angle' | 'number', {}, AutofixMessage>;
728
+ 'import-notation': CoreRule<'string' | 'url', {}, AutofixMessage>;
729
+ 'keyframe-block-no-duplicate-selectors': CoreRule<
730
+ true,
731
+ {},
732
+ RejectedMessage<[selector: string]>
733
+ >;
734
+ 'keyframe-declaration-no-important': CoreRule<true>;
735
+ 'keyframe-selector-notation': CoreRule<
736
+ 'keyword' | 'percentage' | 'percentage-unless-within-keyword-only-block',
737
+ {},
738
+ AutofixMessage
739
+ >;
740
+ 'keyframes-name-pattern': PatternRule;
741
+ 'layer-name-pattern': PatternRule;
742
+ 'length-zero-no-unit': CoreRule<
743
+ true,
744
+ {
745
+ ignore: OneOrMany<'custom-properties'>;
746
+ ignoreFunctions: OneOrMany<StringOrRegex>;
747
+ ignorePreludeOfAtRules: OneOrMany<StringOrRegex>;
748
+ }
749
+ >;
750
+ 'lightness-notation': CoreRule<'percentage' | 'number', {}, AutofixMessage>;
751
+ 'max-nesting-depth': CoreRule<
752
+ number,
753
+ {
754
+ ignore: OneOrMany<'blockless-at-rules' | 'pseudo-classes'>;
755
+ ignoreAtRules: OneOrMany<StringOrRegex>;
756
+ ignoreRules: OneOrMany<StringOrRegex>;
757
+ ignorePseudoClasses: OneOrMany<StringOrRegex>;
758
+ },
759
+ ExpectedMessage<[depth: number]>
760
+ >;
761
+ 'media-feature-name-allowed-list': CoreRule<
762
+ OneOrMany<StringOrRegex>,
763
+ {},
764
+ RejectedMessage<[name: string]>
765
+ >;
766
+ 'media-feature-name-disallowed-list': CoreRule<
767
+ OneOrMany<StringOrRegex>,
768
+ {},
769
+ RejectedMessage<[name: string]>
770
+ >;
771
+ 'media-feature-name-no-unknown': CoreRule<
772
+ true,
773
+ { ignoreMediaFeatureNames: OneOrMany<StringOrRegex> },
774
+ RejectedMessage<[name: string]>
775
+ >;
776
+ 'media-feature-name-no-vendor-prefix': CoreRule<
777
+ true,
778
+ { ignoreMediaFeatureNames: OneOrMany<StringOrRegex> }
779
+ >;
780
+ 'media-feature-name-unit-allowed-list': CoreRule<
781
+ Record<string, OneOrMany<string>>,
782
+ {},
783
+ RejectedMessage<[unit: string, name: string]>
784
+ >;
785
+ 'media-feature-name-value-allowed-list': CoreRule<
786
+ Record<string, OneOrMany<StringOrRegex>>,
787
+ {},
788
+ RejectedMessage<[name: string, value: string]>
789
+ >;
790
+ 'media-feature-name-value-no-unknown': CoreRule<
791
+ true,
792
+ {
793
+ ignoreMediaFeatureNameValues: Record<string, OneOrMany<string | RegExp>>;
794
+ },
795
+ RejectedMessage<[name: string, value: string]>
796
+ >;
797
+ 'media-feature-range-notation': NotationRule<
798
+ 'prefix' | 'context',
799
+ { except: OneOrMany<'exact-value'> }
800
+ >;
801
+ 'media-query-no-invalid': CoreRule<
802
+ true,
803
+ { ignoreFunctions: OneOrMany<StringOrRegex> },
804
+ RejectedMessage<[query: string, reason: string]>
805
+ >;
806
+ 'media-type-no-deprecated': CoreRule<
807
+ true,
808
+ { ignoreMediaTypes: OneOrMany<StringOrRegex> },
809
+ RejectedMessage<[name: string]>
810
+ >;
811
+ 'named-grid-areas-no-invalid': CoreRule<true>;
812
+ 'nesting-selector-no-missing-scoping-root': CoreRule<
813
+ true,
814
+ { ignoreAtRules: OneOrMany<StringOrRegex> }
815
+ >;
816
+ 'no-descending-specificity': CoreRule<
817
+ true,
818
+ { ignore: OneOrMany<'selectors-within-list'> },
819
+ ExpectedMessage<
820
+ [selector: string, selector: string, line: number, selector: string, selector: string]
821
+ >
822
+ >;
823
+ 'no-duplicate-at-import-rules': CoreRule<true, {}, RejectedMessage<[url: string]>>;
824
+ 'no-duplicate-selectors': CoreRule<
825
+ true,
826
+ {
827
+ disallowInList: boolean;
828
+ ignoreSelectors: OneOrMany<StringOrRegex>;
829
+ },
830
+ RejectedMessage<[selector: string, line: number]>
831
+ >;
832
+ 'no-empty-source': CoreRule<true>;
833
+ 'no-invalid-double-slash-comments': CoreRule<true>;
834
+ 'no-invalid-position-at-import-rule': CoreRule<
835
+ true,
836
+ { ignoreAtRules: OneOrMany<StringOrRegex> }
837
+ >;
838
+ 'no-invalid-position-declaration': CoreRule<true, { ignoreAtRules: OneOrMany<StringOrRegex> }>;
839
+ 'no-irregular-whitespace': CoreRule<true>;
840
+ 'no-unknown-animations': CoreRule<true, {}, RejectedMessage<[name: string]>>;
841
+ 'no-unknown-custom-media': CoreRule<true, {}, RejectedMessage<[name: string]>>;
842
+ 'no-unknown-custom-properties': CoreRule<true, {}, RejectedMessage<[property: string]>>;
843
+ 'number-max-precision': CoreRule<
844
+ number,
845
+ {
846
+ ignoreProperties: OneOrMany<StringOrRegex>;
847
+ ignoreUnits: OneOrMany<StringOrRegex>;
848
+ insideFunctions: Record<string, number>;
849
+ },
850
+ AutofixMessage
851
+ >;
852
+ 'property-allowed-list': CoreRule<
853
+ OneOrMany<StringOrRegex>,
854
+ {},
855
+ RejectedMessage<[property: string]>
856
+ >;
857
+ 'property-disallowed-list': CoreRule<
858
+ OneOrMany<StringOrRegex>,
859
+ {},
860
+ RejectedMessage<[property: string]>
861
+ >;
862
+ 'property-no-deprecated': CoreRule<
863
+ true,
864
+ {
865
+ ignoreProperties: OneOrMany<StringOrRegex>;
866
+ },
867
+ AutofixMessage & RejectedMessage<[property: string]>
868
+ >;
869
+ 'property-no-unknown': CoreRule<
870
+ true,
871
+ {
872
+ checkPrefixed: boolean;
873
+ ignoreAtRules: OneOrMany<StringOrRegex>;
874
+ ignoreProperties: OneOrMany<StringOrRegex>;
875
+ ignoreSelectors: OneOrMany<StringOrRegex>;
876
+ },
877
+ RejectedMessage<[property: string]>
878
+ >;
879
+ 'property-no-vendor-prefix': CoreRule<
880
+ true,
881
+ { ignoreProperties: OneOrMany<StringOrRegex> },
882
+ RejectedMessage<[property: string]>
883
+ >;
884
+ 'rule-empty-line-before': CoreRule<
885
+ 'always' | 'never' | 'always-multi-line' | 'never-multi-line',
886
+ {
887
+ ignore: OneOrMany<'after-comment' | 'first-nested' | 'inside-block'>;
888
+ except: OneOrMany<
889
+ | 'after-rule'
890
+ | 'after-single-line-comment'
891
+ | 'first-nested'
892
+ | 'inside-block-and-after-rule'
893
+ | 'inside-block'
894
+ >;
895
+ }
896
+ >;
897
+ 'rule-selector-property-disallowed-list': CoreRule<
898
+ Record<string, OneOrMany<StringOrRegex>>,
899
+ {
900
+ ignore: OneOrMany<'keyframe-selectors'>;
901
+ },
902
+ RejectedMessage<[selector: string, property: string]>
903
+ >;
904
+ 'selector-anb-no-unmatchable': CoreRule<true, {}, RejectedMessage<[selector: string]>>;
905
+ 'selector-attribute-name-disallowed-list': CoreRule<
906
+ OneOrMany<StringOrRegex>,
907
+ {},
908
+ RejectedMessage<[name: string]>
909
+ >;
910
+ 'selector-attribute-operator-allowed-list': CoreRule<
911
+ OneOrMany<string>,
912
+ {},
913
+ RejectedMessage<[operator: string]>
914
+ >;
915
+ 'selector-attribute-operator-disallowed-list': CoreRule<
916
+ OneOrMany<string>,
917
+ {},
918
+ RejectedMessage<[operator: string]>
919
+ >;
920
+ 'selector-attribute-quotes': CoreRule<
921
+ 'always' | 'never',
922
+ {},
923
+ ExpectedMessage<[value: string]> & RejectedMessage<[value: string]>
924
+ >;
925
+ 'selector-class-pattern': PatternRule<{ resolveNestedSelectors: boolean }>;
926
+ 'selector-combinator-allowed-list': CoreRule<
927
+ OneOrMany<string>,
928
+ {},
929
+ RejectedMessage<[combinator: string]>
930
+ >;
931
+ 'selector-combinator-disallowed-list': CoreRule<
932
+ OneOrMany<string>,
933
+ {},
934
+ RejectedMessage<[combinator: string]>
935
+ >;
936
+ 'selector-disallowed-list': CoreRule<
937
+ OneOrMany<StringOrRegex>,
938
+ { splitList: boolean; ignore: OneOrMany<'inside-block' | 'keyframe-selectors'> },
939
+ RejectedMessage<[selector: string]>
940
+ >;
941
+ 'selector-id-pattern': PatternRule;
942
+ 'selector-max-attribute': MaxRule<{ ignoreAttributes: OneOrMany<StringOrRegex> }>;
943
+ 'selector-max-class': MaxRule;
944
+ 'selector-max-combinators': MaxRule;
945
+ 'selector-max-compound-selectors': MaxRule<{ ignoreSelectors: OneOrMany<StringOrRegex> }>;
946
+ 'selector-max-id': MaxRule<{
947
+ ignoreContextFunctionalPseudoClasses: OneOrMany<StringOrRegex>;
948
+ }>;
949
+ 'selector-max-pseudo-class': MaxRule;
950
+ 'selector-max-specificity': CoreRule<
951
+ string,
952
+ { ignoreSelectors: OneOrMany<StringOrRegex> },
953
+ ExpectedMessage<[selector: string, specificity: string, selector: string]>
954
+ >;
955
+ 'selector-max-type': MaxRule<{
956
+ ignore: OneOrMany<'descendant' | 'child' | 'compounded' | 'next-sibling' | 'custom-elements'>;
957
+ ignoreTypes: OneOrMany<StringOrRegex>;
958
+ }>;
959
+ 'selector-max-universal': MaxRule<{ ignoreAfterCombinators: OneOrMany<string> }>;
960
+ 'selector-nested-pattern': PatternRule<{ splitList: boolean }>;
961
+ 'selector-no-qualifying-type': CoreRule<
962
+ true,
963
+ { ignore: OneOrMany<'attribute' | 'class' | 'id'> },
964
+ RejectedMessage<[selector: string, type: string]>
965
+ >;
966
+ 'selector-no-vendor-prefix': CoreRule<
967
+ true,
968
+ { ignoreSelectors: OneOrMany<StringOrRegex> },
969
+ RejectedMessage<[selector: string]>
970
+ >;
971
+ 'selector-not-notation': NotationRule<'simple' | 'complex'>;
972
+ 'selector-pseudo-class-allowed-list': CoreRule<
973
+ OneOrMany<StringOrRegex>,
974
+ {},
975
+ RejectedMessage<[selector: string]>
976
+ >;
977
+ 'selector-pseudo-class-disallowed-list': CoreRule<
978
+ OneOrMany<StringOrRegex>,
979
+ {},
980
+ RejectedMessage<[selector: string]>
981
+ >;
982
+ 'selector-pseudo-class-no-unknown': CoreRule<
983
+ true,
984
+ { ignorePseudoClasses: OneOrMany<StringOrRegex> },
985
+ RejectedMessage<[selector: string]>
986
+ >;
987
+ 'selector-pseudo-element-allowed-list': CoreRule<
988
+ OneOrMany<StringOrRegex>,
989
+ {},
990
+ RejectedMessage<[selector: string]>
991
+ >;
992
+ 'selector-pseudo-element-colon-notation': NotationRule<'single' | 'double'>;
993
+ 'selector-pseudo-element-disallowed-list': CoreRule<
994
+ OneOrMany<StringOrRegex>,
995
+ {},
996
+ RejectedMessage<[selector: string]>
997
+ >;
998
+ 'selector-pseudo-element-no-unknown': CoreRule<
999
+ true,
1000
+ { ignorePseudoElements: OneOrMany<StringOrRegex> },
1001
+ RejectedMessage<[selector: string]>
1002
+ >;
1003
+ 'selector-type-case': CoreRule<
1004
+ 'lower' | 'upper',
1005
+ { ignoreTypes: OneOrMany<StringOrRegex> },
1006
+ AutofixMessage
1007
+ >;
1008
+ 'selector-type-no-unknown': CoreRule<
1009
+ true,
1010
+ {
1011
+ ignore: OneOrMany<'custom-elements' | 'default-namespace'>;
1012
+ ignoreNamespaces: OneOrMany<StringOrRegex>;
1013
+ ignoreTypes: OneOrMany<StringOrRegex>;
1014
+ },
1015
+ RejectedMessage<[selector: string]>
1016
+ >;
1017
+ 'shorthand-property-no-redundant-values': CoreRule<
1018
+ true,
1019
+ {
1020
+ ignore: OneOrMany<'four-into-three-edge-values'>;
1021
+ },
1022
+ AutofixMessage
1023
+ >;
1024
+ 'string-no-newline': CoreRule<
1025
+ true,
1026
+ { ignore: OneOrMany<'at-rule-preludes' | 'declaration-values'> }
1027
+ >;
1028
+ 'syntax-string-no-invalid': CoreRule<true, {}, RejectedMessage<[component: string]>>;
1029
+ 'time-min-milliseconds': CoreRule<
1030
+ number,
1031
+ { ignore: OneOrMany<'delay'> },
1032
+ ExpectedMessage<[ms: number]>
1033
+ >;
1034
+ 'unit-allowed-list': CoreRule<
1035
+ OneOrMany<string>,
1036
+ {
1037
+ ignoreFunctions: OneOrMany<StringOrRegex>;
1038
+ ignoreProperties: Record<string, OneOrMany<StringOrRegex>>;
1039
+ },
1040
+ RejectedMessage<[unit: string]>
1041
+ >;
1042
+ 'unit-disallowed-list': CoreRule<
1043
+ OneOrMany<string>,
1044
+ {
1045
+ ignoreFunctions: OneOrMany<StringOrRegex>;
1046
+ ignoreProperties: Record<string, OneOrMany<StringOrRegex>>;
1047
+ ignoreMediaFeatureNames: Record<string, OneOrMany<StringOrRegex>>;
1048
+ },
1049
+ RejectedMessage<[unit: string]>
1050
+ >;
1051
+ 'unit-no-unknown': CoreRule<
1052
+ true,
1053
+ {
1054
+ ignoreUnits: OneOrMany<StringOrRegex>;
1055
+ ignoreFunctions: OneOrMany<StringOrRegex>;
1056
+ },
1057
+ RejectedMessage<[unit: string]>
1058
+ >;
1059
+ 'value-keyword-case': CoreRule<
1060
+ 'lower' | 'upper',
1061
+ {
1062
+ ignoreProperties: OneOrMany<StringOrRegex>;
1063
+ ignoreKeywords: OneOrMany<StringOrRegex>;
1064
+ ignoreFunctions: OneOrMany<StringOrRegex>;
1065
+ camelCaseSvgKeywords: boolean;
1066
+ },
1067
+ AutofixMessage
1068
+ >;
1069
+ 'value-no-vendor-prefix': CoreRule<
1070
+ true,
1071
+ { ignoreValues: OneOrMany<StringOrRegex> },
1072
+ RejectedMessage<[value: string]>
1073
+ >;
1074
+ };
1075
+
1076
+ /** @internal */
1077
+ export type GetPostcssOptions = {
1078
+ code?: string;
1079
+ codeFilename?: string;
1080
+ filePath?: string;
1081
+ customSyntax?: CustomSyntax;
1082
+ };
1083
+
1084
+ /** @internal */
1085
+ export type GetLintSourceOptions = GetPostcssOptions & {
1086
+ existingPostcssResult?: PostCSS.Result;
1087
+ cache?: boolean;
1088
+ };
1089
+
1090
+ /**
1091
+ * Linter options.
1092
+ */
1093
+ export type LinterOptions = {
1094
+ files?: OneOrMany<string>;
1095
+ globbyOptions?: GlobbyOptions;
1096
+ cache?: boolean;
1097
+ cacheLocation?: string;
1098
+ cacheStrategy?: string;
1099
+ code?: string;
1100
+ codeFilename?: string;
1101
+ config?: Config;
1102
+ configFile?: string;
1103
+ configBasedir?: string;
1104
+ /**
1105
+ * The working directory to resolve files from. Defaults to the
1106
+ * current working directory.
1107
+ */
1108
+ cwd?: string;
1109
+ ignoreDisables?: boolean;
1110
+ ignorePath?: OneOrMany<string>;
1111
+ ignorePattern?: string[];
1112
+ reportDescriptionlessDisables?: boolean;
1113
+ reportNeedlessDisables?: boolean;
1114
+ reportInvalidScopeDisables?: boolean;
1115
+ reportUnscopedDisables?: boolean;
1116
+ maxWarnings?: number;
1117
+ customSyntax?: CustomSyntax;
1118
+ /** @internal */
1119
+ _defaultFormatter?: FormatterType;
1120
+ formatter?: FormatterType | Formatter;
1121
+ disableDefaultIgnores?: boolean;
1122
+ fix?: boolean | FixMode;
1123
+ computeEditInfo?: boolean;
1124
+ allowEmptyInput?: boolean;
1125
+ quiet?: boolean;
1126
+ quietDeprecationWarnings?: boolean;
1127
+ validate?: boolean;
1128
+ /** @experimental */
1129
+ suppressAll?: boolean;
1130
+ /** @experimental */
1131
+ suppressLocation?: string;
1132
+ /** @experimental */
1133
+ suppressRule?: string[];
1134
+ };
1135
+
1136
+ /** @internal */
1137
+ export type FixMode = 'lax' | 'strict';
1138
+
1139
+ /**
1140
+ * @internal
1141
+ *
1142
+ * file path -> rule name -> { count: number }
1143
+ */
1144
+ export type SuppressedProblems = Map<string, Map<string, { count: number }>>;
1145
+
1146
+ /**
1147
+ * A CSS syntax error.
1148
+ */
1149
+ export type CssSyntaxError = {
1150
+ file?: string;
1151
+ input: {
1152
+ column: number;
1153
+ file?: string;
1154
+ line: number;
1155
+ source: string;
1156
+ };
1157
+ /**
1158
+ * The line of the inclusive start position of the error.
1159
+ */
1160
+ line: number;
1161
+ /**
1162
+ * The column of the inclusive start position of the error.
1163
+ */
1164
+ column: number;
1165
+ /**
1166
+ * The line of the exclusive end position of the error.
1167
+ */
1168
+ endLine?: number;
1169
+ /**
1170
+ * The column of the exclusive end position of the error.
1171
+ */
1172
+ endColumn?: number;
1173
+ message: string;
1174
+ name: string;
1175
+ reason: string;
1176
+ source: string;
1177
+ };
1178
+
1179
+ export type EditInfo = {
1180
+ /**
1181
+ * The pair of 0-based indices in source code text to remove.
1182
+ */
1183
+ range: [number, number];
1184
+ /**
1185
+ * The text to add.
1186
+ */
1187
+ text: string;
1188
+ };
1189
+
1190
+ /**
1191
+ * A lint warning.
1192
+ */
1193
+ export type Warning = {
1194
+ /**
1195
+ * The line of the inclusive start position of the warning.
1196
+ */
1197
+ line: number;
1198
+ /**
1199
+ * The column of the inclusive start position of the warning.
1200
+ */
1201
+ column: number;
1202
+ /**
1203
+ * The line of the exclusive end position of the warning.
1204
+ */
1205
+ endLine?: number;
1206
+ /**
1207
+ * The column of the exclusive end position of the warning.
1208
+ */
1209
+ endColumn?: number;
1210
+ /**
1211
+ * The `EditInfo` object of autofix. This property is undefined if this message is not fixable.
1212
+ */
1213
+ fix?: EditInfo;
1214
+ rule: string;
1215
+ severity: Severity;
1216
+ text: string;
1217
+ url?: string;
1218
+ stylelintType?: StylelintWarningType;
1219
+ };
1220
+
1221
+ /**
1222
+ * A lint result.
1223
+ */
1224
+ export type LintResult = {
1225
+ source?: string;
1226
+ deprecations: {
1227
+ text: string;
1228
+ reference?: string;
1229
+ }[];
1230
+ invalidOptionWarnings: {
1231
+ text: string;
1232
+ }[];
1233
+ parseErrors: (PostCSS.Warning & {
1234
+ stylelintType: Extract<StylelintWarningType, 'parseError'>;
1235
+ })[];
1236
+ errored?: boolean;
1237
+ warnings: Warning[];
1238
+ ignored?: boolean;
1239
+ /**
1240
+ * Internal use only. Do not use or rely on this property. It may
1241
+ * change at any time.
1242
+ * @internal
1243
+ */
1244
+ _postcssResult?: PostcssResult;
1245
+ };
1246
+
1247
+ /** @internal */
1248
+ export type DisableReportRange = {
1249
+ rule: string;
1250
+ start: number;
1251
+ end?: number;
1252
+ };
1253
+
1254
+ /**
1255
+ * A linter result.
1256
+ */
1257
+ export type LinterResult = {
1258
+ /**
1259
+ * The working directory from which the linter was run when the
1260
+ * results were generated.
1261
+ */
1262
+ cwd: string;
1263
+ results: LintResult[];
1264
+ errored: boolean;
1265
+ /**
1266
+ * A string that contains the formatted problems.
1267
+ */
1268
+ report: string;
1269
+ /**
1270
+ * A string that contains the autofixed code, if the `fix` option is set to `true`
1271
+ * and the `code` option is provided.
1272
+ */
1273
+ code?: string;
1274
+ maxWarningsExceeded?: {
1275
+ maxWarnings: number;
1276
+ foundWarnings: number;
1277
+ };
1278
+ reportedDisables: DisableOptionsReport;
1279
+ descriptionlessDisables?: DisableOptionsReport;
1280
+ needlessDisables?: DisableOptionsReport;
1281
+ invalidScopeDisables?: DisableOptionsReport;
1282
+ /**
1283
+ * Each rule metadata by name.
1284
+ */
1285
+ ruleMetadata: { [ruleName: string]: Partial<RuleMeta> };
1286
+ };
1287
+
1288
+ type Position = {
1289
+ line: number;
1290
+ column: number;
1291
+ };
1292
+
1293
+ export type ProblemLocation =
1294
+ | {
1295
+ /**
1296
+ * The inclusive start position of the problem, relative to the
1297
+ * node's source text. If provided, this will be used instead of
1298
+ * `index`.
1299
+ */
1300
+ start: Position;
1301
+ /**
1302
+ * The exclusive end position of the problem, relative to the
1303
+ * node's source text. If provided, this will be used instead of
1304
+ * `endIndex`.
1305
+ */
1306
+ end: Position;
1307
+ }
1308
+ | {
1309
+ /**
1310
+ * The inclusive start index of the problem, relative to the node's
1311
+ * source text.
1312
+ */
1313
+ index: number;
1314
+ /**
1315
+ * The exclusive end index of the problem, relative to the node's
1316
+ * source text.
1317
+ */
1318
+ endIndex: number;
1319
+ }
1320
+ | {
1321
+ word: string;
1322
+ }
1323
+ | object;
1324
+
1325
+ export type FixCallback = () => void | undefined | never;
1326
+
1327
+ export type FixObject = {
1328
+ apply?: FixCallback;
1329
+ node?: PostCSS.Node;
1330
+ };
1331
+
1332
+ /**
1333
+ * A lint problem.
1334
+ */
1335
+ export type Problem = {
1336
+ ruleName: string;
1337
+ result: PostcssResult;
1338
+ message: RuleMessage;
1339
+ messageArgs?: Parameters<RuleMessageFunc> | undefined;
1340
+ node: PostCSS.Node;
1341
+ /**
1342
+ * Optional severity override for the problem.
1343
+ */
1344
+ severity?: RuleSeverity;
1345
+ fix?: FixCallback | FixObject;
1346
+ } & ProblemLocation;
1347
+
1348
+ /** @internal */
1349
+ export type ShorthandProperties =
1350
+ | 'animation'
1351
+ | 'background'
1352
+ | 'border'
1353
+ | 'border-block'
1354
+ | 'border-block-end'
1355
+ | 'border-block-start'
1356
+ | 'border-inline'
1357
+ | 'border-inline-end'
1358
+ | 'border-inline-start'
1359
+ | 'border-bottom'
1360
+ | 'border-color'
1361
+ | 'border-image'
1362
+ | 'border-inline-end'
1363
+ | 'border-inline-start'
1364
+ | 'border-left'
1365
+ | 'border-radius'
1366
+ | 'border-right'
1367
+ | 'border-style'
1368
+ | 'border-top'
1369
+ | 'border-width'
1370
+ | 'column-rule'
1371
+ | 'columns'
1372
+ | 'flex'
1373
+ | 'flex-flow'
1374
+ | 'font'
1375
+ | 'font-synthesis'
1376
+ | 'font-variant'
1377
+ | 'gap'
1378
+ | 'grid'
1379
+ | 'grid-area'
1380
+ | 'grid-column'
1381
+ | 'grid-gap'
1382
+ | 'grid-row'
1383
+ | 'grid-template'
1384
+ | 'inset'
1385
+ | 'inset-block'
1386
+ | 'inset-inline'
1387
+ | 'list-style'
1388
+ | 'margin'
1389
+ | 'margin-block'
1390
+ | 'margin-inline'
1391
+ | 'mask'
1392
+ | 'outline'
1393
+ | 'overflow'
1394
+ | 'overscroll-behavior'
1395
+ | 'padding'
1396
+ | 'padding-block'
1397
+ | 'padding-inline'
1398
+ | 'place-content'
1399
+ | 'place-items'
1400
+ | 'place-self'
1401
+ | 'scroll-margin'
1402
+ | 'scroll-margin-block'
1403
+ | 'scroll-margin-inline'
1404
+ | 'scroll-padding'
1405
+ | 'scroll-padding-block'
1406
+ | 'scroll-padding-inline'
1407
+ | 'text-decoration'
1408
+ | 'text-emphasis'
1409
+ | 'transition';
1410
+
1411
+ /** @internal */
1412
+ export type LonghandSubPropertiesOfShorthandProperties = ReadonlyMap<
1413
+ ShorthandProperties,
1414
+ ReadonlySet<string>
1415
+ >;
1416
+
1417
+ /**
1418
+ * Utility functions.
1419
+ */
1420
+ export type Utils = {
1421
+ /**
1422
+ * Report a problem.
1423
+ *
1424
+ * This function accounts for `disabledRanges` attached to the result.
1425
+ * That is, if the reported problem is within a disabledRange,
1426
+ * it is ignored. Otherwise, it is attached to the result as a
1427
+ * postcss warning.
1428
+ *
1429
+ * It also accounts for the rule's severity.
1430
+ *
1431
+ * You *must* pass *either* a node or a line number.
1432
+ *
1433
+ * @param problem - A problem
1434
+ */
1435
+ report: (problem: Problem) => void;
1436
+
1437
+ /**
1438
+ * Given an object of problem messages, return another
1439
+ * that provides the same messages postfixed with the rule
1440
+ * that has been violated.
1441
+ *
1442
+ * @param ruleName - A rule name
1443
+ * @param messages - An object whose keys are message identifiers
1444
+ * and values are either message strings or functions that return message strings
1445
+ * @returns New message object, whose messages will be marked with the rule name
1446
+ */
1447
+ ruleMessages: <T extends RuleMessages, R extends { [K in keyof T]: T[K] }>(
1448
+ ruleName: string,
1449
+ messages: T,
1450
+ ) => R;
1451
+
1452
+ /**
1453
+ * Validate a rule's options.
1454
+ *
1455
+ * See existing rules for examples.
1456
+ *
1457
+ * @param result - PostCSS result
1458
+ * @param ruleName - A rule name
1459
+ * @param optionDescriptions - Each optionDescription can have the following properties:
1460
+ * - `actual` (required): the actual passed option value or object.
1461
+ * - `possible` (required): a schema representation of what values are
1462
+ * valid for those options. `possible` should be an object if the
1463
+ * options are an object, with corresponding keys; if the options are not an
1464
+ * object, `possible` isn't, either. All `possible` value representations
1465
+ * should be **arrays of either values or functions**. Values are === checked
1466
+ * against `actual`. Functions are fed `actual` as an argument and their
1467
+ * return value is interpreted: truthy = valid, falsy = invalid.
1468
+ * - `optional` (optional): If this is `true`, `actual` can be undefined.
1469
+ * @returns Whether or not the options are valid (`true` = valid)
1470
+ */
1471
+ validateOptions: (
1472
+ result: PostcssResult,
1473
+ ruleName: string,
1474
+ ...optionDescriptions: RuleOptions[]
1475
+ ) => boolean;
1476
+
1477
+ /**
1478
+ * Useful for third-party code (e.g. plugins) to run a PostCSS Root
1479
+ * against a specific rule and do something with the warnings.
1480
+ */
1481
+ checkAgainstRule: <T, O extends Object>(
1482
+ options: {
1483
+ ruleName: string;
1484
+ ruleSettings: ConfigRuleSettings<T, O>;
1485
+ root: PostCSS.Root;
1486
+ result?: PostcssResult;
1487
+ context?: RuleContext;
1488
+ },
1489
+ callback: (warning: PostCSS.Warning) => void,
1490
+ ) => Promise<void>;
1491
+ };
1492
+
1493
+ /**
1494
+ * Internal use only. Do not use or rely on this type. It may change at
1495
+ * any time.
1496
+ * @internal
1497
+ */
1498
+ export type InternalApi = {
1499
+ _options: LinterOptions & { cwd: string };
1500
+ _extendExplorer: ReturnType<typeof cosmiconfig>;
1501
+ _configExplorer: ReturnType<typeof cosmiconfig>;
1502
+ _specifiedConfigCache: Map<Config, Map<string, CosmiconfigResult>>;
1503
+ _augmentedConfigCache: Map<string, CosmiconfigResult>;
1504
+ _postcssResultCache: Map<string, PostCSS.Result>;
1505
+ _compiledOverridesCache: Map<string, CompiledOverride[]>;
1506
+ _fileCache: FileCache;
1507
+ };
1508
+
1509
+ /**
1510
+ * Pre-compiled override matcher for efficient reuse.
1511
+ * @internal
1512
+ */
1513
+ export type CompiledOverride = {
1514
+ configOverrides: Omit<ConfigOverride, 'files'>;
1515
+ matches: (filePath: string) => boolean;
1516
+ };
1517
+
1518
+ /** @internal */
1519
+ export type DisableOptionsReport = DisableReportEntry[];
1520
+
1521
+ /** @internal */
1522
+ export type PostcssPluginOptions = Omit<LinterOptions, 'customSyntax'> | Config;
1523
+
1524
+ /**
1525
+ * The Stylelint public API.
1526
+ */
1527
+ export type PublicApi = PostCSS.PluginCreator<PostcssPluginOptions> & {
1528
+ /**
1529
+ * Runs Stylelint with the given options and returns a Promise that
1530
+ * resolves to the results.
1531
+ *
1532
+ * @param options - A lint options object
1533
+ * @returns A lint result
1534
+ */
1535
+ lint: (options: LinterOptions) => Promise<LinterResult>;
1536
+
1537
+ /**
1538
+ * Available rules.
1539
+ */
1540
+ rules: { readonly [name in keyof CoreRules]: Promise<CoreRules[name]> };
1541
+
1542
+ /**
1543
+ * Result report formatters by name.
1544
+ */
1545
+ formatters: Formatters;
1546
+
1547
+ /**
1548
+ * Creates a Stylelint plugin.
1549
+ */
1550
+ createPlugin: (ruleName: string, rule: Rule) => Plugin;
1551
+
1552
+ /**
1553
+ * The Stylelint "internal API" is passed among functions
1554
+ * so that methods on a Stylelint instance can invoke
1555
+ * each other while sharing options and caches.
1556
+ *
1557
+ * @internal
1558
+ */
1559
+ _createLinter: (options: LinterOptions) => InternalApi;
1560
+
1561
+ /**
1562
+ * Resolves the effective configuration for a given file. Resolves to
1563
+ * `undefined` if no config is found.
1564
+ *
1565
+ * @param filePath - The path to the file to get the config for.
1566
+ * @param options - The options to use when creating the Stylelint instance.
1567
+ * @returns A resolved config or `undefined`.
1568
+ */
1569
+ resolveConfig: (
1570
+ filePath: string,
1571
+ options?: Pick<LinterOptions, 'cwd' | 'config' | 'configBasedir' | 'configFile'>,
1572
+ ) => Promise<Config | undefined>;
1573
+
1574
+ /**
1575
+ * Utility functions.
1576
+ */
1577
+ utils: Utils;
1578
+
1579
+ /**
1580
+ * Reference objects.
1581
+ */
1582
+ reference: {
1583
+ longhandSubPropertiesOfShorthandProperties: LonghandSubPropertiesOfShorthandProperties;
1584
+ };
1585
+ };
1586
+ }
1587
+
1588
+ declare const stylelint: stylelint.PublicApi & {
1589
+ /**
1590
+ * For CommonJS default import compatibility.
1591
+ */
1592
+ default: stylelint.PublicApi;
1593
+ };
1594
+
1595
+ export = stylelint;