VScode automatically remove excess semicolon

Discovery does not automatically remove the extra semicolon VScode automatic formatting, tried out online search will not work, so look carefully studied the setup options that he do a good job.

//关键是前4句
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, //函数名与()之间自动保持一个空格
"javascript.format.semicolons": "remove",
"typescript.format.semicolons": "remove",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html", //格式化html的方式
"vetur.format.defaultFormatterOptions": {
    "wrap_attributes": "force-aligned", //属性强制换行
    "insertSpaceBeforeFunctionParenthesis": true,
    "prettier": {
        "semi": false, //结尾不加分号
        "singleQuote": true //使用单引号替换双引号
    }
},

 

Released seven original articles · won praise 9 · views 7017

Guess you like

Origin blog.csdn.net/NewTWG/article/details/104523448