Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript needs a code formatter #956

Closed
sonnyp opened this issue Jul 3, 2024 · 3 comments
Closed

TypeScript needs a code formatter #956

sonnyp opened this issue Jul 3, 2024 · 3 comments

Comments

@sonnyp
Copy link
Contributor

sonnyp commented Jul 3, 2024

In #946 we replaced Biome with typescript-language server

Formatting was provided by Biome and it works fine with TypeScript, unfortunately using 2 language servers isn't easily done.

We should add a formatter to typescript-language-server or use Biome and typescript-language-server together.

We could also use prettier which is mostly compatible with Biome formatter.

@vixalien
Copy link
Contributor

vixalien commented Jul 3, 2024

I might be wrong but I think tsserver has a built-in formatter. I think it's the default in VSCode and you can invoke it manually

image

Also evidenced by typescript-language-server/typescript-language-server#10

But in practice it seems less than perfect for the task. It's very lax.

@sonnyp
Copy link
Contributor Author

sonnyp commented Jul 3, 2024

You're right - might be enough for now but I'd like something closer to prettier/biome. We can do without for now it's really just nice to have 👍

@sonnyp
Copy link
Contributor Author

sonnyp commented Jul 14, 2024

We now use typescript-language-server for both TS and JS

#972

we removed biome

#973

The typescript-language-server formatter looks good enoguh for now

@sonnyp sonnyp closed this as completed Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants