index.ts 2.6 KB

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