index.ts 2.3 KB

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