Skip to content

chore: add prettier for formatting#39

Merged
sgoudham merged 1 commit intocatppuccin:mainfrom
uncenter-contrib:prettier
Apr 9, 2026
Merged

chore: add prettier for formatting#39
sgoudham merged 1 commit intocatppuccin:mainfrom
uncenter-contrib:prettier

Conversation

@uncenter
Copy link
Copy Markdown
Member

@uncenter uncenter commented Apr 9, 2026

As pull requests are adding new things (#28) it might help to have some standard formatting. The existing formatting seems to follow standard/default Prettier conventions, so I've added that here. The only formatting changes are a few related to print width and missing trailing commas. I've ignored the autogenerated CHANGELOG.md and the pnpm lockfile in .prettierignore.

@ninetailedtori
Copy link
Copy Markdown
Contributor

What would help is if we had a sort of global CTP prettifier file. It would be cool to upstream this, because right now a lot of our styling is...implicit, and as such depends on the user's own IDE and its setup as well. Similar to how userstyles have a customised deno fmt shell, but one for the major languages, such as whiskers files, js/ts, rust and others that might be relevant to their own repo (such as catppuccin/pygments handling the python formatter config, language-specific things are handled in the language-specific ports).

@uncenter
Copy link
Copy Markdown
Member Author

uncenter commented Apr 9, 2026

We don't mandate any kind of styling org-wide, maintainers can choose what they prefer. This pull request only seeks to make it easier for contributors to contribute to this repository's existing code style without having additional unrelated formatting changes.

@ninetailedtori
Copy link
Copy Markdown
Contributor

We don't mandate any kind of styling org-wide, maintainers can choose what they prefer. This pull request only seeks to make it easier for contributors to contribute to this repository's existing code style without having additional unrelated formatting changes.

But, this leads to those who seek to contribute new ports etc, being left rather confused or well, having an inconsistent styling of our ports. This would honestly be nicer to see having a singular style guide over the organisation, but perhaps this viewpoint is from my clinical OCD, but it's just my opinion! Not saying of course that it's what we should go with, just throwing it out there. :]

@sgoudham
Copy link
Copy Markdown
Contributor

sgoudham commented Apr 9, 2026

Thanks for the PR, I'm actually kinda interested in using biome if we're going to be touching up the formatting. Mainly since it's a formatter and linter in one, and if it has good defaults then we can standardise on that slowly but surely?

Is the new kid on the block worth it? Assuming it's still the new kid on the block lol

@uncenter
Copy link
Copy Markdown
Member Author

uncenter commented Apr 9, 2026

I like Biome, but they still don't support YAML or Markdown. https://biomejs.dev/internals/language-support/

@sgoudham
Copy link
Copy Markdown
Contributor

sgoudham commented Apr 9, 2026

That's unfortunate, at least the formatting is in progress? If the website is to be trusted lol

@ninetailedtori
Copy link
Copy Markdown
Contributor

That's unfortunate, at least the formatting is in progress? If the website is to be trusted lol

YAML is nearly done, and MD is in the works, afaik. It will be tempting an option in that case. I know we have deno as well, but deno is...well, messier in terms of added tools. prettier would be our best bet now, then biome when it ships.

@sgoudham sgoudham merged commit b2d60ae into catppuccin:main Apr 9, 2026
1 check passed
@uncenter uncenter deleted the prettier branch April 9, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants