stylelint.config.js 2.2 KB

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