Repository navigation
build: pnpm verify, and type-aware oxlint and knip in every gate - #25
Merged
Merged
Conversation
What oxlint's type-aware rules (the app's set) find, ahead of running them in CI: - Casts and optional chains the types already rule out go: the payload valibot parses, a validated DTO and its track id, a Response's headers. - isRealTrack and getTrackProgress keep their guards and now say why in their types: they take track-like values (the app asks of tracks it rebuilt), so a missing title part or start reads as nothing. - Switches name every case they meet: the artwork tier `off`, typeof's function/symbol/undefined, and a missing request error is "". - Flags set in callbacks or across an await (finished, idle, idleTimer, running), which TypeScript's narrowing does not follow, are disabled on their lines with the reason; the deprecated Google alias stays exported as such. - Utf8Decoder is internal; the auth shim no longer re-exports BinaryResponse (the package exports only its index, which has it). - The ESLint config uses defineConfig and names the SonarJS preset's fields; tests type their catch callbacks and read a Request's URL.
`pnpm run lint` now runs ESLint, oxlint's type-aware rules (tsgolint, the app's rule set) and knip. scripts/verify.mjs is the list of every check: it runs each even after a failure and ends with a summary, and check:ci (GitHub Actions, Jenkins, the npm publish) and check:quality (the app's submodule check, without the history scan) are that script, so a local run and CI cannot drift apart. `--fast` skips the slow steps. Its tooling test keeps check:ci, check:quality and `lint` in step with the list. Tests may call the deprecated aliases they cover.
A JS npm_execpath (pnpm's) runs on this Node, anything else (Yarn's shell launcher) as is; tested for both.
This was referenced Nov 4, 2026
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.
Brings the library's gates up to the Animu app's: its type-aware linter and dead-code check, and a
pnpm verifythat runs everything CI runs.Changes
Gates
pnpm run lint= ESLint (lint:eslint) + oxlint type-aware (lint:types, tsgolint, the app's exact rule set and versions) + knip (lint:deps).scripts/verify.mjslists every check. It runs each one even after a failure and prints a summary;--fastskips the slow ones (secrets, audit).check:ci(GitHub Actions, Jenkins, the npm publish workflow) isverify, andcheck:quality(the app's isolated submodule check) isverify --no-secrets, so CI and a local run can't drift. A tooling test keepscheck:ci,check:qualityandlintin step with the list.Findings fixed (behaviour unchanged, 56 before)
Response.headers).isRealTrack/getTrackProgresskeep their guards, and their parameter types now say they take track-like values (the app passes tracks it rebuilt). The types are wider, so this is compatible for callers.offartwork tier, typeof's remaining cases). A missing request error code becomes""and still gets the default message.live.ts: flags set in callbacks or across anawait(finished,idle,idleTimer,running) are false positives for TS narrowing. Each is disabled on its line with the reason, as the app does.Utf8Decoderis no longer exported (internal). Theauth.tsshim drops aBinaryResponsere-export (the package only exports its index, which has it). The deprecated Google alias is tagged@aliasfor knip.defineConfig. Tests type their catch callbacks, and may call the deprecated aliases they cover.Verification
pnpm run check:ci: all 9 steps pass (secrets, tooling tests (13), audit, ESLint, oxlint, knip, typecheck, 246 tests + coverage, build)node scripts/check-submodule.mjs animu-api(isolated copy, no.git): all 8 steps pass