stylelint.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. 'named-grid-areas-no-invalid': null,
  20. 'unicode-bom': 'never',
  21. 'no-descending-specificity': null,
  22. 'font-family-no-missing-generic-family-keyword': null,
  23. 'declaration-colon-space-after': 'always-single-line',
  24. 'declaration-colon-space-before': 'never',
  25. 'declaration-block-trailing-semicolon': 'always',
  26. 'rule-empty-line-before': [
  27. 'always',
  28. {
  29. ignore: ['after-comment', 'first-nested'],
  30. },
  31. ],
  32. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  33. 'order/order': [
  34. [
  35. 'dollar-variables',
  36. 'custom-properties',
  37. 'at-rules',
  38. 'declarations',
  39. {
  40. type: 'at-rule',
  41. name: 'supports',
  42. },
  43. {
  44. type: 'at-rule',
  45. name: 'media',
  46. },
  47. 'rules',
  48. ],
  49. { severity: 'warning' },
  50. ],
  51. // Specify the alphabetical order of the attributes in the declaration block
  52. 'order/properties-order': [
  53. 'position',
  54. 'top',
  55. 'right',
  56. 'bottom',
  57. 'left',
  58. 'z-index',
  59. 'display',
  60. 'float',
  61. 'width',
  62. 'height',
  63. 'max-width',
  64. 'max-height',
  65. 'min-width',
  66. 'min-height',
  67. 'padding',
  68. 'padding-top',
  69. 'padding-right',
  70. 'padding-bottom',
  71. 'padding-left',
  72. 'margin',
  73. 'margin-top',
  74. 'margin-right',
  75. 'margin-bottom',
  76. 'margin-left',
  77. 'margin-collapse',
  78. 'margin-top-collapse',
  79. 'margin-right-collapse',
  80. 'margin-bottom-collapse',
  81. 'margin-left-collapse',
  82. 'overflow',
  83. 'overflow-x',
  84. 'overflow-y',
  85. 'clip',
  86. 'clear',
  87. 'font',
  88. 'font-family',
  89. 'font-size',
  90. 'font-smoothing',
  91. 'osx-font-smoothing',
  92. 'font-style',
  93. 'font-weight',
  94. 'hyphens',
  95. 'src',
  96. 'line-height',
  97. 'letter-spacing',
  98. 'word-spacing',
  99. 'color',
  100. 'text-align',
  101. 'text-decoration',
  102. 'text-indent',
  103. 'text-overflow',
  104. 'text-rendering',
  105. 'text-size-adjust',
  106. 'text-shadow',
  107. 'text-transform',
  108. 'word-break',
  109. 'word-wrap',
  110. 'white-space',
  111. 'vertical-align',
  112. 'list-style',
  113. 'list-style-type',
  114. 'list-style-position',
  115. 'list-style-image',
  116. 'pointer-events',
  117. 'cursor',
  118. 'background',
  119. 'background-attachment',
  120. 'background-color',
  121. 'background-image',
  122. 'background-position',
  123. 'background-repeat',
  124. 'background-size',
  125. 'border',
  126. 'border-collapse',
  127. 'border-top',
  128. 'border-right',
  129. 'border-bottom',
  130. 'border-left',
  131. 'border-color',
  132. 'border-image',
  133. 'border-top-color',
  134. 'border-right-color',
  135. 'border-bottom-color',
  136. 'border-left-color',
  137. 'border-spacing',
  138. 'border-style',
  139. 'border-top-style',
  140. 'border-right-style',
  141. 'border-bottom-style',
  142. 'border-left-style',
  143. 'border-width',
  144. 'border-top-width',
  145. 'border-right-width',
  146. 'border-bottom-width',
  147. 'border-left-width',
  148. 'border-radius',
  149. 'border-top-right-radius',
  150. 'border-bottom-right-radius',
  151. 'border-bottom-left-radius',
  152. 'border-top-left-radius',
  153. 'border-radius-topright',
  154. 'border-radius-bottomright',
  155. 'border-radius-bottomleft',
  156. 'border-radius-topleft',
  157. 'content',
  158. 'quotes',
  159. 'outline',
  160. 'outline-offset',
  161. 'opacity',
  162. 'filter',
  163. 'visibility',
  164. 'size',
  165. 'zoom',
  166. 'transform',
  167. 'box-align',
  168. 'box-flex',
  169. 'box-orient',
  170. 'box-pack',
  171. 'box-shadow',
  172. 'box-sizing',
  173. 'table-layout',
  174. 'animation',
  175. 'animation-delay',
  176. 'animation-duration',
  177. 'animation-iteration-count',
  178. 'animation-name',
  179. 'animation-play-state',
  180. 'animation-timing-function',
  181. 'animation-fill-mode',
  182. 'transition',
  183. 'transition-delay',
  184. 'transition-duration',
  185. 'transition-property',
  186. 'transition-timing-function',
  187. 'background-clip',
  188. 'backface-visibility',
  189. 'resize',
  190. 'appearance',
  191. 'user-select',
  192. 'interpolation-mode',
  193. 'direction',
  194. 'marks',
  195. 'page',
  196. 'set-link-source',
  197. 'unicode-bidi',
  198. 'speak',
  199. ],
  200. },
  201. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  202. };