stylelint.config.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. module.exports = {
  2. root: true,
  3. plugins: ['stylelint-order'],
  4. extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
  5. rules: {
  6. 'selector-pseudo-class-no-unknown': [
  7. true,
  8. {
  9. ignorePseudoClasses: ['global'],
  10. },
  11. ],
  12. 'at-rule-no-unknown': [
  13. true,
  14. {
  15. ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin'],
  16. },
  17. ],
  18. 'no-empty-source': null,
  19. 'unicode-bom': 'never',
  20. 'no-descending-specificity': null,
  21. 'font-family-no-missing-generic-family-keyword': null,
  22. 'declaration-colon-space-after': 'always-single-line',
  23. 'declaration-colon-space-before': 'never',
  24. 'declaration-block-trailing-semicolon': 'always',
  25. 'rule-empty-line-before': [
  26. 'always',
  27. {
  28. ignore: ['after-comment', 'first-nested'],
  29. },
  30. ],
  31. // 指定声明块内属性的字母顺序
  32. 'order/properties-order': [
  33. 'position',
  34. 'top',
  35. 'right',
  36. 'bottom',
  37. 'left',
  38. 'z-index',
  39. 'display',
  40. 'float',
  41. 'width',
  42. 'height',
  43. 'max-width',
  44. 'max-height',
  45. 'min-width',
  46. 'min-height',
  47. 'padding',
  48. 'padding-top',
  49. 'padding-right',
  50. 'padding-bottom',
  51. 'padding-left',
  52. 'margin',
  53. 'margin-top',
  54. 'margin-right',
  55. 'margin-bottom',
  56. 'margin-left',
  57. 'margin-collapse',
  58. 'margin-top-collapse',
  59. 'margin-right-collapse',
  60. 'margin-bottom-collapse',
  61. 'margin-left-collapse',
  62. 'overflow',
  63. 'overflow-x',
  64. 'overflow-y',
  65. 'clip',
  66. 'clear',
  67. 'font',
  68. 'font-family',
  69. 'font-size',
  70. 'font-smoothing',
  71. 'osx-font-smoothing',
  72. 'font-style',
  73. 'font-weight',
  74. 'hyphens',
  75. 'src',
  76. 'line-height',
  77. 'letter-spacing',
  78. 'word-spacing',
  79. 'color',
  80. 'text-align',
  81. 'text-decoration',
  82. 'text-indent',
  83. 'text-overflow',
  84. 'text-rendering',
  85. 'text-size-adjust',
  86. 'text-shadow',
  87. 'text-transform',
  88. 'word-break',
  89. 'word-wrap',
  90. 'white-space',
  91. 'vertical-align',
  92. 'list-style',
  93. 'list-style-type',
  94. 'list-style-position',
  95. 'list-style-image',
  96. 'pointer-events',
  97. 'cursor',
  98. 'background',
  99. 'background-attachment',
  100. 'background-color',
  101. 'background-image',
  102. 'background-position',
  103. 'background-repeat',
  104. 'background-size',
  105. 'border',
  106. 'border-collapse',
  107. 'border-top',
  108. 'border-right',
  109. 'border-bottom',
  110. 'border-left',
  111. 'border-color',
  112. 'border-image',
  113. 'border-top-color',
  114. 'border-right-color',
  115. 'border-bottom-color',
  116. 'border-left-color',
  117. 'border-spacing',
  118. 'border-style',
  119. 'border-top-style',
  120. 'border-right-style',
  121. 'border-bottom-style',
  122. 'border-left-style',
  123. 'border-width',
  124. 'border-top-width',
  125. 'border-right-width',
  126. 'border-bottom-width',
  127. 'border-left-width',
  128. 'border-radius',
  129. 'border-top-right-radius',
  130. 'border-bottom-right-radius',
  131. 'border-bottom-left-radius',
  132. 'border-top-left-radius',
  133. 'border-radius-topright',
  134. 'border-radius-bottomright',
  135. 'border-radius-bottomleft',
  136. 'border-radius-topleft',
  137. 'content',
  138. 'quotes',
  139. 'outline',
  140. 'outline-offset',
  141. 'opacity',
  142. 'filter',
  143. 'visibility',
  144. 'size',
  145. 'zoom',
  146. 'transform',
  147. 'box-align',
  148. 'box-flex',
  149. 'box-orient',
  150. 'box-pack',
  151. 'box-shadow',
  152. 'box-sizing',
  153. 'table-layout',
  154. 'animation',
  155. 'animation-delay',
  156. 'animation-duration',
  157. 'animation-iteration-count',
  158. 'animation-name',
  159. 'animation-play-state',
  160. 'animation-timing-function',
  161. 'animation-fill-mode',
  162. 'transition',
  163. 'transition-delay',
  164. 'transition-duration',
  165. 'transition-property',
  166. 'transition-timing-function',
  167. 'background-clip',
  168. 'backface-visibility',
  169. 'resize',
  170. 'appearance',
  171. 'user-select',
  172. 'interpolation-mode',
  173. 'direction',
  174. 'marks',
  175. 'page',
  176. 'set-link-source',
  177. 'unicode-bidi',
  178. 'speak',
  179. ],
  180. },
  181. };