chore: migrate linting, formatting and typecheck to uncheck - #51
Merged
Merged
Conversation
Replace ESLint (@antfu/eslint-config, eslint-plugin-format), lint-staged and simple-git-hooks with uncheck, which runs sherif, oxlint, oxfmt and tsc behind one command, matching middleapi/standard-server.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Migrates linting/formatting/typechecking from ESLint (@antfu/eslint-config, eslint-plugin-format), lint-staged and simple-git-hooks to uncheck (sherif + oxlint + oxfmt + tsc), plus the resulting oxfmt reformat.
- Tooling swap:
check=uncheck,fix=uncheck --fix,prepare=uncheck prepare --pre-commit;lint,lint:fix,type:checkandrepo:fixare removed. Root becomesprivate: true(sherif requirement).sync:sponsorsends withpnpm run fix '**/README.md'. - Config:
eslint.config.js,tsconfig.base.jsonandtsconfig.lib.jsonare deleted;oxlint.config.tsandoxfmt.config.tsextend theuncheckmiddleapi presets. Root tsconfig extendsuncheck/tsconfig/middleapi; both packages extend.../lib(downgrader keeps itsreferences: [{ path: '../types' }]). - Typecheck coverage is preserved: uncheck discovers both package tsconfigs and ran
tsc -b packages/downgrader/tsconfig.json(buildingtypesthrough the reference) plustsc -p tsconfig.json --noEmit, matching the oldpnpm run -r type:check && tsc. - CI/editor/agent wiring: the
lint_and_typecheckjob becomescheckrunningpnpm run check; dependabot groupsuncheck/oxlint/oxfmt; Zed formats through externaloxfmtwithsource.fixAll.oxc; the Claude hook moves fromPostToolUse(eslint) toStoprunningpnpm exec uncheck hooks run --fix. - Reformat commit: ~55
.tsfiles reformatted. I canonicalized each changed file through the TypeScript compiler (ignoring whitespace,ParenthesizedExpression, quote style and import order) and every one matches its base AST exactly.
Verification: I ran the uncheck binary directly at the repo root — sherif, oxlint, oxfmt and tsc all pass. uncheck '**/README.md' accepts the glob and formats markdown, so the sync:sponsors change is sound. gh pr checks 51 shows check and all test_matrix jobs (20/22/24/26) passing.
ℹ️ Migration notes
- Existing clones keep the old
simple-git-hookspre-commit body (pnpm lint-staged);uncheck prepareappends to it, so commits fail until.git/hooks/pre-commitis removed. The PR body calls this out, but it only lives there — worth a line in the README/CONTRIBUTING for developers pulling the change. - sherif prints a non-fatal
non-existant-packageswarning becausepnpm-workspace.yamldeclaresapps/*, which matches nothing. Pre-existing config, now surfaced on everycheck; droppingapps/*would silence it.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
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.

Replaces ESLint (
@antfu/eslint-config,eslint-plugin-format), lint-staged and simple-git-hooks withuncheck, which runs sherif, oxlint, oxfmt and tsc behind one command.pnpm run checkandpnpm run fixnow cover lint, format, typecheck and monorepo consistency, the same way as middleapi/standard-server.Changes
check/fixreplacelint,lint:fix,type:checkandrepo:fix;prepareinstalls a pre-commit hook that runsuncheck staged --fix.middleapipresets; tsconfigs extenduncheck/tsconfig/middleapiand/lib, sotsconfig.base.jsonandtsconfig.lib.jsonare gone.lint_and_typecheckjob becomescheck, dependabot groups uncheck, oxlint and oxfmt, Zed formats with oxfmt, and the Claude Code hook runs uncheck at the end of each turn.style: format with oxfmt): every reformatted.tsfile parses to the same AST as before apart from import order, and comments are untouched.Notes
package.jsonis nowprivate, which sherif requires.unicorn/no-thenableis off, since JSON Schema'sif/thenkeywords trigger it.top-level-functionrule has no oxlint equivalent, so it is no longer enforced.uncheck prepareappends to it, leaving apnpm lint-stagedcall that now fails. Remove it first:rm .git/hooks/pre-commit && pnpm i.Testing
pnpm run checkpasses (sherif, oxlint, oxfmt, tsc).