VScode单双引号、分号格式
1、settings.json中添加:
1 2 3 |
|
2、如上一步不起作用,则在项目根目录下创建.prettierrc文件:
1 2 3 4 5 |
|
或者在 .eslintrc.js中写quotes: 'off'
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// quotes: 'off'
// 使函数后没有空格
'space-before-function-paren': 'off'
}
需要npm run serve 重启