stylelint.config.cjs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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-scss", "stylelint-order", "stylelint-prettier"],
  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. "prettier/prettier": true,
  27. "selector-class-pattern": null,
  28. "no-descending-specificity": null,
  29. "scss/dollar-variable-pattern": null,
  30. "selector-pseudo-class-no-unknown": [
  31. true,
  32. {
  33. ignorePseudoClasses: ["deep", "global"]
  34. }
  35. ],
  36. "selector-pseudo-element-no-unknown": [
  37. true,
  38. {
  39. ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
  40. }
  41. ],
  42. "at-rule-no-unknown": [
  43. true,
  44. {
  45. ignoreAtRules: [
  46. "tailwind",
  47. "apply",
  48. "variants",
  49. "responsive",
  50. "screen",
  51. "function",
  52. "if",
  53. "each",
  54. "include",
  55. "mixin",
  56. "use"
  57. ]
  58. }
  59. ],
  60. "rule-empty-line-before": [
  61. "always",
  62. {
  63. ignore: ["after-comment", "first-nested"]
  64. }
  65. ],
  66. "unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
  67. "order/order": [
  68. [
  69. "dollar-variables",
  70. "custom-properties",
  71. "at-rules",
  72. "declarations",
  73. {
  74. type: "at-rule",
  75. name: "supports"
  76. },
  77. {
  78. type: "at-rule",
  79. name: "media"
  80. },
  81. "rules"
  82. ],
  83. { severity: "warning" }
  84. ]
  85. },
  86. ignoreFiles: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx", "report.html"]
  87. };