beautifier / js-beautify

Beautifier for javascript
https://beautifier.io
MIT License
8.63k stars 1.38k forks source link

BUG js-beautify make Map < string, string> into two lines. #1564

Open 1011178l opened 6 years ago

1011178l commented 6 years ago

How to reproduce:

create a interface in typescript:

export interface Example {
    exampleField: Map <string, string>;
}

Then run the js-beautify, we got:

export interface Example {
    exampleField: Map < string,
    string >;
}

expecting that all Map types in one line rather than creating a new line.

OS linux, js-beautify 1.8.6

bitwiseman commented 6 years ago

Typescript is not fully supported. We have tried to make it not completely broken, but it is problematic at best. Fixing this is blocked waiting on that support (#1147).

It might be possible to fix this without that, but it will be a significant effort.

1011178l commented 6 years ago

@bitwiseman Do you have any idea when will we have ts-beautify? There is an increasing number of people use ts now, but #1147 blocked almost 2 yrs.

bitwiseman commented 6 years ago

@1011178l I do not have a timeline for this. There is has been a lot of forward movement in the project lately but it is still all volunteer and done in spare time.

The problem is one of resources. The project only moves forward with the help of contributors. My main focus at this time is moving the project as a whole forward - fixing issues, getting the existing beautifiers and the underlying framework into a state that enables the creation of new beautifiers, and documenting the project to lower the friction for new contributions.

What is needed to create a ts-beautify is one or more people who want it and are have the time to commit to make it happen.