.eslintrc.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module.exports = {
  2. root: true,
  3. env: {
  4. browser: true,
  5. node: true,
  6. es6: true,
  7. },
  8. parser: 'vue-eslint-parser',
  9. parserOptions: {
  10. parser: '@typescript-eslint/parser',
  11. ecmaVersion: 2020,
  12. sourceType: 'module',
  13. jsxPragma: 'React',
  14. ecmaFeatures: {
  15. jsx: true,
  16. },
  17. },
  18. extends: ['plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
  19. rules: {
  20. 'vue/script-setup-uses-vars': 'error',
  21. '@typescript-eslint/ban-ts-ignore': 'off',
  22. '@typescript-eslint/explicit-function-return-type': 'off',
  23. '@typescript-eslint/no-explicit-any': 'off',
  24. '@typescript-eslint/no-var-requires': 'off',
  25. '@typescript-eslint/no-empty-function': 'off',
  26. 'vue/custom-event-name-casing': 'off',
  27. 'no-use-before-define': 'off',
  28. '@typescript-eslint/no-use-before-define': 'off',
  29. '@typescript-eslint/ban-ts-comment': 'off',
  30. '@typescript-eslint/ban-types': 'off',
  31. '@typescript-eslint/no-non-null-assertion': 'off',
  32. '@typescript-eslint/explicit-module-boundary-types': 'off',
  33. 'no-unused-vars': 'off',
  34. '@typescript-eslint/no-unused-vars': 'error',
  35. 'space-before-function-paren': 'off',
  36. 'vue/multi-word-component-names': 'off',
  37. 'vue/attributes-order': 'off',
  38. 'vue/one-component-per-file': 'off',
  39. 'vue/html-closing-bracket-newline': 'off',
  40. 'vue/max-attributes-per-line': 'off',
  41. 'vue/multiline-html-element-content-newline': 'off',
  42. 'vue/singleline-html-element-content-newline': 'off',
  43. 'vue/attribute-hyphenation': 'off',
  44. 'vue/require-default-prop': 'off',
  45. 'vue/html-self-closing': [
  46. 'warn',
  47. {
  48. html: {
  49. void: 'always',
  50. normal: 'never',
  51. component: 'always',
  52. },
  53. svg: 'always',
  54. math: 'always',
  55. },
  56. ],
  57. },
  58. };