In vs code's vue-cli project, the vetur plug-in is installed, resulting in all * .js formatting in the vue-cli project with 2 spaces?

after vs code installs the vetur plug-in, all the * .js file formats in the vue-cli project are aligned with 2 spaces. I usually use 4 spaces. In the configuration, I set "editor.tabSize": 4, all files for non-vue projects * .js, * .html,*.css, etc., are aligned with 4 spaces, but in the vue-cli project, I configure

.
"vetur.format.defaultFormatter.html": "prettier", 
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.styleInitialIndent": true,
"prettier.tabWidth": 4,

after vs code has configured the above configuration, html,css, in vue-cli and js embedded in * .vue all have 4 spaces aligned, but in vue-cli * .js, js code formatting has only 2 spaces aligned. This vetur uses the prettier plug-in, and there is no clue in the prettier plug-in in vue-cli "s node_modules. Do you know what"s going on? thank you!


check to see if there are these three files under the project, .editorconfig, .prettierrc, .jsscientitifyrc
if so, it is very likely that there is an interval format in the configuration.

Menu