stylelint.config.js 1.6 KB

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