.stylelintrc.mjs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. export default {
  2. extends: [
  3. 'stylelint-config-standard',
  4. 'stylelint-config-standard-scss',
  5. 'stylelint-config-recommended-less',
  6. ],
  7. plugins: ['stylelint-order'],
  8. ignoreFiles: ['dist/**/*', 'public/**/*', '**/node_modules/**/*'],
  9. rules: {
  10. 'selector-class-pattern': null,
  11. 'selector-pseudo-class-no-unknown': [
  12. true,
  13. {
  14. ignorePseudoClasses: ['global'],
  15. },
  16. ],
  17. 'selector-pseudo-element-no-unknown': [
  18. true,
  19. {
  20. ignorePseudoElements: ['v-deep'],
  21. },
  22. ],
  23. 'at-rule-no-unknown': null,
  24. 'scss/at-rule-no-unknown': [
  25. true,
  26. {
  27. ignoreAtRules: [
  28. 'tailwind',
  29. 'apply',
  30. 'variants',
  31. 'responsive',
  32. 'screen',
  33. 'function',
  34. 'if',
  35. 'each',
  36. 'include',
  37. 'mixin',
  38. 'layer',
  39. ],
  40. },
  41. ],
  42. 'no-empty-source': null,
  43. 'string-quotes': null,
  44. 'named-grid-areas-no-invalid': null,
  45. 'no-descending-specificity': null,
  46. 'font-family-no-missing-generic-family-keyword': null,
  47. 'rule-empty-line-before': [
  48. 'always',
  49. {
  50. ignore: ['after-comment', 'first-nested'],
  51. },
  52. ],
  53. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  54. 'order/order': [
  55. [
  56. 'dollar-variables',
  57. 'custom-properties',
  58. 'at-rules',
  59. 'declarations',
  60. {
  61. type: 'at-rule',
  62. name: 'supports',
  63. },
  64. {
  65. type: 'at-rule',
  66. name: 'media',
  67. },
  68. 'rules',
  69. ],
  70. { severity: 'warning' },
  71. ],
  72. 'color-function-notation': null,
  73. 'alpha-value-notation': null,
  74. 'scss/dollar-variable-colon-space-after': 'always-single-line',
  75. 'scss/dollar-variable-empty-line-before': null,
  76. 'less/color-no-invalid-hex': null,
  77. },
  78. overrides: [
  79. {
  80. files: ['*.less', '**/*.less'],
  81. customSyntax: 'postcss-less',
  82. rules: {
  83. 'at-rule-no-unknown': null,
  84. },
  85. },
  86. {
  87. files: ['*.scss', '**/*.scss'],
  88. customSyntax: 'postcss-scss',
  89. rules: {
  90. 'at-rule-no-unknown': null,
  91. },
  92. },
  93. ],
  94. };