Home>Article>Development Tools> Solve the problems that occur after saving in vscode format
Modify the settings.json file configuration
1. The problem of spaces being deleted after functions after formatting
"vetur.format.defaultFormatter.js": "vscode-typescript", "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
2. Code indentation
"vetur.format.options.tabSize": 4,
3.Single quotes become double quotes after saving
"prettier": { // Prettier option here "semi": false, "singleQuote": true //单引号问题 } },
There are also crude solutions:
1. Just remove the ESlint configuration code in the file in webpack.config.js. If it is in a vue project, we need Open the build folder in the project root directory and open the webpack.base.conf.js file in the folder, and then remove the ESlint configuration code in the file
2. Modify the following configuration
{ "editor.formatOnType": false, "editor.formatOnSave": false }
If there is still a problem with the formatting code when saving after saving, you need to disable the JS-CSS-HTML Formatter plug-in and run it perfectly. When formatting, use Alt shift f to format
Related recommendations : "vscode tutorial"
The above is the detailed content of Solve the problems that occur after saving in vscode format. For more information, please follow other related articles on the PHP Chinese website!