stylelint.config.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. // "customSyntax": "postcss-syntax",
  40. 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  41. 'order/order': [
  42. [
  43. 'dollar-variables',
  44. 'custom-properties',
  45. 'at-rules',
  46. 'declarations',
  47. {
  48. type: 'at-rule',
  49. name: 'supports',
  50. },
  51. {
  52. type: 'at-rule',
  53. name: 'media',
  54. },
  55. 'rules',
  56. ],
  57. { severity: 'warning' },
  58. ],
  59. },
  60. ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  61. };