stylelint.config.js 1.4 KB

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