index.mjs 3.4 KB

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