标签:src mod error: lock debugger cti loader fun 要求
Module Error (from ./node_modules/eslint-loader/index.js):
error: Missing space before function parentheses (space-before-function-paren) at src\components\Login.vue:30:7:
28 | <script>
29 | export default {
> 30 | data () {
| ^
31 | return {
解决方法:找到.eslintrc.js 在rules里面加上
‘space-before-function-paren‘: 0
即:
rules: {
‘no-console‘: process.env.NODE_ENV === ‘production‘ ? ‘error‘ : ‘off‘,
‘no-debugger‘: process.env.NODE_ENV === ‘production‘ ? ‘error‘ : ‘off‘,
‘space-before-function-paren‘: 0
},
解决方法:全局添加 .prettierrc 文件
{
"semi": false, //分号
"singleQuote": true //引号
}
这时再用 Vs Code 的格式化就不会右上面三种报错了
标签:src mod error: lock debugger cti loader fun 要求
原文地址:https://www.cnblogs.com/chalkbox/p/12039626.html