stylelint.config.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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: [
  23. 'tailwind',
  24. 'apply',
  25. 'variants',
  26. 'responsive',
  27. 'screen',
  28. 'function',
  29. 'if',
  30. 'each',
  31. 'include',
  32. 'mixin',
  33. ],
  34. },
  35. ],
  36. 'no-empty-source': null,
  37. 'named-grid-areas-no-invalid': null,
  38. 'unicode-bom': 'never',
  39. 'no-descending-specificity': null,
  40. 'font-family-no-missing-generic-family-keyword': null,
  41. 'declaration-colon-space-after': 'always-single-line',
  42. 'declaration-colon-space-before': 'never',
  43. // 'declaration-block-trailing-semicolon': 'always',
  44. 'rule-empty-line-before': [
  45. 'always',
  46. {
  47. ignore: ['after-comment', 'first-nested'],
  48. },
  49. ],
  50. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  51. 'order/order': [
  52. [
  53. 'dollar-variables',
  54. 'custom-properties',
  55. 'at-rules',
  56. 'declarations',
  57. {
  58. type: 'at-rule',
  59. name: 'supports',
  60. },
  61. {
  62. type: 'at-rule',
  63. name: 'media',
  64. },
  65. 'rules',
  66. ],
  67. { severity: 'warning' },
  68. ],
  69. },
  70. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  71. };