@alexlit/lint-kit 173.2.2 → 174.0.0

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