I have installed prettier via
yarn add prettier
I would like prettier to only format typescript code (I am developing AWS CDK project, there is no src
folder by convention & there could be typescript files here and there). In other words, I would like prettier to check all files in my project that has extension *.ts
.
I checked its documentation for configuration. But there is no such option to specify file extension.
How can I run prettier for only *ts files then? Is it even possible? If not, what could be the workaround?