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