.eslintrc.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. plugins: [
  24. 'vue',
  25. ],
  26. // "writable" 以允许重写变量,或 "readonly" 不允许重写变量
  27. // globals: {
  28. // XE: "readonly",
  29. // VE_ENV: "readonly",
  30. // VE_API: "readonly",
  31. // LZ_WARNS: "readonly",
  32. // },
  33. rules: {
  34. indent: [2, 4, { SwitchCase: 1 }],
  35. // "prettier/prettier": [2, { tabWidth: 4, endOfLine: "auto" }],
  36. "prettier/prettier": "off",
  37. "no-console": "warn",
  38. "no-debugger": "warn",
  39. "no-unused-vars": "off",
  40. "no-dupe-keys":"warn",
  41. "indent": "off",
  42. "no-case-declarations":"off",
  43. "no-inner-declarations":"off",
  44. "no-loss-of-precision":"off",
  45. "vue/multi-word-component-names": 0,
  46. },
  47. };