平安校园
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

41 righe
2.1 KiB

  1. // @see: https://stylelint.io
  2. module.exports = {
  3. root: true,
  4. // 继承某些已有的规则
  5. extends: [
  6. "stylelint-config-standard", // 配置 stylelint 拓展插件
  7. "stylelint-config-html/vue", // 配置 vue 中 template 样式格式化
  8. "stylelint-config-standard-scss", // 配置 stylelint scss 插件
  9. "stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化
  10. "stylelint-config-recess-order" // 配置 stylelint css 属性书写顺序插件,
  11. ],
  12. overrides: [
  13. // 扫描 .vue/html 文件中的 <style> 标签内的样式
  14. {
  15. files: ["**/*.{vue,html}"],
  16. customSyntax: "postcss-html"
  17. }
  18. ],
  19. rules: {
  20. "function-url-quotes": "always", // URL 的引号 "always(必须加上引号)"|"never(没有引号)"
  21. "color-hex-length": "long", // 指定 16 进制颜色的简写或扩写 "short(16进制简写)"|"long(16进制扩写)"
  22. "rule-empty-line-before": "never", // 要求或禁止在规则之前的空行 "always(规则之前必须始终有一个空行)"|"never(规则前绝不能有空行)"|"always-multi-line(多行规则之前必须始终有一个空行)"|"never-multi-line(多行规则之前绝不能有空行)"
  23. "font-family-no-missing-generic-family-keyword": null, // 禁止在字体族名称列表中缺少通用字体族关键字
  24. "scss/at-import-partial-extension": null, // 解决不能使用 @import 引入 scss 文件
  25. "property-no-unknown": null, // 禁止未知的属性
  26. "no-empty-source": null, // 禁止空源码
  27. "selector-class-pattern": null, // 强制选择器类名的格式
  28. "value-no-vendor-prefix": null, // 关闭 vendor-prefix (为了解决多行省略 -webkit-box)
  29. "no-descending-specificity": null, // 不允许较低特异性的选择器出现在覆盖较高特异性的选择器
  30. "value-keyword-case": null, // 解决在 scss 中使用 v-bind 大写单词报错
  31. "selector-pseudo-class-no-unknown": [
  32. true,
  33. {
  34. ignorePseudoClasses: ["global", "v-deep", "deep"]
  35. }
  36. ]
  37. },
  38. ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"]
  39. };