.eslintrc.js 947 B

123456789101112131415161718192021222324252627282930
  1. module.exports = {
  2. root: true,
  3. 'extends': [
  4. 'plugin:vue/essential',
  5. '@vue/standard'
  6. ],
  7. rules: {
  8. 'indent': ['off', 4],
  9. 'generator-star-spacing': 'off',
  10. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  11. 'vue/no-parsing-error': [2, {
  12. 'x-invalid-end-tag': false
  13. }],
  14. 'no-undef': 'off',
  15. 'vue/no-async-in-computed-properties': 'off',
  16. 'vue/no-parsing-error': [2, { "x-invalid-end-tag": false }],
  17. 'camelcase': 'off',
  18. 'no-unused-vars': 'off',
  19. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  20. // 要求 switch 语句中有 default 分支
  21. 'default-case': 'error',
  22. 'comma-dangle': 'off',
  23. 'no-var': 'error',
  24. 'spaced-comment': 'off',
  25. 'space-before-function-paren': 'off'
  26. },
  27. parserOptions: {
  28. parser: 'babel-eslint'
  29. }
  30. }