stylelint.config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module.exports = {
  2. root: true,
  3. plugins: ['stylelint-order'],
  4. extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
  5. rules: {
  6. 'selector-pseudo-class-no-unknown': [
  7. true,
  8. {
  9. ignorePseudoClasses: ['global'],
  10. },
  11. ],
  12. 'selector-pseudo-element-no-unknown': [
  13. true,
  14. {
  15. ignorePseudoElements: ['v-deep'],
  16. ignorePseudoElements: ['deep'],
  17. },
  18. ],
  19. 'at-rule-no-unknown': [
  20. true,
  21. {
  22. ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen', 'function', 'if', 'each', 'include', 'mixin'],
  23. },
  24. ],
  25. 'no-empty-source': null,
  26. 'named-grid-areas-no-invalid': null,
  27. 'unicode-bom': 'never',
  28. 'no-descending-specificity': null,
  29. 'font-family-no-missing-generic-family-keyword': null,
  30. 'declaration-colon-space-after': 'always-single-line',
  31. 'declaration-colon-space-before': 'never',
  32. // 'declaration-block-trailing-semicolon': 'always',
  33. 'rule-empty-line-before': [
  34. 'always',
  35. {
  36. ignore: ['after-comment', 'first-nested'],
  37. },
  38. ],
  39. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  40. 'order/order': [
  41. [
  42. 'dollar-variables',
  43. 'custom-properties',
  44. 'at-rules',
  45. 'declarations',
  46. {
  47. type: 'at-rule',
  48. name: 'supports',
  49. },
  50. {
  51. type: 'at-rule',
  52. name: 'media',
  53. },
  54. 'rules',
  55. ],
  56. { severity: 'warning' },
  57. ],
  58. },
  59. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  60. };