@alexlit/lint-kit 173.0.0 → 173.2.0

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