.eslintrc.js 522 B

123456789101112131415161718192021222324252627
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. browser: true
  6. },
  7. parserOptions: {
  8. // ecmaVersion: 7,
  9. // sourceType: "module",
  10. parser: "babel-eslint"
  11. },
  12. extends: [
  13. 'plugin:vue/essential'
  14. ],
  15. plugins: [
  16. 'vue'
  17. ],
  18. // 添加自定义规则
  19. rules: {
  20. // allow async-await
  21. 'generator-star-spacing': 'off',
  22. // allow debugger during development
  23. indent: 0,
  24. 'no-useless-escape': 0,
  25. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  26. }
  27. }