My code looks like this
import { ApiController, Controller } from "./lib/rest";
[Controller("test")];
export class TestController extends ApiController {}
Here vscode inserts the trailing comma after the decorator
[Controller("test")];
I couldn't figure out how to disable this behaviour only for decorators.
Please help me on this.
There is a workaround to solve your problem. Instead of prettier you can use the extension called "beautify" to solve the comma trailing issue.
https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify
if you want to stick on to prettier then in vscode
file > preferences > settings > on the user settings >
"prettier.trailingComma": "none"
or change it to "prettier.trailingComma": "es5"
Hope it will fix your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With