Skip to content

check pull requests for prettier formatting#1960

Merged
lavrton merged 3 commits intokonvajs:masterfrom
nathan-muir:ci-formatting
Aug 19, 2025
Merged

check pull requests for prettier formatting#1960
lavrton merged 3 commits intokonvajs:masterfrom
nathan-muir:ci-formatting

Conversation

@nathan-muir
Copy link
Copy Markdown
Contributor

In my other PR (#1959) I noticed there were some unrelated changes, because of formatting (trailing whitespaces etc).

If it helps, I've prepared this PR to:

  • Add a github workflow to check PRs have applied prettier (via npm run fmt)
  • Fixes some HTML errors that prevented prettier from running
  • Applies prettier to all files

This does add a bit of code churn because of the addition of trailing commas, which could be disabled in prettier -- https://prettier.io/docs/options#trailing-commas

If you're concerned about this affecting git blame, after merging we can add a .git-blame-ignore-revs with the commit hash

@lavrton
Copy link
Copy Markdown
Member

lavrton commented Aug 19, 2025

Helpful. But I think we need disable trailing commas

"prettier": {
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
Copy link
Copy Markdown
Contributor Author

@nathan-muir nathan-muir Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

es5 was the prettier default before prettier v3 (now all) [1] This results in much less code churn.

[1] https://prettier.io/docs/options#trailing-commas

@nathan-muir
Copy link
Copy Markdown
Contributor Author

nathan-muir commented Aug 19, 2025

Helpful. But I think we need disable trailing commas

Ok, I've set to trailingComma: 'es5' which was prettier's default value before v3. Instead of 97 files modified, there are only 34.

@nathan-muir nathan-muir changed the title check pull requests apply prettier formatting check pull requests for prettier formatting Aug 19, 2025
@lavrton lavrton merged commit 344898f into konvajs:master Aug 19, 2025
3 checks passed
@nathan-muir nathan-muir deleted the ci-formatting branch August 20, 2025 05:54
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.

2 participants