diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-28 19:10:30 +0530 |
|---|---|---|
| committer | Aman Kumar <145339995+amankumarsingh77@users.noreply.github.com> | 2026-08-02 19:12:46 +0530 |
| commit | 0fa62d8177f2216b95739e3d36f87fc1a95886c5 (patch) | |
| tree | a81b2e461d4cf3a7af7c36d89fa6c9355e3f04bb /package.json | |
| parent | f9dcdf7f6dcdf2979693a9f179eda2b9995d57ae (diff) | |
chore: fail the build on unguarded type assertions
A clean tsc does not prove the absence of casts. This scans src/ for
as any, ts-ignore, non-null assertions, inline object casts, and double
casts, wired into a new npm run check that CI runs as a single step.
The escape hatch is an external allowlist module rather than an inline
comment marker: comments are not used in this codebase, and an entry
carries a count, so adding a new cast to an already-exempted file still
fails until someone raises a number that shows up in the diff. Exactly
one exemption is needed today, for the dynamic sharp import.
scripts/ was gitignored wholesale, so the two new files are un-ignored
individually and everything else dropped there stays ignored.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/package.json b/package.json index d21dcd6..2507382 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,8 @@ "scripts": { "typecheck": "tsc --noEmit && tsc -p tsconfig.test.json", "test": "node --conditions=import --import tsx --test \"test/{profile,deep-research,domains,cdp,util}/**/*-test.ts\"", + "boundaries": "tsx scripts/check-boundaries.ts", + "check": "npm run typecheck && npm run boundaries && npm test", "prepublishOnly": "tsc --noEmit" }, "publishConfig": { |
