vue-specific-rules.js 767 B

1234567891011121314151617181920212223242526272829
  1. "use strict"
  2. const getModuleVersion = require("./get-module-version")
  3. const semver = require("semver")
  4. const stylelintVersion = getModuleVersion("stylelint") || "14.5.0"
  5. module.exports = {
  6. "selector-pseudo-class-no-unknown": [
  7. true,
  8. {
  9. ignorePseudoClasses: ["deep", "global"],
  10. },
  11. ],
  12. "selector-pseudo-element-no-unknown": [
  13. true,
  14. {
  15. ignorePseudoElements: ["v-deep", "v-global", "v-slotted"],
  16. },
  17. ],
  18. ...(semver.gte(stylelintVersion, "14.5.0")
  19. ? {
  20. "function-no-unknown": [true, { ignoreFunctions: ["v-bind"] }],
  21. }
  22. : semver.gte(stylelintVersion, "14.4.0")
  23. ? {
  24. "function-no-unknown": null,
  25. }
  26. : {}),
  27. }