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

Add prettier and improve CI #13

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Add prettier and improve CI #13

merged 3 commits into from
Jan 29, 2025

Conversation

konstin
Copy link
Member

@konstin konstin commented Jan 27, 2025

To keep a consistent style with multiple editors, and to avoid manual reflowing of text, we add prettier as formatter for markdown and yml files.

I've intentionally left everything at default settings to rely on the work defining a good standard done by prettier's team and to avoid bikeshedding over the style.

The only non-default option is prose wrapping for markdown files, which adds the equivalent of a line length limit as we have it in rust and yaml to markdown, too. I find too long lines hard to read and soft-wrap isn't consistently available (e.g. github PR diffs become hard to read), though we could remove that option, too.

Prettier is enforced by CI. On CI, we also build the book for all PRs with an updated mdbook version and check compatibility with the latest mdbook version (non-blocking).

To keep a consistent style with multiple editors, and to avoid manual reflowing of text, we add prettier as formatter for markdown and yml files.

I've intentionally left everything at default settings to rely on the work defining a good standard done by prettier's team and to avoid bikeshedding over the style.

The only non-default option is prose wrapping for markdown files, which adds the equivalent of a line length limit as we have it in rust and yaml to markdown, too. I find too long lines hard to read and soft-wrap isn't consistently available (e.g. github PR diffs become hard to read), though we could remove that option, too.

Prettier is enforced by CI. On CI, we also build the book for all PRs with an updated mdbook version and check compatibility with the latest mdbook version (non-blocking).
@mpizenberg
Copy link
Member

Which one would you like to merge first, this one or the guide update?

@konstin
Copy link
Member Author

konstin commented Jan 29, 2025

This one, the guide update is stacked on top of this PR (it's opened against this branch - github doesn't make this super obvious)

@Eh2406
Copy link
Member

Eh2406 commented Jan 29, 2025

For some reason GitHub was not giving me notifications about this, so it slipped through the cracks.

@Eh2406 Eh2406 merged commit e257604 into main Jan 29, 2025
4 checks passed
@Eh2406 Eh2406 deleted the konsti/use-prettier branch January 29, 2025 16:40
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