index.mjs 3.3 KB

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