dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
248 stars 53 forks source link

Support configuration for inner spacing in template literals #578

Open patrickschroeter opened 9 months ago

patrickschroeter commented 9 months ago

When writing template literals with inner spacing between braces and variable, the format job always removes them:

const text = 'Hello World!';
- const templateLiteral = `${ text }`;
+ const templateLiteral = `${text}`;

It should be possible to configure the inner spacings in template literals.

If there is already an option to change the behaviour I haven't found them.

przemyslaw-zan commented 5 months ago

I would greatly appreciate this being implemented!

g-plane commented 3 months ago

Duplicate of #290