stylelint.config.mjs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. rules: {
  28. 'scss/at-rule-no-unknown': [
  29. true,
  30. {
  31. ignoreAtRules: [
  32. 'extends',
  33. 'ignores',
  34. 'include',
  35. 'mixin',
  36. 'if',
  37. 'else',
  38. 'media',
  39. 'for',
  40. 'at-root',
  41. 'tailwind',
  42. 'apply',
  43. 'variants',
  44. 'responsive',
  45. 'screen',
  46. 'function',
  47. 'each',
  48. 'use',
  49. 'forward',
  50. 'return',
  51. ],
  52. },
  53. ],
  54. },
  55. },
  56. ],
  57. plugins: [
  58. 'stylelint-order',
  59. '@stylistic/stylelint-plugin',
  60. 'stylelint-prettier',
  61. 'stylelint-scss',
  62. ],
  63. rules: {
  64. 'at-rule-no-unknown': [
  65. true,
  66. {
  67. ignoreAtRules: [
  68. 'extends',
  69. 'ignores',
  70. 'include',
  71. 'mixin',
  72. 'if',
  73. 'else',
  74. 'media',
  75. 'for',
  76. 'at-root',
  77. 'tailwind',
  78. 'apply',
  79. 'variants',
  80. 'responsive',
  81. 'screen',
  82. 'function',
  83. 'each',
  84. 'use',
  85. 'forward',
  86. 'return',
  87. ],
  88. },
  89. ],
  90. 'font-family-no-missing-generic-family-keyword': null,
  91. 'function-no-unknown': null,
  92. 'import-notation': null,
  93. 'media-feature-range-notation': null,
  94. 'named-grid-areas-no-invalid': null,
  95. 'no-descending-specificity': null,
  96. 'no-empty-source': null,
  97. 'order/order': [
  98. [
  99. 'dollar-variables',
  100. 'custom-properties',
  101. 'at-rules',
  102. 'declarations',
  103. {
  104. name: 'supports',
  105. type: 'at-rule',
  106. },
  107. {
  108. name: 'media',
  109. type: 'at-rule',
  110. },
  111. {
  112. name: 'include',
  113. type: 'at-rule',
  114. },
  115. 'rules',
  116. ],
  117. { severity: 'error' },
  118. ],
  119. 'prettier/prettier': true,
  120. 'rule-empty-line-before': [
  121. 'always',
  122. {
  123. ignore: ['after-comment', 'first-nested'],
  124. },
  125. ],
  126. 'scss/at-rule-no-unknown': [
  127. true,
  128. {
  129. ignoreAtRules: [
  130. 'extends',
  131. 'ignores',
  132. 'include',
  133. 'mixin',
  134. 'if',
  135. 'else',
  136. 'media',
  137. 'for',
  138. 'at-root',
  139. 'tailwind',
  140. 'apply',
  141. 'variants',
  142. 'responsive',
  143. 'screen',
  144. 'function',
  145. 'each',
  146. 'use',
  147. 'forward',
  148. 'return',
  149. ],
  150. },
  151. ],
  152. 'scss/operator-no-newline-after': null,
  153. 'selector-class-pattern':
  154. '^(?:(?: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]+)*)?(?:[.+])?$',
  155. 'selector-not-notation': null,
  156. 'declaration-property-value-no-unknown': [
  157. true,
  158. { ignoreProperties: { '/.+/': '/(v-bind(.*))|($.*)/' } },
  159. ],
  160. 'value-keyword-case': null,
  161. },
  162. }