.eslintrc.cjs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es2021: true,
  5. node: true,
  6. },
  7. parser: "vue-eslint-parser",
  8. // https://eslint.vuejs.org/user-guide/#bundle-configurations
  9. extends: [
  10. "eslint:recommended",
  11. "plugin:vue/vue3-essential",
  12. "plugin:@typescript-eslint/recommended",
  13. "./.eslintrc-auto-import.json",
  14. ],
  15. parserOptions: {
  16. ecmaVersion: "latest",
  17. sourceType: "module",
  18. parser: "@typescript-eslint/parser",
  19. },
  20. plugins: ["vue", "@typescript-eslint"],
  21. rules: {
  22. "vue/multi-word-component-names": "off", // 关闭组件名必须多字: https://eslint.vuejs.org/rules/multi-word-component-names.html
  23. "@typescript-eslint/no-empty-function": "off", // 关闭空方法检查
  24. "@typescript-eslint/no-explicit-any": "off", // 关闭any类型的警告
  25. "vue/no-v-model-argument": "off",
  26. "@typescript-eslint/no-non-null-assertion": "off",
  27. },
  28. // https://eslint.org/docs/latest/use/configure/language-options#specifying-globals
  29. globals: {
  30. DialogOption: "readonly",
  31. OptionType: "readonly",
  32. },
  33. };