stylelint.config.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // @ts-check
  2. /** @type {import("stylelint").Config} */
  3. module.exports = {
  4. root: true,
  5. extends: [
  6. "stylelint-config-standard",
  7. "stylelint-config-html/vue",
  8. "stylelint-config-recess-order"
  9. ],
  10. plugins: ["stylelint-order", "stylelint-prettier", "stylelint-scss"],
  11. overrides: [
  12. {
  13. files: ["**/*.(css|html|vue)"],
  14. customSyntax: "postcss-html"
  15. },
  16. {
  17. files: ["*.scss", "**/*.scss"],
  18. customSyntax: "postcss-scss",
  19. extends: [
  20. "stylelint-config-standard-scss",
  21. "stylelint-config-recommended-vue/scss"
  22. ]
  23. }
  24. ],
  25. rules: {
  26. "selector-class-pattern": null,
  27. "no-descending-specificity": null,
  28. "scss/dollar-variable-pattern": null,
  29. "selector-pseudo-class-no-unknown": [
  30. true,
  31. {
  32. ignorePseudoClasses: ["deep", "global"]
  33. }
  34. ],
  35. "selector-pseudo-element-no-unknown": [
  36. true,
  37. {
  38. ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
  39. }
  40. ],
  41. "at-rule-no-unknown": [
  42. true,
  43. {
  44. ignoreAtRules: [
  45. "tailwind",
  46. "apply",
  47. "variants",
  48. "responsive",
  49. "screen",
  50. "function",
  51. "if",
  52. "each",
  53. "include",
  54. "mixin",
  55. "use"
  56. ]
  57. }
  58. ],
  59. "rule-empty-line-before": [
  60. "always",
  61. {
  62. ignore: ["after-comment", "first-nested"]
  63. }
  64. ],
  65. "unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
  66. "order/order": [
  67. [
  68. "dollar-variables",
  69. "custom-properties",
  70. "at-rules",
  71. "declarations",
  72. {
  73. type: "at-rule",
  74. name: "supports"
  75. },
  76. {
  77. type: "at-rule",
  78. name: "media"
  79. },
  80. "rules"
  81. ],
  82. { severity: "warning" }
  83. ]
  84. },
  85. ignoreFiles: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"]
  86. };