.eslintrc.js 1.4 KB

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