农经大屏
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

36 líneas
1.6 KiB

  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. parser: "babel-eslint",
  5. },
  6. env: {
  7. browser: true,
  8. },
  9. extends: ["plugin:vue/essential"],
  10. // required to lint *.vue files
  11. plugins: ["vue"],
  12. // add your custom rules here
  13. rules: {
  14. // quotes: [2, "single"],
  15. // "default-case": "error",
  16. // semi: [2, "always"], // 语句强制分号结尾
  17. // "key-spacing": [1, { beforeColon: false, afterColon: true }], // 对象字面量中冒号的前后空格
  18. // "no-multiple-empty-lines": [1, { max: 1 }], // 空行最多不能超过2行
  19. // "no-dupe-keys": 2, // 在创建对象字面量时不允许键重复 {a:1,a:1}
  20. // "no-spaced-func": 2, // 函数调用时 函数名与()之间不能有空格
  21. // "no-trailing-spaces": 1, // 一行结束后面不要有空格
  22. // "no-unreachable": 2, // 不能有无法执行的代码
  23. // "no-unused-vars": [2, { vars: "all", args: "after-used" }], // 不能有声明后未被使用的变量或参数
  24. // "no-var": 0, // 禁用var,用let和const代替
  25. // "comma-dangle": [2, "never"], // 对象字面量项尾不能有逗号
  26. // "comma-spacing": 1, // 逗号前后的空格
  27. // "comma-style": [2, "last"], // 逗号风格,换行时在行首还是行尾
  28. // eqeqeq: 2, // 必须使用全等
  29. // indent: [2, 2], // 缩进风格
  30. // "spaced-comment": 1, // 注释风格要不要有空格
  31. // "eol-last": 2, // 文件以单一的换行符结束
  32. // "semi-spacing": [2, { before: false, after: true }], // 分号前后空格
  33. // "arrow-spacing": 2, // =>的前/后括号
  34. },
  35. };