stylelint.config.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. module.exports = {
  2. root: true,
  3. plugins: ["stylelint-order"],
  4. customSyntax: "postcss-html",
  5. extends: ["stylelint-config-standard", "stylelint-config-prettier"],
  6. rules: {
  7. "selector-class-pattern": null,
  8. "selector-pseudo-class-no-unknown": [
  9. true,
  10. {
  11. ignorePseudoClasses: ["global"]
  12. }
  13. ],
  14. "selector-pseudo-element-no-unknown": [
  15. true,
  16. {
  17. ignorePseudoElements: ["v-deep"]
  18. }
  19. ],
  20. "at-rule-no-unknown": [
  21. true,
  22. {
  23. ignoreAtRules: [
  24. "tailwind",
  25. "apply",
  26. "variants",
  27. "responsive",
  28. "screen",
  29. "function",
  30. "if",
  31. "each",
  32. "include",
  33. "mixin"
  34. ]
  35. }
  36. ],
  37. "no-empty-source": null,
  38. "named-grid-areas-no-invalid": null,
  39. "unicode-bom": "never",
  40. "no-descending-specificity": null,
  41. "font-family-no-missing-generic-family-keyword": null,
  42. "declaration-colon-space-after": "always-single-line",
  43. "declaration-colon-space-before": "never",
  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", "**/*.json"],
  71. overrides: [
  72. {
  73. files: ["*.vue", "**/*.vue", "*.html", "**/*.html"],
  74. extends: ["stylelint-config-recommended", "stylelint-config-html"],
  75. rules: {
  76. "keyframes-name-pattern": null,
  77. "selector-pseudo-class-no-unknown": [
  78. true,
  79. {
  80. ignorePseudoClasses: ["deep", "global"]
  81. }
  82. ],
  83. "selector-pseudo-element-no-unknown": [
  84. true,
  85. {
  86. ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
  87. }
  88. ]
  89. }
  90. }
  91. ]
  92. };