Repository navigation
CI: lint and format checks - #18
Merged
Merged
Conversation
CI gains a lint job on Node 22 that runs `pnpm lint` (`biome check .`): formatting, the recommended lint rules with noExplicitAny as an error, and import sorting. Biome is pinned to 2.5.13 and biome.json copies the product repo's settings (2-space indent, line width 100, double quotes, semicolons). `pnpm lint:fix` applies the safe fixes locally. Existing code brought in line: formatter line wrapping in 8 files plus package.json, one sorted type import, and one test assertion rewritten as toHaveLength so it no longer trips noUnsafeOptionalChaining. The emitted JS and type declarations are unchanged apart from that import order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What CI now runs
A new
lintjob (Node 22) runspnpm lint, which isbiome check .. It checks:noExplicitAnyas an errorThe existing
testjob (Node 18/20/22: typecheck, test, build) is unchanged, and both jobs run on every PR.@biomejs/biomeis pinned to exactly2.5.13(the version the product repo resolves), so Dependabot can bump it.biome.jsonis a standalone copy of the product repo's settings: 2-space indent, line width 100, double quotes, semicolons, ignore files from.gitignore. It doesn't reference../millionsend.pnpm lint:fixapplies the safe fixes locally.Code changes to pass the check
The formatter rewrapped lines in 9 files (+153/−37, almost all in
test/resources.test.ts), includingpackage.json, where Biome expands arrays the way npm and pnpm write them. Two other edits:src/resources/contacts.ts: one type import's names re-sorted (organizeImports).test/resources.test.ts:expect((calls[0]?.body as unknown[]).length).toBe(2)becameexpect(calls[0]?.body).toHaveLength(2). It asserts the same thing without trippingnoUnsafeOptionalChaining.Why this is safe:
distfrommainand from this branch. The emitted JS is identical once whitespace is ignored..d.tsfiles are identical apart from that one import order, so the public API is unchanged.--frozen-lockfile.🤖 Generated with Claude Code