.eslintrc.cjs 988 B

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