stylelint.config.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. module.exports = {
  2. root: true,
  3. extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
  4. plugins: ['stylelint-order', 'stylelint-prettier'],
  5. // customSyntax: 'postcss-html',
  6. overrides: [
  7. {
  8. files: ['**/*.(css|html|vue)'],
  9. customSyntax: 'postcss-html',
  10. },
  11. {
  12. files: ['*.less', '**/*.less'],
  13. customSyntax: 'postcss-less',
  14. extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
  15. },
  16. ],
  17. rules: {
  18. 'prettier/prettier': true,
  19. 'at-rule-no-unknown': null,
  20. 'selector-not-notation': null,
  21. 'import-notation': null,
  22. 'function-no-unknown': null,
  23. 'selector-class-pattern': null,
  24. 'selector-pseudo-class-no-unknown': [
  25. true,
  26. {
  27. ignorePseudoClasses: ['global', 'deep'],
  28. },
  29. ],
  30. 'selector-pseudo-element-no-unknown': [
  31. true,
  32. {
  33. ignorePseudoElements: ['v-deep'],
  34. },
  35. ],
  36. 'media-feature-range-notation': null,
  37. 'no-empty-source': null,
  38. 'string-quotes': null,
  39. 'named-grid-areas-no-invalid': null,
  40. 'no-descending-specificity': null,
  41. 'font-family-no-missing-generic-family-keyword': null,
  42. 'rule-empty-line-before': [
  43. 'always',
  44. {
  45. ignore: ['after-comment', 'first-nested'],
  46. },
  47. ],
  48. 'order/order': [
  49. [
  50. 'dollar-variables',
  51. 'custom-properties',
  52. 'at-rules',
  53. 'declarations',
  54. {
  55. type: 'at-rule',
  56. name: 'supports',
  57. },
  58. {
  59. type: 'at-rule',
  60. name: 'media',
  61. },
  62. {
  63. type: 'at-rule',
  64. name: 'include',
  65. },
  66. 'rules',
  67. ],
  68. { severity: 'error' },
  69. ],
  70. },
  71. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  72. }