stylelint.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. module.exports = {
  2. root: true,
  3. plugins: ['stylelint-order', 'stylelint-scss', 'stylelint-less'],
  4. rules: {
  5. // 源可以为空
  6. 'no-empty-source': null,
  7. // 特殊伪元素选择器
  8. 'selector-pseudo-element-no-unknown': null,
  9. // 字体里不必须包含通用字体
  10. 'font-family-no-missing-generic-family-keyword': null,
  11. // 可以写 0px
  12. 'length-zero-no-unit': null,
  13. // 可以写 #ffffff
  14. 'color-hex-length': null,
  15. // @语法
  16. 'at-rule-no-unknown': null,
  17. // 'scss/at-rule-no-unknown': true,
  18. 'order/properties-order': [
  19. 'position',
  20. 'top',
  21. 'right',
  22. 'bottom',
  23. 'left',
  24. 'z-index',
  25. 'display',
  26. 'float',
  27. 'width',
  28. 'height',
  29. 'max-width',
  30. 'max-height',
  31. 'min-width',
  32. 'min-height',
  33. 'padding',
  34. 'padding-top',
  35. 'padding-right',
  36. 'padding-bottom',
  37. 'padding-left',
  38. 'margin',
  39. 'margin-top',
  40. 'margin-right',
  41. 'margin-bottom',
  42. 'margin-left',
  43. 'margin-collapse',
  44. 'margin-top-collapse',
  45. 'margin-right-collapse',
  46. 'margin-bottom-collapse',
  47. 'margin-left-collapse',
  48. 'overflow',
  49. 'overflow-x',
  50. 'overflow-y',
  51. 'clip',
  52. 'clear',
  53. 'font',
  54. 'font-family',
  55. 'font-size',
  56. 'font-smoothing',
  57. 'osx-font-smoothing',
  58. 'font-style',
  59. 'font-weight',
  60. 'hyphens',
  61. 'src',
  62. 'line-height',
  63. 'letter-spacing',
  64. 'word-spacing',
  65. 'color',
  66. 'text-align',
  67. 'text-decoration',
  68. 'text-indent',
  69. 'text-overflow',
  70. 'text-rendering',
  71. 'text-size-adjust',
  72. 'text-shadow',
  73. 'text-transform',
  74. 'word-break',
  75. 'word-wrap',
  76. 'white-space',
  77. 'vertical-align',
  78. 'list-style',
  79. 'list-style-type',
  80. 'list-style-position',
  81. 'list-style-image',
  82. 'pointer-events',
  83. 'cursor',
  84. 'background',
  85. 'background-attachment',
  86. 'background-color',
  87. 'background-image',
  88. 'background-position',
  89. 'background-repeat',
  90. 'background-size',
  91. 'border',
  92. 'border-collapse',
  93. 'border-top',
  94. 'border-right',
  95. 'border-bottom',
  96. 'border-left',
  97. 'border-color',
  98. 'border-image',
  99. 'border-top-color',
  100. 'border-right-color',
  101. 'border-bottom-color',
  102. 'border-left-color',
  103. 'border-spacing',
  104. 'border-style',
  105. 'border-top-style',
  106. 'border-right-style',
  107. 'border-bottom-style',
  108. 'border-left-style',
  109. 'border-width',
  110. 'border-top-width',
  111. 'border-right-width',
  112. 'border-bottom-width',
  113. 'border-left-width',
  114. 'border-radius',
  115. 'border-top-right-radius',
  116. 'border-bottom-right-radius',
  117. 'border-bottom-left-radius',
  118. 'border-top-left-radius',
  119. 'border-radius-topright',
  120. 'border-radius-bottomright',
  121. 'border-radius-bottomleft',
  122. 'border-radius-topleft',
  123. 'content',
  124. 'quotes',
  125. 'outline',
  126. 'outline-offset',
  127. 'opacity',
  128. 'filter',
  129. 'visibility',
  130. 'size',
  131. 'zoom',
  132. 'transform',
  133. 'box-align',
  134. 'box-flex',
  135. 'box-orient',
  136. 'box-pack',
  137. 'box-shadow',
  138. 'box-sizing',
  139. 'table-layout',
  140. 'animation',
  141. 'animation-delay',
  142. 'animation-duration',
  143. 'animation-iteration-count',
  144. 'animation-name',
  145. 'animation-play-state',
  146. 'animation-timing-function',
  147. 'animation-fill-mode',
  148. 'transition',
  149. 'transition-delay',
  150. 'transition-duration',
  151. 'transition-property',
  152. 'transition-timing-function',
  153. 'background-clip',
  154. 'backface-visibility',
  155. 'resize',
  156. 'appearance',
  157. 'user-select',
  158. 'interpolation-mode',
  159. 'direction',
  160. 'marks',
  161. 'page',
  162. 'set-link-source',
  163. 'unicode-bidi',
  164. 'speak'
  165. ]
  166. }
  167. };