index.ts 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/no-unused-vars': [
  36. 'error',
  37. {
  38. argsIgnorePattern: '^_',
  39. varsIgnorePattern: '^_',
  40. },
  41. ],
  42. '@typescript-eslint/ban-ts-ignore': 'off',
  43. '@typescript-eslint/ban-ts-comment': 'off',
  44. '@typescript-eslint/ban-types': 'off',
  45. '@typescript-eslint/explicit-function-return-type': 'off',
  46. '@typescript-eslint/no-explicit-any': 'off',
  47. '@typescript-eslint/no-var-requires': 'off',
  48. '@typescript-eslint/no-empty-function': 'off',
  49. '@typescript-eslint/no-use-before-define': 'off',
  50. '@typescript-eslint/no-non-null-assertion': 'off',
  51. '@typescript-eslint/explicit-module-boundary-types': 'off',
  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. globals: { defineOptions: 'readonly' },
  89. };