index.ts 2.1 KB

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