.eslintrc.js 2.2 KB

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