
VS Code settings.json:
"prettier.semi": false,
"prettier.jsxSingleQuote": true,
"prettier.trailingComma": "all",
"prettier.eslintIntegration": true,
"prettier.singleQuote": true,
"prettier.tabWidth": 4,
"prettier.useTabs": true,
"vetur.format.options.useTabs": true,
"vetur.format.options.tabSize": 4,
"vetur.format.scriptInitialIndent": true,
"vetur.format.styleInitialIndent": true,
Just started recently without any known changes. Only affecting .vue files (prettier works fine in .js files).
you can use .prettierrc file at project root.
or
"vetur.format.defaultFormatterOptions": {
"prettier": {
// Prettier option here
"semi": false
}
}
you can use
.prettierrcfile at project root.
or"vetur.format.defaultFormatterOptions": { "prettier": { // Prettier option here "semi": false } }
I really didn't want to have a .prettierrc file for every project, so second option is perfect. Thanks for your help.
@xon52 any chance of this being added to the FAQ? I went around in circles trying to figure out how to fix it before finding this issue and applying the fix in "settings.json".
I ask because I thought that Vetur would pickup on the existing "prettier.semi": false, setting, but found out the hard way it is controlled via vetur.format.defaultFormatterOptions block. It just wasn't immediately obvious.
@TerraTech Wanna send a PR to clarify https://vuejs.github.io/vetur/formatting.html#settings? I'd be happy to review it. File to change: https://github.com/vuejs/vetur/blob/master/docs/formatting.md
Most helpful comment
you can use
.prettierrcfile at project root.or