.eslintrc.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * @Author: your name
  3. * @Date: 2021-11-29 13:45:00
  4. * @LastEditTime: 2022-04-11 14:48:09
  5. * @LastEditors: Please set LastEditors
  6. * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7. * @FilePath: \vue3_ts_init\.eslintrc.js
  8. */
  9. module.exports = {
  10. root: true,
  11. env: {
  12. node: true,
  13. },
  14. extends: [
  15. "plugin:vue/vue3-essential",
  16. "eslint:recommended",
  17. "@vue/typescript/recommended",
  18. ],
  19. parserOptions: {
  20. ecmaVersion: 2020,
  21. },
  22. rules: {
  23. "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
  24. "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
  25. "@typescript-eslint/no-explicit-any": ["off"],
  26. "@typescript-eslint/no-empty-function": ["off"],
  27. "no-undef": ["off"],
  28. "@typescript-eslint/explicit-module-boundary-types": ["off"],
  29. "@typescript-eslint/no-unused-vars": ["off"],
  30. "no-self-assign": ["off"],
  31. "@typescript-eslint/no-var-requires": 0,
  32. "@typescript-eslint/ban-ts-comment": "off",
  33. },
  34. overrides: [
  35. {
  36. files: [
  37. "**/__tests__/*.{j,t}s?(x)",
  38. "**/tests/unit/**/*.spec.{j,t}s?(x)",
  39. ],
  40. env: {
  41. mocha: true,
  42. },
  43. },
  44. ],
  45. };