.eslintrc.js 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es2021: true,
  5. node: true
  6. },
  7. parser: 'vue-eslint-parser',
  8. extends: [
  9. 'eslint:recommended',
  10. 'plugin:vue/vue3-essential',
  11. 'plugin:@typescript-eslint/recommended',
  12. './.eslintrc-auto-import.json',
  13. 'plugin:prettier/recommended'
  14. ],
  15. parserOptions: {
  16. ecmaVersion: '2020',
  17. sourceType: 'module',
  18. parser: '@typescript-eslint/parser'
  19. },
  20. plugins: ['vue', '@typescript-eslint'],
  21. rules: {
  22. 'vue/multi-word-component-names': 'off',
  23. '@typescript-eslint/no-empty-function': 'off',
  24. '@typescript-eslint/no-explicit-any': 'off',
  25. 'vue/no-v-model-argument': 'off',
  26. '@typescript-eslint/ban-types': [
  27. 'error',
  28. {
  29. // 关闭空类型检查 {}
  30. extendDefaults: true,
  31. types: {
  32. '{}': false,
  33. Function: false
  34. }
  35. }
  36. ]
  37. },
  38. globals: {
  39. DialogOption: 'readonly',
  40. OptionType: 'readonly'
  41. }
  42. };