index.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. 'use strict';
  2. const importLazy = require('import-lazy');
  3. /** @type {typeof import('stylelint').rules} */
  4. const rules = {
  5. 'alpha-value-notation': importLazy(() => require('./alpha-value-notation'))(),
  6. 'annotation-no-unknown': importLazy(() => require('./annotation-no-unknown'))(),
  7. 'at-rule-allowed-list': importLazy(() => require('./at-rule-allowed-list'))(),
  8. 'at-rule-disallowed-list': importLazy(() => require('./at-rule-disallowed-list'))(),
  9. 'at-rule-empty-line-before': importLazy(() => require('./at-rule-empty-line-before'))(),
  10. 'at-rule-name-case': importLazy(() => require('./at-rule-name-case'))(),
  11. 'at-rule-name-newline-after': importLazy(() => require('./at-rule-name-newline-after'))(),
  12. 'at-rule-semicolon-space-before': importLazy(() => require('./at-rule-semicolon-space-before'))(),
  13. 'at-rule-name-space-after': importLazy(() => require('./at-rule-name-space-after'))(),
  14. 'at-rule-no-unknown': importLazy(() => require('./at-rule-no-unknown'))(),
  15. 'at-rule-no-vendor-prefix': importLazy(() => require('./at-rule-no-vendor-prefix'))(),
  16. 'at-rule-property-required-list': importLazy(() => require('./at-rule-property-required-list'))(),
  17. 'at-rule-semicolon-newline-after': importLazy(() =>
  18. require('./at-rule-semicolon-newline-after'),
  19. )(),
  20. 'block-closing-brace-empty-line-before': importLazy(() =>
  21. require('./block-closing-brace-empty-line-before'),
  22. )(),
  23. 'block-closing-brace-newline-after': importLazy(() =>
  24. require('./block-closing-brace-newline-after'),
  25. )(),
  26. 'block-closing-brace-newline-before': importLazy(() =>
  27. require('./block-closing-brace-newline-before'),
  28. )(),
  29. 'block-closing-brace-space-after': importLazy(() =>
  30. require('./block-closing-brace-space-after'),
  31. )(),
  32. 'block-closing-brace-space-before': importLazy(() =>
  33. require('./block-closing-brace-space-before'),
  34. )(),
  35. 'block-no-empty': importLazy(() => require('./block-no-empty'))(),
  36. 'block-opening-brace-newline-after': importLazy(() =>
  37. require('./block-opening-brace-newline-after'),
  38. )(),
  39. 'block-opening-brace-newline-before': importLazy(() =>
  40. require('./block-opening-brace-newline-before'),
  41. )(),
  42. 'block-opening-brace-space-after': importLazy(() =>
  43. require('./block-opening-brace-space-after'),
  44. )(),
  45. 'block-opening-brace-space-before': importLazy(() =>
  46. require('./block-opening-brace-space-before'),
  47. )(),
  48. 'color-function-notation': importLazy(() => require('./color-function-notation'))(),
  49. 'color-hex-alpha': importLazy(() => require('./color-hex-alpha'))(),
  50. 'color-hex-case': importLazy(() => require('./color-hex-case'))(),
  51. 'color-hex-length': importLazy(() => require('./color-hex-length'))(),
  52. 'color-named': importLazy(() => require('./color-named'))(),
  53. 'color-no-hex': importLazy(() => require('./color-no-hex'))(),
  54. 'color-no-invalid-hex': importLazy(() => require('./color-no-invalid-hex'))(),
  55. 'comment-empty-line-before': importLazy(() => require('./comment-empty-line-before'))(),
  56. 'comment-no-empty': importLazy(() => require('./comment-no-empty'))(),
  57. 'comment-pattern': importLazy(() => require('./comment-pattern'))(),
  58. 'comment-whitespace-inside': importLazy(() => require('./comment-whitespace-inside'))(),
  59. 'comment-word-disallowed-list': importLazy(() => require('./comment-word-disallowed-list'))(),
  60. 'custom-media-pattern': importLazy(() => require('./custom-media-pattern'))(),
  61. 'custom-property-empty-line-before': importLazy(() =>
  62. require('./custom-property-empty-line-before'),
  63. )(),
  64. 'custom-property-no-missing-var-function': importLazy(() =>
  65. require('./custom-property-no-missing-var-function'),
  66. )(),
  67. 'custom-property-pattern': importLazy(() => require('./custom-property-pattern'))(),
  68. 'declaration-bang-space-after': importLazy(() => require('./declaration-bang-space-after'))(),
  69. 'declaration-bang-space-before': importLazy(() => require('./declaration-bang-space-before'))(),
  70. 'declaration-block-no-duplicate-custom-properties': importLazy(() =>
  71. require('./declaration-block-no-duplicate-custom-properties'),
  72. )(),
  73. 'declaration-block-no-duplicate-properties': importLazy(() =>
  74. require('./declaration-block-no-duplicate-properties'),
  75. )(),
  76. 'declaration-block-no-redundant-longhand-properties': importLazy(() =>
  77. require('./declaration-block-no-redundant-longhand-properties'),
  78. )(),
  79. 'declaration-block-no-shorthand-property-overrides': importLazy(() =>
  80. require('./declaration-block-no-shorthand-property-overrides'),
  81. )(),
  82. 'declaration-block-semicolon-newline-after': importLazy(() =>
  83. require('./declaration-block-semicolon-newline-after'),
  84. )(),
  85. 'declaration-block-semicolon-newline-before': importLazy(() =>
  86. require('./declaration-block-semicolon-newline-before'),
  87. )(),
  88. 'declaration-block-semicolon-space-after': importLazy(() =>
  89. require('./declaration-block-semicolon-space-after'),
  90. )(),
  91. 'declaration-block-semicolon-space-before': importLazy(() =>
  92. require('./declaration-block-semicolon-space-before'),
  93. )(),
  94. 'declaration-block-single-line-max-declarations': importLazy(() =>
  95. require('./declaration-block-single-line-max-declarations'),
  96. )(),
  97. 'declaration-block-trailing-semicolon': importLazy(() =>
  98. require('./declaration-block-trailing-semicolon'),
  99. )(),
  100. 'declaration-colon-newline-after': importLazy(() =>
  101. require('./declaration-colon-newline-after'),
  102. )(),
  103. 'declaration-colon-space-after': importLazy(() => require('./declaration-colon-space-after'))(),
  104. 'declaration-colon-space-before': importLazy(() => require('./declaration-colon-space-before'))(),
  105. 'declaration-empty-line-before': importLazy(() => require('./declaration-empty-line-before'))(),
  106. 'declaration-no-important': importLazy(() => require('./declaration-no-important'))(),
  107. 'declaration-property-max-values': importLazy(() =>
  108. require('./declaration-property-max-values'),
  109. )(),
  110. 'declaration-property-unit-allowed-list': importLazy(() =>
  111. require('./declaration-property-unit-allowed-list'),
  112. )(),
  113. 'declaration-property-unit-disallowed-list': importLazy(() =>
  114. require('./declaration-property-unit-disallowed-list'),
  115. )(),
  116. 'declaration-property-value-allowed-list': importLazy(() =>
  117. require('./declaration-property-value-allowed-list'),
  118. )(),
  119. 'declaration-property-value-disallowed-list': importLazy(() =>
  120. require('./declaration-property-value-disallowed-list'),
  121. )(),
  122. 'font-family-no-missing-generic-family-keyword': importLazy(() =>
  123. require('./font-family-no-missing-generic-family-keyword'),
  124. )(),
  125. 'font-family-name-quotes': importLazy(() => require('./font-family-name-quotes'))(),
  126. 'font-family-no-duplicate-names': importLazy(() => require('./font-family-no-duplicate-names'))(),
  127. 'font-weight-notation': importLazy(() => require('./font-weight-notation'))(),
  128. 'function-allowed-list': importLazy(() => require('./function-allowed-list'))(),
  129. 'function-calc-no-unspaced-operator': importLazy(() =>
  130. require('./function-calc-no-unspaced-operator'),
  131. )(),
  132. 'function-comma-newline-after': importLazy(() => require('./function-comma-newline-after'))(),
  133. 'function-comma-newline-before': importLazy(() => require('./function-comma-newline-before'))(),
  134. 'function-comma-space-after': importLazy(() => require('./function-comma-space-after'))(),
  135. 'function-comma-space-before': importLazy(() => require('./function-comma-space-before'))(),
  136. 'function-disallowed-list': importLazy(() => require('./function-disallowed-list'))(),
  137. 'function-linear-gradient-no-nonstandard-direction': importLazy(() =>
  138. require('./function-linear-gradient-no-nonstandard-direction'),
  139. )(),
  140. 'function-max-empty-lines': importLazy(() => require('./function-max-empty-lines'))(),
  141. 'function-name-case': importLazy(() => require('./function-name-case'))(),
  142. 'function-no-unknown': importLazy(() => require('./function-no-unknown'))(),
  143. 'function-parentheses-newline-inside': importLazy(() =>
  144. require('./function-parentheses-newline-inside'),
  145. )(),
  146. 'function-parentheses-space-inside': importLazy(() =>
  147. require('./function-parentheses-space-inside'),
  148. )(),
  149. 'function-url-no-scheme-relative': importLazy(() =>
  150. require('./function-url-no-scheme-relative'),
  151. )(),
  152. 'function-url-quotes': importLazy(() => require('./function-url-quotes'))(),
  153. 'function-url-scheme-allowed-list': importLazy(() =>
  154. require('./function-url-scheme-allowed-list'),
  155. )(),
  156. 'function-url-scheme-disallowed-list': importLazy(() =>
  157. require('./function-url-scheme-disallowed-list'),
  158. )(),
  159. 'function-whitespace-after': importLazy(() => require('./function-whitespace-after'))(),
  160. 'hue-degree-notation': importLazy(() => require('./hue-degree-notation'))(),
  161. 'import-notation': importLazy(() => require('./import-notation'))(),
  162. 'keyframe-block-no-duplicate-selectors': importLazy(() =>
  163. require('./keyframe-block-no-duplicate-selectors'),
  164. )(),
  165. 'keyframe-declaration-no-important': importLazy(() =>
  166. require('./keyframe-declaration-no-important'),
  167. )(),
  168. 'keyframe-selector-notation': importLazy(() => require('./keyframe-selector-notation'))(),
  169. 'keyframes-name-pattern': importLazy(() => require('./keyframes-name-pattern'))(),
  170. 'length-zero-no-unit': importLazy(() => require('./length-zero-no-unit'))(),
  171. linebreaks: importLazy(() => require('./linebreaks'))(),
  172. 'max-empty-lines': importLazy(() => require('./max-empty-lines'))(),
  173. 'max-line-length': importLazy(() => require('./max-line-length'))(),
  174. 'max-nesting-depth': importLazy(() => require('./max-nesting-depth'))(),
  175. 'media-feature-colon-space-after': importLazy(() =>
  176. require('./media-feature-colon-space-after'),
  177. )(),
  178. 'media-feature-colon-space-before': importLazy(() =>
  179. require('./media-feature-colon-space-before'),
  180. )(),
  181. 'media-feature-name-allowed-list': importLazy(() =>
  182. require('./media-feature-name-allowed-list'),
  183. )(),
  184. 'media-feature-name-case': importLazy(() => require('./media-feature-name-case'))(),
  185. 'media-feature-name-disallowed-list': importLazy(() =>
  186. require('./media-feature-name-disallowed-list'),
  187. )(),
  188. 'media-feature-name-no-unknown': importLazy(() => require('./media-feature-name-no-unknown'))(),
  189. 'media-feature-name-no-vendor-prefix': importLazy(() =>
  190. require('./media-feature-name-no-vendor-prefix'),
  191. )(),
  192. 'media-feature-name-value-allowed-list': importLazy(() =>
  193. require('./media-feature-name-value-allowed-list'),
  194. )(),
  195. 'media-feature-parentheses-space-inside': importLazy(() =>
  196. require('./media-feature-parentheses-space-inside'),
  197. )(),
  198. 'media-feature-range-notation': importLazy(() => require('./media-feature-range-notation'))(),
  199. 'media-feature-range-operator-space-after': importLazy(() =>
  200. require('./media-feature-range-operator-space-after'),
  201. )(),
  202. 'media-feature-range-operator-space-before': importLazy(() =>
  203. require('./media-feature-range-operator-space-before'),
  204. )(),
  205. 'media-query-list-comma-newline-after': importLazy(() =>
  206. require('./media-query-list-comma-newline-after'),
  207. )(),
  208. 'media-query-list-comma-newline-before': importLazy(() =>
  209. require('./media-query-list-comma-newline-before'),
  210. )(),
  211. 'media-query-list-comma-space-after': importLazy(() =>
  212. require('./media-query-list-comma-space-after'),
  213. )(),
  214. 'media-query-list-comma-space-before': importLazy(() =>
  215. require('./media-query-list-comma-space-before'),
  216. )(),
  217. 'named-grid-areas-no-invalid': importLazy(() => require('./named-grid-areas-no-invalid'))(),
  218. 'no-descending-specificity': importLazy(() => require('./no-descending-specificity'))(),
  219. 'no-duplicate-at-import-rules': importLazy(() => require('./no-duplicate-at-import-rules'))(),
  220. 'no-duplicate-selectors': importLazy(() => require('./no-duplicate-selectors'))(),
  221. 'no-empty-source': importLazy(() => require('./no-empty-source'))(),
  222. 'no-empty-first-line': importLazy(() => require('./no-empty-first-line'))(),
  223. 'no-eol-whitespace': importLazy(() => require('./no-eol-whitespace'))(),
  224. 'no-extra-semicolons': importLazy(() => require('./no-extra-semicolons'))(),
  225. 'no-invalid-double-slash-comments': importLazy(() =>
  226. require('./no-invalid-double-slash-comments'),
  227. )(),
  228. 'no-invalid-position-at-import-rule': importLazy(() =>
  229. require('./no-invalid-position-at-import-rule'),
  230. )(),
  231. 'no-irregular-whitespace': importLazy(() => require('./no-irregular-whitespace'))(),
  232. 'no-missing-end-of-source-newline': importLazy(() =>
  233. require('./no-missing-end-of-source-newline'),
  234. )(),
  235. 'no-unknown-animations': importLazy(() => require('./no-unknown-animations'))(),
  236. 'number-leading-zero': importLazy(() => require('./number-leading-zero'))(),
  237. 'number-max-precision': importLazy(() => require('./number-max-precision'))(),
  238. 'number-no-trailing-zeros': importLazy(() => require('./number-no-trailing-zeros'))(),
  239. 'property-allowed-list': importLazy(() => require('./property-allowed-list'))(),
  240. 'property-case': importLazy(() => require('./property-case'))(),
  241. 'property-disallowed-list': importLazy(() => require('./property-disallowed-list'))(),
  242. 'property-no-unknown': importLazy(() => require('./property-no-unknown'))(),
  243. 'property-no-vendor-prefix': importLazy(() => require('./property-no-vendor-prefix'))(),
  244. 'rule-empty-line-before': importLazy(() => require('./rule-empty-line-before'))(),
  245. 'rule-selector-property-disallowed-list': importLazy(() =>
  246. require('./rule-selector-property-disallowed-list'),
  247. )(),
  248. 'selector-attribute-brackets-space-inside': importLazy(() =>
  249. require('./selector-attribute-brackets-space-inside'),
  250. )(),
  251. 'selector-attribute-name-disallowed-list': importLazy(() =>
  252. require('./selector-attribute-name-disallowed-list'),
  253. )(),
  254. 'selector-attribute-operator-allowed-list': importLazy(() =>
  255. require('./selector-attribute-operator-allowed-list'),
  256. )(),
  257. 'selector-attribute-operator-disallowed-list': importLazy(() =>
  258. require('./selector-attribute-operator-disallowed-list'),
  259. )(),
  260. 'selector-attribute-operator-space-after': importLazy(() =>
  261. require('./selector-attribute-operator-space-after'),
  262. )(),
  263. 'selector-attribute-operator-space-before': importLazy(() =>
  264. require('./selector-attribute-operator-space-before'),
  265. )(),
  266. 'selector-attribute-quotes': importLazy(() => require('./selector-attribute-quotes'))(),
  267. 'selector-class-pattern': importLazy(() => require('./selector-class-pattern'))(),
  268. 'selector-combinator-allowed-list': importLazy(() =>
  269. require('./selector-combinator-allowed-list'),
  270. )(),
  271. 'selector-combinator-disallowed-list': importLazy(() =>
  272. require('./selector-combinator-disallowed-list'),
  273. )(),
  274. 'selector-combinator-space-after': importLazy(() =>
  275. require('./selector-combinator-space-after'),
  276. )(),
  277. 'selector-combinator-space-before': importLazy(() =>
  278. require('./selector-combinator-space-before'),
  279. )(),
  280. 'selector-descendant-combinator-no-non-space': importLazy(() =>
  281. require('./selector-descendant-combinator-no-non-space'),
  282. )(),
  283. 'selector-disallowed-list': importLazy(() => require('./selector-disallowed-list'))(),
  284. 'selector-id-pattern': importLazy(() => require('./selector-id-pattern'))(),
  285. 'selector-list-comma-newline-after': importLazy(() =>
  286. require('./selector-list-comma-newline-after'),
  287. )(),
  288. 'selector-list-comma-newline-before': importLazy(() =>
  289. require('./selector-list-comma-newline-before'),
  290. )(),
  291. 'selector-list-comma-space-after': importLazy(() =>
  292. require('./selector-list-comma-space-after'),
  293. )(),
  294. 'selector-list-comma-space-before': importLazy(() =>
  295. require('./selector-list-comma-space-before'),
  296. )(),
  297. 'selector-max-attribute': importLazy(() => require('./selector-max-attribute'))(),
  298. 'selector-max-class': importLazy(() => require('./selector-max-class'))(),
  299. 'selector-max-combinators': importLazy(() => require('./selector-max-combinators'))(),
  300. 'selector-max-compound-selectors': importLazy(() =>
  301. require('./selector-max-compound-selectors'),
  302. )(),
  303. 'selector-max-empty-lines': importLazy(() => require('./selector-max-empty-lines'))(),
  304. 'selector-max-id': importLazy(() => require('./selector-max-id'))(),
  305. 'selector-max-pseudo-class': importLazy(() => require('./selector-max-pseudo-class'))(),
  306. 'selector-max-specificity': importLazy(() => require('./selector-max-specificity'))(),
  307. 'selector-max-type': importLazy(() => require('./selector-max-type'))(),
  308. 'selector-max-universal': importLazy(() => require('./selector-max-universal'))(),
  309. 'selector-nested-pattern': importLazy(() => require('./selector-nested-pattern'))(),
  310. 'selector-no-qualifying-type': importLazy(() => require('./selector-no-qualifying-type'))(),
  311. 'selector-no-vendor-prefix': importLazy(() => require('./selector-no-vendor-prefix'))(),
  312. 'selector-not-notation': importLazy(() => require('./selector-not-notation'))(),
  313. 'selector-pseudo-class-allowed-list': importLazy(() =>
  314. require('./selector-pseudo-class-allowed-list'),
  315. )(),
  316. 'selector-pseudo-class-case': importLazy(() => require('./selector-pseudo-class-case'))(),
  317. 'selector-pseudo-class-disallowed-list': importLazy(() =>
  318. require('./selector-pseudo-class-disallowed-list'),
  319. )(),
  320. 'selector-pseudo-class-no-unknown': importLazy(() =>
  321. require('./selector-pseudo-class-no-unknown'),
  322. )(),
  323. 'selector-pseudo-class-parentheses-space-inside': importLazy(() =>
  324. require('./selector-pseudo-class-parentheses-space-inside'),
  325. )(),
  326. 'selector-pseudo-element-allowed-list': importLazy(() =>
  327. require('./selector-pseudo-element-allowed-list'),
  328. )(),
  329. 'selector-pseudo-element-case': importLazy(() => require('./selector-pseudo-element-case'))(),
  330. 'selector-pseudo-element-colon-notation': importLazy(() =>
  331. require('./selector-pseudo-element-colon-notation'),
  332. )(),
  333. 'selector-pseudo-element-disallowed-list': importLazy(() =>
  334. require('./selector-pseudo-element-disallowed-list'),
  335. )(),
  336. 'selector-pseudo-element-no-unknown': importLazy(() =>
  337. require('./selector-pseudo-element-no-unknown'),
  338. )(),
  339. 'selector-type-case': importLazy(() => require('./selector-type-case'))(),
  340. 'selector-type-no-unknown': importLazy(() => require('./selector-type-no-unknown'))(),
  341. 'shorthand-property-no-redundant-values': importLazy(() =>
  342. require('./shorthand-property-no-redundant-values'),
  343. )(),
  344. 'string-no-newline': importLazy(() => require('./string-no-newline'))(),
  345. 'string-quotes': importLazy(() => require('./string-quotes'))(),
  346. 'time-min-milliseconds': importLazy(() => require('./time-min-milliseconds'))(),
  347. 'unicode-bom': importLazy(() => require('./unicode-bom'))(),
  348. 'unit-allowed-list': importLazy(() => require('./unit-allowed-list'))(),
  349. 'unit-case': importLazy(() => require('./unit-case'))(),
  350. 'unit-disallowed-list': importLazy(() => require('./unit-disallowed-list'))(),
  351. 'unit-no-unknown': importLazy(() => require('./unit-no-unknown'))(),
  352. 'value-keyword-case': importLazy(() => require('./value-keyword-case'))(),
  353. 'value-list-comma-newline-after': importLazy(() => require('./value-list-comma-newline-after'))(),
  354. 'value-list-comma-newline-before': importLazy(() =>
  355. require('./value-list-comma-newline-before'),
  356. )(),
  357. 'value-list-comma-space-after': importLazy(() => require('./value-list-comma-space-after'))(),
  358. 'value-list-comma-space-before': importLazy(() => require('./value-list-comma-space-before'))(),
  359. 'value-list-max-empty-lines': importLazy(() => require('./value-list-max-empty-lines'))(),
  360. 'value-no-vendor-prefix': importLazy(() => require('./value-no-vendor-prefix'))(),
  361. indentation: importLazy(() => require('./indentation'))(),
  362. };
  363. module.exports = rules;