index.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. 'selector-not-notation': null,
  26. 'import-notation': null,
  27. 'function-no-unknown': null,
  28. 'selector-class-pattern': null,
  29. 'selector-pseudo-class-no-unknown': [
  30. true,
  31. {
  32. ignorePseudoClasses: ['global', 'deep'],
  33. },
  34. ],
  35. 'selector-pseudo-element-no-unknown': [
  36. true,
  37. {
  38. ignorePseudoElements: ['v-deep'],
  39. },
  40. ],
  41. 'at-rule-no-unknown': [
  42. true,
  43. {
  44. ignoreAtRules: [
  45. 'tailwind',
  46. 'apply',
  47. 'variants',
  48. 'responsive',
  49. 'screen',
  50. 'function',
  51. 'if',
  52. 'each',
  53. 'include',
  54. 'mixin',
  55. 'extend',
  56. ],
  57. },
  58. ],
  59. 'no-empty-source': null,
  60. 'string-quotes': null,
  61. 'named-grid-areas-no-invalid': null,
  62. 'no-descending-specificity': null,
  63. 'font-family-no-missing-generic-family-keyword': null,
  64. 'rule-empty-line-before': [
  65. 'always',
  66. {
  67. ignore: ['after-comment', 'first-nested'],
  68. },
  69. ],
  70. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  71. 'order/order': [
  72. [
  73. 'dollar-variables',
  74. 'custom-properties',
  75. 'at-rules',
  76. 'declarations',
  77. {
  78. type: 'at-rule',
  79. name: 'supports',
  80. },
  81. {
  82. type: 'at-rule',
  83. name: 'media',
  84. },
  85. 'rules',
  86. ],
  87. { severity: 'error' },
  88. ],
  89. },
  90. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  91. };