V
V
Vadim_Sabirov2021-11-17 18:50:05
typescript
Vadim_Sabirov, 2021-11-17 18:50:05

Is it possible to force Prettier to put commas in Typescript interfaces?

I don't use semicolons in my projects, so I set up prettier to remove them. But in interfaces I would like to put comma or semicolon. Is it possible to somehow configure prettier so that it works in a special way with interfaces, types and enums in typescript'e?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-17
@Aetae

In pure prettier, no. The functionality is specially limited in it, so as not to get porridge.
PS I don't understand removers like you. Chance to get a joint like:

console.log('some')


// iterate
[1, 2, 3].forEach(func)
not worth saving on matches at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question