index.mjs 3.0 KB

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