VUE踩坑
问题1:expected indentation of 0 spaces but found 2 .
解决方案:
1.打开 /config/index.js文件 ,找到:
// 将 true更改为false即可
useEslint: false,
2.打开根目录下的/.eslintrc.js文件,找到:
// add your custom rules here
rules: {
// allow async-await
// 配置如下
'generator-star-spacing': 'off',
'indent': ['off', 0],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
问题2:Missing space before function parentheses
解决方案:
打开根目录下的/.eslintrc.js文件,找到:
// add your custom rules here
rules: {
// allow async-await
// 配置如下
"space-before-function-paren": 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
浙公网安备 33010602011771号