ci(api): enforce non-mutating lint gate in CI - #134
Merged
Merged
Conversation
Add a `lint:ci` script (eslint with --max-warnings=0, no --fix) and run it as a required CI step before build. Clear the 7 pre-existing no-explicit-any errors this surfaces by giving them precise types (Observable<unknown>, a typed reflector generic, typed error/XDR-boundary casts) with no behavior change. Coverage gate deferred: test:cov currently reports 0% because source lives outside the jest rootDir (test/) and is not instrumented; fixing collection is a separate change tracked for follow-up.
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.
🔗 Related Issue
No linked issue — CI/tooling hardening (Phase 2 quality gates).
🔖 Title
ci(api): enforce non-mutating lint gate in CI
📝 Description
CI ran only build + test, so lint regressions could land unnoticed. The existing
lintscript uses--fix, which mutates files and is unsuitable for a gate. This PR adds a dedicated non-mutatinglint:ciscript and runs it as a required CI step, then clears the pre-existing lint errors that gate surfaces.🔄 Changes Made
lint:ciscript:eslint "{src,apps,libs,test}/**/*.ts" --max-warnings=0(no--fix).github/workflows/ci.yml, before Build@typescript-eslint/no-explicit-anyerrors with precise types — no behavior change:audit.interceptor.ts:Observable<unknown>+ typed reflector generictransaction-status-checker.processor.ts: typed error-boundary casts and a typed XDR-wrapper shape in place ofany🗒️ Additional Notes
Verified locally:
npm run lint:ci,npm run build, andnpm test(460 passing) all exit 0.Coverage gate intentionally deferred.
npm run test:covcurrently reports 0% for all files because sources live outside the jestrootDir(test/) and are never instrumented; addingrootsto fix collection also pulls in a broken in-srcspec. Repairing coverage collection is a separate change and will be tracked as its own follow-up rather than gating on a meaningless 0% metric here.