.eslintrc.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-01-07 09:49:29
  4. * @LastEditTime: 2022-04-28 18:32:51
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: \vue3-element-admin\.eslintrc.js
  8. */
  9. module.exports = {
  10. root: true,
  11. env: {
  12. node: true,
  13. "vue/setup-compiler-macros": true,
  14. },
  15. extends: [
  16. "plugin:vue/vue3-essential",
  17. "eslint:recommended",
  18. "@vue/prettier",
  19. ],
  20. parserOptions: {
  21. parser: "@babel/eslint-parser",
  22. },
  23. // "writable" 以允许重写变量,或 "readonly" 不允许重写变量
  24. globals: {
  25. XE: "readonly",
  26. VE_ENV: "readonly",
  27. VE_API: "readonly",
  28. LZ_WARNS: "readonly",
  29. },
  30. rules: {
  31. indent: [2, 4, { SwitchCase: 1 }],
  32. // "prettier/prettier": [2, { tabWidth: 4, endOfLine: "auto" }],
  33. "prettier/prettier": "off",
  34. "no-console": "warn",
  35. "no-debugger": "warn",
  36. "no-unused-vars": "off",
  37. "no-dupe-keys":"warn",
  38. "indent": "off",
  39. "no-case-declarations":"off",
  40. "no-inner-declarations":"off",
  41. "no-loss-of-precision":"off",
  42. "vue/multi-word-component-names": 0,
  43. },
  44. };