stylelint.config.mjs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. export default {
  2. extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
  3. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts', '**/*.json', '**/*.md'],
  4. overrides: [
  5. {
  6. customSyntax: 'postcss-html',
  7. files: ['*.(html|vue)', '**/*.(html|vue)'],
  8. rules: {
  9. 'selector-pseudo-class-no-unknown': [
  10. true,
  11. {
  12. ignorePseudoClasses: ['global', 'deep'],
  13. },
  14. ],
  15. 'selector-pseudo-element-no-unknown': [
  16. true,
  17. {
  18. ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
  19. },
  20. ],
  21. },
  22. },
  23. {
  24. customSyntax: 'postcss-scss',
  25. extends: ['stylelint-config-recommended-scss', 'stylelint-config-recommended-vue/scss'],
  26. files: ['*.scss', '**/*.scss'],
  27. },
  28. ],
  29. plugins: [
  30. 'stylelint-order',
  31. '@stylistic/stylelint-plugin',
  32. 'stylelint-prettier',
  33. 'stylelint-scss',
  34. ],
  35. rules: {
  36. 'at-rule-no-deprecated': null,
  37. 'at-rule-no-unknown': [
  38. true,
  39. {
  40. ignoreAtRules: [
  41. 'extends',
  42. 'ignores',
  43. 'include',
  44. 'mixin',
  45. 'if',
  46. 'else',
  47. 'media',
  48. 'for',
  49. 'at-root',
  50. 'tailwind',
  51. 'apply',
  52. 'variants',
  53. 'responsive',
  54. 'screen',
  55. 'function',
  56. 'each',
  57. 'use',
  58. 'forward',
  59. 'return',
  60. ],
  61. },
  62. ],
  63. 'font-family-no-missing-generic-family-keyword': null,
  64. 'function-no-unknown': null,
  65. 'import-notation': null,
  66. 'media-feature-range-notation': null,
  67. 'named-grid-areas-no-invalid': null,
  68. 'no-descending-specificity': null,
  69. 'no-empty-source': null,
  70. 'order/order': [
  71. [
  72. 'dollar-variables',
  73. 'custom-properties',
  74. 'at-rules',
  75. 'declarations',
  76. {
  77. name: 'supports',
  78. type: 'at-rule',
  79. },
  80. {
  81. name: 'media',
  82. type: 'at-rule',
  83. },
  84. {
  85. name: 'include',
  86. type: 'at-rule',
  87. },
  88. 'rules',
  89. ],
  90. { severity: 'error' },
  91. ],
  92. 'prettier/prettier': true,
  93. 'rule-empty-line-before': [
  94. 'always',
  95. {
  96. ignore: ['after-comment', 'first-nested'],
  97. },
  98. ],
  99. 'scss/at-rule-no-unknown': [
  100. true,
  101. {
  102. ignoreAtRules: [
  103. 'extends',
  104. 'ignores',
  105. 'include',
  106. 'mixin',
  107. 'if',
  108. 'else',
  109. 'media',
  110. 'for',
  111. 'at-root',
  112. 'tailwind',
  113. 'apply',
  114. 'variants',
  115. 'responsive',
  116. 'screen',
  117. 'function',
  118. 'each',
  119. 'use',
  120. 'forward',
  121. 'return',
  122. ],
  123. },
  124. ],
  125. 'scss/operator-no-newline-after': null,
  126. 'selector-class-pattern':
  127. '^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:[.+])?$',
  128. 'selector-not-notation': null,
  129. 'declaration-property-value-no-unknown': [
  130. true,
  131. { ignoreProperties: { '/.+/': '/(v-bind(.*))|($.*)/' } },
  132. ],
  133. 'value-keyword-case': null,
  134. },
  135. }