quasarframework / app-extension-typescript

Add TypeScript to your existing Quasar 1.0 JS project

Home Page:https://quasar.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

solution for vscode adding semicolon in ts based single file components.

paulvanbladel opened this issue · comments

Even if in "prettier.semi": false is specified in vsCode settings json file, vscode will add semicolon in the ts part.
This can be avoided when specifying:
"vetur.format.defaultFormatterOptions": {
"prettier": {
"stylelintIntegration": true,
"eslintIntegration": true,
"semi": false,
"singleQuote": true,
"tabWidth": 2
}
}

You should install Prettier extension and add a .prettierrc file at root level with the preferred settings.
Vetur is just using prettier under the hood, unless you tell him to use another formatter or you are formatting HTML, for which the default is not Prettier.

VSCode settings.json is not the right place to put Prettier configuration

commented

@paulvanbladel Please verify if the solution suggested by @IlCallo resolves your issue and if so, close this issue.