Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can prettier replace var with let

I am using prettier to format my Typescript code on save. I would like to know if there is an option to replace var with let using prettier.

This is the code I use to format a hole project with

"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
like image 407
Martin Andersen Avatar asked Nov 15 '25 22:11

Martin Andersen


1 Answers

Prettier is a code formatter. It doesn't do things like that. See "What Prettier is not concerned about" in its docs.

like image 196
thorn0 Avatar answered Nov 18 '25 13:11

thorn0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!