.eslintrc.js 937 B

12345678910111213141516171819202122232425262728293031
  1. // eslint-disable-next-line no-undef
  2. module.exports = {
  3. env: {
  4. browser: true,
  5. es2021: true, // 添加所有 ECMAScript 2021 全局变量并自动将 ecmaVersion 解析器选项设置为 12
  6. node: true,
  7. 'vue/setup-compiler-macros': true,
  8. },
  9. plugins: ['@typescript-eslint'],
  10. parser: 'vue-eslint-parser',
  11. parserOptions: {
  12. ecmaVersion: 'lasted',
  13. parser: '@typescript-eslint/parser',
  14. sourceType: 'module',
  15. ecmaFeatures: {
  16. jsx: true,
  17. },
  18. },
  19. extends: ['prettier', 'eslint:recommended', 'plugin:vue/vue3-recommended'],
  20. rules: {
  21. // override/add rules settings here, such as:
  22. // 'vue/no-unused-vars': 'error'
  23. // Enable vue/script-setup-uses-vars rule
  24. 'vue/script-setup-uses-vars': 'error',
  25. 'vue/no-lone-template': 0,
  26. 'vue/singleline-html-element-content-newline': 0,
  27. 'vue/valid-attribute-name': 0,
  28. 'vue/html-self-closing': 0,
  29. 'vue/html-indent': 0,
  30. },
  31. }