stylelint.config.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // @ts-check
  2. /** @type {import("stylelint").Config} */
  3. export default {
  4. extends: [
  5. "stylelint-config-standard",
  6. "stylelint-config-html/vue",
  7. "stylelint-config-recess-order"
  8. ],
  9. plugins: ["stylelint-scss", "stylelint-order", "stylelint-prettier"],
  10. overrides: [
  11. {
  12. files: ["**/*.(css|html|vue)"],
  13. customSyntax: "postcss-html"
  14. },
  15. {
  16. files: ["*.scss", "**/*.scss"],
  17. customSyntax: "postcss-scss",
  18. extends: [
  19. "stylelint-config-standard-scss",
  20. "stylelint-config-recommended-vue/scss"
  21. ]
  22. }
  23. ],
  24. rules: {
  25. "prettier/prettier": true,
  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", "report.html"]
  86. };