stylelint.config.js 2.1 KB

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