.eslintrc.js 816 B

123456789101112131415161718192021222324252627282930313233
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true
  5. },
  6. 'extends': [
  7. 'plugin:vue/essential',
  8. '@vue/standard'
  9. ],
  10. rules: {
  11. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  12. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  13. // reset/ config is defind but never used。想要关闭这个提示需要在.eslintrc.js文件中修改配置:
  14. "no-unused-vars": 'off',
  15. // 去掉此项警告
  16. "indent": ["off", 2],
  17. 'space-before-function-paren': [
  18. 'error',
  19. {
  20. anonymous: 'always',
  21. named: 'always',
  22. asyncArrow: 'always',
  23. },
  24. ]
  25. },
  26. parserOptions: {
  27. parser: 'babel-eslint'
  28. },
  29. }