.eslintrc.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/no-setup-props-destructure': 'off',
  28. 'vue/script-setup-uses-vars': 'error',
  29. 'vue/no-reserved-component-names': 'off',
  30. '@typescript-eslint/ban-ts-ignore': 'off',
  31. '@typescript-eslint/explicit-function-return-type': 'off',
  32. '@typescript-eslint/no-explicit-any': 'off',
  33. '@typescript-eslint/no-var-requires': 'off',
  34. '@typescript-eslint/no-empty-function': 'off',
  35. 'vue/custom-event-name-casing': 'off',
  36. 'no-use-before-define': 'off',
  37. '@typescript-eslint/no-use-before-define': 'off',
  38. '@typescript-eslint/ban-ts-comment': 'off',
  39. '@typescript-eslint/ban-types': 'off',
  40. '@typescript-eslint/no-non-null-assertion': 'off',
  41. '@typescript-eslint/explicit-module-boundary-types': 'off',
  42. '@typescript-eslint/no-unused-vars': 'off',
  43. 'no-unused-vars': 'off',
  44. 'space-before-function-paren': 'off',
  45. 'vue/attributes-order': 'off',
  46. 'vue/one-component-per-file': 'off',
  47. 'vue/html-closing-bracket-newline': 'off',
  48. 'vue/max-attributes-per-line': 'off',
  49. 'vue/multiline-html-element-content-newline': 'off',
  50. 'vue/singleline-html-element-content-newline': 'off',
  51. 'vue/attribute-hyphenation': 'off',
  52. 'vue/require-default-prop': 'off',
  53. 'vue/require-explicit-emits': 'off',
  54. 'vue/html-self-closing': [
  55. 'error',
  56. {
  57. html: {
  58. void: 'always',
  59. normal: 'never',
  60. component: 'always'
  61. },
  62. svg: 'always',
  63. math: 'always'
  64. }
  65. ],
  66. 'vue/multi-word-component-names': 'off',
  67. 'vue/no-v-html': 'off'
  68. }
  69. })