BETA · GateTest is in active polish ahead of public launch. Some flows are rough. Found a bug? hello@gatetest.ai — we're reading every message.
Language-specific scanning

TypeScript Code Quality
& Strict Mode Enforcement

TypeScript gives you a type system. GateTest makes sure it stays honest — catching tsconfig regressions, @ts-ignore abuse, any-type leaks, circular imports, async anti-patterns, and 60+ more failure modes before they reach production.

The strictness erosion problem

TypeScript strict mode exists to catch a whole class of runtime errors at compile time. But it’s trivially easy to erode: one PR adds // @ts-ignore to unblock a merge, another sets skipLibCheck: true to silence a noisy dependency, a third disables strictNullChecks to speed up a deadline. Six months later, the type system is decorative.

GateTest makes strictness erosion impossible to merge silently — every tsconfig regression and suppression annotation is a gate failure that blocks the PR.

TypeScript-specific modules

typescriptStrictness
  • strict: false in tsconfig
  • noImplicitAny: false
  • @ts-nocheck (file-wide suppress)
  • Unreasoned @ts-ignore
  • Exported signatures with : any
  • as any casts in source
importCycle
  • Circular import chains (Tarjan SCC)
  • Self-imports
  • Type-only imports correctly excluded
  • Extension fallback resolution
  • index.ts re-export cycles
deadCode
  • Unused exported functions/classes
  • Orphaned files (nothing imports)
  • 10+ line commented-out blocks
  • Next.js App Router convention-aware
asyncIteration
  • .forEach(async ...) — swallowed promises
  • .filter/.some/.every(async ...) — always truthy
  • .reduce(async ...) — silent serialization
  • .map(async ...) without Promise.all
errorSwallow
  • Empty catch {} blocks
  • catch blocks that only console.log
  • .catch(() => {}) / .catch(noop)
  • Fire-and-forget .save()/.send()/.commit()
moneyFloat
  • parseFloat() on money-named variables
  • Number() on price/total/amount
  • .toFixed(0) / .toFixed(1) on money vars
  • Safe if decimal.js / big.js imported

What GateTest catches in TypeScript

errortypescriptStrictness
// tsconfig.json
{ "compilerOptions": { "strict": false } }

Fix: Remove strict: false to re-enable all strict type checks

errormoneyFloat
const cost = parseFloat(req.body.amount);
this.subtotal = parseFloat(rawAmount);

Fix: Use Decimal or Big for financial calculations — IEEE-754 float loses cents at scale

warningasyncIteration
users.forEach(async (user) => {
  await sendEmail(user.email);
});

Fix: await Promise.all(users.map(async (user) => sendEmail(user.email)))

warningtypescriptStrictness
// @ts-ignore
const result = dangerousFunction();

Fix: Add explanation: // @ts-ignore: dangerousFunction is untyped — fix in #1234

Frequently asked questions

How does GateTest enforce TypeScript strict mode?

GateTest's typescriptStrictness module walks every tsconfig.json in your project (including JSONC with // comments, tsconfig.app.json, tsconfig.node.json). It flags strict: false (error — disables all strict checks at once), noImplicitAny: false (error — allows untyped code), skipLibCheck: true (warning — hides type errors in dependencies), strictNullChecks: false (warning — allows null/undefined anywhere), and strictFunctionTypes: false (warning — breaks function parameter type safety).

Can GateTest detect @ts-ignore abuse?

Yes. The typescriptStrictness module flags @ts-nocheck at the file level (error — suppresses all type checking in that file) and @ts-ignore / @ts-expect-error annotations that have no explanatory comment on the same line (warning — a reason-less suppress is a ticking time bomb). Test files (*.test.ts, *.spec.ts) and declaration files (*.d.ts) are exempt — these legitimately need type flexibility.

Does GateTest find unused TypeScript exports?

Yes. The deadCode module detects exported symbols that nothing in the codebase imports, files that nothing imports, and commented-out code blocks of 10+ lines. It understands Next.js App Router conventions so page.tsx, layout.tsx, and route.ts exports are never false-positively flagged.

How does GateTest detect circular imports in TypeScript projects?

The importCycle module builds a dependency graph from your .ts and .tsx files — resolving relative specifiers through extension fallback and ./x/index.ts lookup. It uses Tarjan's strongly-connected-component algorithm to find every cycle of 2+ files. Type-only imports (import type, export type) are correctly excluded — they're erased at build time and can't cause runtime TDZ errors.

Does GateTest catch async/await mistakes in TypeScript?

Several modules cover this. asyncIteration catches .forEach(async ...) (warning — forEach doesn't await), .filter(async ...) (error — Promise is always truthy, predicate is meaningless), .reduce(async ...) (error — accumulator becomes a Promise chain), and .map(async ...) not wrapped in Promise.all (warning — unwrapped Promise array). errorSwallow catches fire-and-forget .save()/.send()/.commit() calls without await or .catch().

Does GateTest detect money/float precision bugs in TypeScript?

Yes. The moneyFloat module flags money-named variables (price, total, amount, tax, fee, subtotal, balance, and currency codes usd/eur/gbp/etc.) assigned from parseFloat() or Number() — both are IEEE-754 floating-point and will accumulate rounding errors in financial calculations. Safe if your file imports decimal.js, big.js, bignumber.js, or dinero.js.

Keep TypeScript strict. Ship with confidence.

Gate every PR against strictness regressions, circular imports, async anti-patterns, and 60+ more failure modes. Pay only when results are delivered.

Scan My TypeScript Repo — From $29

Card hold only. Charged after successful scan delivery.