.eslintrc.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. module.exports = {
  2. root: true,
  3. env: {
  4. browser: true,
  5. es2021: true,
  6. node: true,
  7. },
  8. parser: 'vue-eslint-parser',
  9. parserOptions: {
  10. ecmaVersion: 12,
  11. parser: '@typescript-eslint/parser',
  12. sourceType: 'module',
  13. },
  14. extends: ['plugin:vue/vue3-essential', 'plugin:vue/essential', 'eslint:recommended'],
  15. plugins: ['vue', '@typescript-eslint'],
  16. overrides: [
  17. ],
  18. rules: {
  19. // http://eslint.cn/docs/rules/
  20. // https://eslint.vuejs.org/rules/
  21. // https://typescript-eslint.io/rules/no-unused-vars/
  22. '@typescript-eslint/ban-ts-ignore': 'off',
  23. '@typescript-eslint/explicit-function-return-type': 'off',
  24. '@typescript-eslint/no-explicit-any': 'off',
  25. '@typescript-eslint/no-var-requires': 'off',
  26. '@typescript-eslint/no-empty-function': 'off',
  27. '@typescript-eslint/no-use-before-define': 'off',
  28. '@typescript-eslint/ban-ts-comment': 'off',
  29. '@typescript-eslint/ban-types': 'off',
  30. '@typescript-eslint/no-non-null-assertion': 'off',
  31. '@typescript-eslint/explicit-module-boundary-types': 'off',
  32. '@typescript-eslint/no-redeclare': 'error',
  33. '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
  34. '@typescript-eslint/no-unused-vars': [2],
  35. 'vue/custom-event-name-casing': 'off',
  36. 'vue/attributes-order': 'off',
  37. 'vue/one-component-per-file': 'off',
  38. 'vue/html-closing-bracket-newline': 'off',
  39. 'vue/max-attributes-per-line': 'off',
  40. 'vue/multiline-html-element-content-newline': 'off',
  41. 'vue/singleline-html-element-content-newline': 'off',
  42. 'vue/attribute-hyphenation': 'off',
  43. 'vue/html-self-closing': 'off',
  44. 'vue/no-multiple-template-root': 'off',
  45. 'vue/require-default-prop': 'off',
  46. 'vue/no-v-model-argument': 'off',
  47. 'vue/no-arrow-functions-in-watch': 'off',
  48. 'vue/no-template-key': 'off',
  49. 'vue/no-v-html': 'off',
  50. 'vue/comment-directive': 'off',
  51. 'vue/no-parsing-error': 'off',
  52. 'vue/no-deprecated-v-on-native-modifier': 'off',
  53. 'vue/multi-word-component-names': 'off',
  54. 'no-useless-escape': 'off',
  55. 'no-sparse-arrays': 'off',
  56. 'no-prototype-builtins': 'off',
  57. 'no-constant-condition': 'off',
  58. 'no-use-before-define': 'off',
  59. 'no-restricted-globals': 'off',
  60. 'no-restricted-syntax': 'off',
  61. 'generator-star-spacing': 'off',
  62. 'no-unreachable': 'off',
  63. 'no-multiple-template-root': 'off',
  64. 'no-unused-vars': 'error',
  65. 'no-v-model-argument': 'off',
  66. 'no-case-declarations': 'off',
  67. 'no-console': 'error',
  68. 'no-redeclare': 'off',
  69. },
  70. };