在使用 Vuex中,下载了,Prettier - Code formatter 自动格式化,需要做如下配置
需要在文件的根目录创建 .prettierrc 进行配置
{
"semi": false,
"singleQuote": true,
"trailingComma": "none"
}
使用eslint 根据报错
.eslintrc.js
在 rules中进行添加命令
可以忽略函数前的空格
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'space-before-function-paren': 0
},