style: apply prettier and check formatting in CI - #121
Merged
Merged
Conversation
Ten files had drifted out of the repo's own Prettier config — including eslint.config.js, tsconfig.json and codecov.yml. Only the pre-commit hook formatted anything, and it only sees files that pass through it, so anything edited outside that path stayed crooked. The new Format workflow runs without a paths filter: js-ci and php-ci only match packages/**, and most of what drifted lives at the root. .prettierignore covers what should not be reformatted: - CHANGELOG.md and .release-please-manifest.json are generated, and the next release would rewrite them anyway. - packages/php/tests/Fixtures/ holds parser inputs; their bytes are the test. Prettier wanted to re-indent sample.yaml from 2 to 4 spaces. - infection.json5, because Prettier rewrites json5 quoting and would fork the file away from its twin in safeaccess-identum.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ten files had drifted out of the repo's own Prettier config —
eslint.config.js,tsconfig.json,codecov.yml,commitlint.config.jsand one source fileamong them. Nothing in CI checked formatting; only the pre-commit hook did,
and it only sees the files that pass through it.
The new workflow has no paths filter
js-ciandphp-ciboth filter onpackages/**. Most of what drifted livesat the repo root, which is exactly why it drifted — no workflow ever looked
at it.
Formatruns on every push and pull request.Three things are deliberately not formatted
.prettierignore:CHANGELOG.md,.release-please-manifest.jsonpackages/php/tests/Fixtures/sample.yamlfrom 2 to 4 spaces, which is a change to what the YAML parser is being asked to handle.packages/php/infection.json5"source"→source, double → single quotes), which would fork this file away from its twin insafeaccess-identum.