chore: migrate from prettier to oxfmt and add oxlint#22
Conversation
nicknisi
left a comment
There was a problem hiding this comment.
Code Review Findings
Warnings
- [Principle 2 / Convention]
testedmarker showsfail_indicators: 1— this is a false positive from the plain-text grep heuristic (matches "0 failed" in vitest output). Verifier manual-tested marker (22 pass indicators) and implementer log (135 passing) confirm all tests actually pass. Consider usingvitest --reporter=jsonfor structured evidence. (File:.case/authkit-session-mncbvowg-ideation-oxfmt-oxlint-migratio/tested)
Info
- [Principle 10 / Convention]
package.jsonfield reordering (keywords, license, author, repository, files, dependencies sections moved) is an oxfmt formatter artifact, not manual scope creep. Expected behavior from the formatter migration. (File:package.json)
Automated review by case/reviewer agent
Greptile SummaryThis PR migrates code formatting from Prettier to oxfmt and introduces oxlint as the project's first active linter, while also restructuring CI so format/lint checks run in a dedicated single-run job rather than redundantly across the Node version matrix. Two catch blocks in Confidence Score: 5/5Safe to merge — clean tooling swap with no logic changes beyond error cause chaining improvements. All changed source files are tooling configuration or minor catch-block improvements. The CI restructuring is an improvement over the previous state. No P0 or P1 issues found; previously flagged concerns about CI redundancy have been addressed in this PR. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Push / Pull Request] --> L[lint job — Node 22]
A --> T[test job matrix]
subgraph lint [Lint & Format — runs once]
L --> LC[Checkout + pnpm install]
LC --> LF[format:check — oxfmt --check .]
LF --> LL[lint — oxlint .]
end
subgraph tests [Test — Node 20 / 22 / 24]
T --> TC[Checkout + pnpm install]
TC --> B[Build — pnpm run build]
B --> TS[Test — vitest coverage]
end
Reviews (2): Last reviewed commit: "ci: split lint/format into single-run jo..." | Re-trigger Greptile |
| # Spec: Migrate from Prettier to oxfmt and add oxlint | ||
|
|
||
| ## Overview | ||
|
|
||
| Replace Prettier with oxfmt for formatting and add oxlint as the linter. Single phase, mechanical changes. |
There was a problem hiding this comment.
Internal planning docs committed to public repo
docs/ideation/oxfmt-oxlint-migration/contract.md and docs/ideation/oxfmt-oxlint-migration/spec.md are migration planning/spec documents. Committing them to the main branch of a public library repo means external contributors will see internal tooling process docs that have no ongoing value once the migration is complete.
Consider whether these should live in the PR description/wiki instead, or add docs/ideation/ to .gitignore if this pattern will repeat.
There was a problem hiding this comment.
Already removed in a54cea4 before this review was posted — the ideation docs are no longer tracked.
Replace Prettier with oxfmt for formatting and add oxlint as the linter. This moves to the faster oxc toolchain for both formatting and linting. - Remove prettier, .prettierignore, prettier.config.js - Add oxfmt with equivalent formatting config (.oxfmtrc.json) - Add oxlint with correctness/suspicious rules (.oxlintrc.json) - Update package.json scripts (format, format:check, lint) - Update CI workflow to use new format:check and lint steps - Fix two lint issues: preserve caught errors with cause property - Reformat all files with oxfmt
e3bd06d to
a54cea4
Compare
Address greptile PR review feedback: - Split format:check and lint out of the 3-node matrix into a dedicated single-run job; these checks are not Node-version sensitive so running them 3x wastes CI minutes. - Remove internal bootstrap comment from .gitignore entry.
Summary
Replaces Prettier with oxfmt for code formatting and adds oxlint as the project's linter (previously there was no linter configured — the CI lint step was commented out). All formatting options from the original Prettier config are preserved in the new
.oxfmtrc.json. Two lint warnings insrc/were fixed (error cause chaining in catch blocks). The entire codebase has been reformatted with oxfmt.Changes
prettier,prettier.config.js,.prettierignoreoxfmt(formatter),oxlint(linter),.oxfmtrc.json,.oxlintrc.jsonpackage.jsonscripts (format,format:check,lint), CI workflow (format check uses oxfmt, lint step uncommented with oxlint)src/core/AuthKitCore.tsandsrc/core/session/TokenManager.ts(oxlint warnings)What was tested
Automated
pnpm run format:check(oxfmt): 44 files, all cleanpnpm run lint(oxlint): 28 files, 0 warnings, 0 errorsManual
Library verification via scenario script checking 8 specific conditions:
prettier.config.jsand.prettierignoreremoved ✅.oxfmtrc.jsonand.oxlintrc.jsonexist ✅AuthKitCore.tshas error cause chaining ✅TokenManager.tshas error cause chaining ✅package.jsonscripts updated (format→oxfmt, format:check→oxfmt --check, lint→oxlint) ✅Verification
This is a library repo (no UI), so verification was done via automated tests, tool checks, and a scenario script that would fail if any part of the migration were reverted.
Follow-ups
testedevidence marker to usevitest --reporter=jsonfor structured output (the current plain-text grep heuristic can produce false positives on strings like "0 failed")package.jsonfield reordering is a formatter artifact from oxfmt — expected behavior, not manual scope creep