.eslintrc.js 2.0 KB

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