index.ts 2.2 KB

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