.eslintrc.js 470 B

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