Skip to content

style: apply prettier and check formatting in CI - #121

Merged
felipesauer merged 1 commit into
mainfrom
style/prettier
Aug 26, 2026
Merged

felipesauer merged 1 commit into
mainfrom
style/prettier

Conversation

@felipesauer

Copy link
Copy Markdown
Owner

Ten files had drifted out of the repo's own Prettier config — eslint.config.js,
tsconfig.json, codecov.yml, commitlint.config.js and one source file
among 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-ci and php-ci both filter on packages/**. Most of what drifted lives
at the repo root, which is exactly why it drifted — no workflow ever looked
at it. Format runs on every push and pull request.

Three things are deliberately not formatted

.prettierignore:

Path Why
CHANGELOG.md, .release-please-manifest.json Generated by release-please, which rewrites them in its own style at the next release.
packages/php/tests/Fixtures/ Parser inputs — the bytes are the test. Prettier wanted to re-indent sample.yaml from 2 to 4 spaces, which is a change to what the YAML parser is being asked to handle.
packages/php/infection.json5 Prettier rewrites json5 quoting ("source" → source, double → single quotes), which would fork this file away from its twin in safeaccess-identum.
npm test   →  2116 passed
build / lint / prettier --check  →  clean

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

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@felipesauer
felipesauer merged commit a4dda64 into main Aug 26, 2026
9 checks passed
@felipesauer
felipesauer deleted the style/prettier branch August 26, 2026 17:13
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.

1 participant