.eslintrc.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. browser: true,
  6. es2021: true
  7. },
  8. parserOptions: {
  9. ecmaVersion: 12,
  10. parser: '@typescript-eslint/parser',
  11. sourceType: "module",
  12. requireConfigFile: false
  13. },
  14. extends: [
  15. 'plugin:vue/vue3-recommended',
  16. 'airbnb-base'
  17. ],
  18. rules: {
  19. 'no-console': 0, // 禁用打印
  20. 'comma-dangle': [2, 'never'], // 禁止使用拖尾逗号
  21. 'no-extra-semi': 2, // 禁止不必要的分号
  22. 'array-bracket-spacing': [2, 'always'], // 指定数组的元素之间要以空格隔开
  23. 'jsx-quotes': 0, // 强制使用单引号
  24. 'max-len': 0, // 强制一行的最大长度
  25. semi: [2, 'never'], // 禁止使用分号
  26. 'linebreak-style': [0, 'error', 'windows'],
  27. 'import/no-unresolved': 0,
  28. 'import/extensions': 0,
  29. 'import/no-absolute-path': 0,
  30. 'import/no-extraneous-dependencies': 0,
  31. 'class-methods-use-this': 0,
  32. 'no-mixed-operators': 0,
  33. 'eol-last': 0,
  34. 'import/newline-after-import': 0,
  35. 'vue/multi-word-component-names': 0,
  36. 'no-param-reassign': 0,
  37. 'no-restricted-syntax': 0,
  38. 'no-underscore-dangle': 0,
  39. 'no-plusplus': 0,
  40. 'no-bitwise': 0,
  41. 'guard-for-in': 0,
  42. 'func-names': 0,
  43. 'import/order': 0,
  44. 'vue/no-deprecated-slot-attribute': 0,
  45. 'vue/v-on-event-hyphenation': 0,
  46. 'vue/no-deprecated-filter': 0,
  47. 'vue/require-explicit-emits': 0,
  48. 'vue/no-v-html': 0,
  49. 'vue/order-in-components': 0,
  50. 'no-unused-vars': 1,
  51. 'vue/no-reserved-component-names': 0
  52. }
  53. }