stylelint.config.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. module.exports = {
  2. root: true,
  3. plugins: ['stylelint-order'],
  4. processors: ['stylelint-processor-html'],
  5. extends: [
  6. 'stylelint-config-standard',
  7. 'stylelint-config-prettier',
  8. 'stylelint-config-recommended-vue/less',
  9. ],
  10. rules: {
  11. 'selector-class-pattern': null,
  12. 'selector-pseudo-class-no-unknown': [
  13. true,
  14. {
  15. ignorePseudoClasses: ['global'],
  16. },
  17. ],
  18. 'selector-pseudo-element-no-unknown': [
  19. true,
  20. {
  21. ignorePseudoElements: ['v-deep'],
  22. },
  23. ],
  24. 'at-rule-no-unknown': [
  25. true,
  26. {
  27. ignoreAtRules: [
  28. 'tailwind',
  29. 'apply',
  30. 'variants',
  31. 'responsive',
  32. 'screen',
  33. 'function',
  34. 'if',
  35. 'each',
  36. 'include',
  37. 'mixin',
  38. ],
  39. },
  40. ],
  41. 'no-empty-source': null,
  42. 'named-grid-areas-no-invalid': null,
  43. 'unicode-bom': 'never',
  44. 'no-descending-specificity': null,
  45. 'font-family-no-missing-generic-family-keyword': null,
  46. 'declaration-colon-space-after': 'always-single-line',
  47. 'declaration-colon-space-before': 'never',
  48. // 'declaration-block-trailing-semicolon': 'always',
  49. 'rule-empty-line-before': [
  50. 'always',
  51. {
  52. ignore: ['after-comment', 'first-nested'],
  53. },
  54. ],
  55. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  56. 'order/order': [
  57. [
  58. 'dollar-variables',
  59. 'custom-properties',
  60. 'at-rules',
  61. 'declarations',
  62. {
  63. type: 'at-rule',
  64. name: 'supports',
  65. },
  66. {
  67. type: 'at-rule',
  68. name: 'media',
  69. },
  70. 'rules',
  71. ],
  72. { severity: 'warning' },
  73. ],
  74. },
  75. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  76. overrides: [
  77. {
  78. files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
  79. extends: ['stylelint-config-recommended', 'stylelint-config-html'],
  80. rules: {
  81. 'keyframes-name-pattern': null,
  82. 'selector-pseudo-class-no-unknown': [
  83. true,
  84. {
  85. ignorePseudoClasses: ['deep', 'global'],
  86. },
  87. ],
  88. 'selector-pseudo-element-no-unknown': [
  89. true,
  90. {
  91. ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
  92. },
  93. ],
  94. },
  95. },
  96. ],
  97. };