.eslintrc.js 611 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. extends: [
  7. 'plugin:vue/essential',
  8. 'eslint:recommended',
  9. 'plugin:prettier/recommended',
  10. ],
  11. parserOptions: {
  12. parser: 'babel-eslint',
  13. ecmaVersion: 2020,
  14. },
  15. globals: {
  16. uni: true,
  17. AMap: true,
  18. },
  19. rules: {
  20. 'no-console':
  21. process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  22. 'no-debugger':
  23. process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  24. /*
  25. * off 或 0,不启用这个规则
  26. * warn 或 1,出现问题会有警告
  27. * error 或 2,出现问题会报错
  28. * */
  29. 'vue/multi-word-component-names': 'off',
  30. },
  31. };