.eslintrc.js 2.0 KB

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