首页 > TAG信息列表 > singlequote

报错: error Strings must use singlequote quotes

格式化代码之后会将单引号变为双引号,最后还会加上逗号,末尾的分号于是会导致三种错误:     1.Strings must use singlequote quotes---双引号 2. Extra semicolon semi ----末尾分号 3.error Unexpected trailing comma comma-dangle---逗号

修改VScode样式初始化与eslint规则产生的矛盾

{ "workbench.colorTheme": "Monokai", // "semi": false, // 分号 // "singleQuote": true, // 单引号 // "trailingComma": "none", // "window.zoomLevel": 1, // 去掉结尾的逗号 //禁止保存的时候格式化 &

报错: error Strings must use singlequote quotes

格式化代码之后会将单引号变为双引号,最后还会加上逗号,末尾的分号于是会导致三种错误: 1.Strings must use singlequote  quotes---双引号 2. Extra semicolon               semi ----末尾分号 3.error  Unexpected trailing comma     comma-dangle---逗号    

vscode格式化设置单引号和去除多余分号

1、settings.json中添加: "prettier.semi": false, // 分号 "prettier.singleQuote": true // 单引号   2、如果上面方法不行,在项目根目录下创建.prettierrc.json文件: { "singleQuote": true, "semi": false }