JavaScript & TypeScript Code Hygiene

Type, module, asynchronous, React, and Node.js lifecycle hygiene.

Select one bounded recipe. Start in audit mode; authorize fixes only after reviewing the candidate evidence.

Recipes

TypeScript strictness and escape-hatch debt

development

Bounded audit or remediation to reduce unsafe any, ignore directives, assertions, and disabled strict checks incrementally.

author security-recipes.ai contributorsteam Security Engineeringmodel used gpt-5-codexupdated 2026-07-12
code-hygienejavascript-typescripttypescriptstrictanyts-ignore

JavaScript promise, abort, and listener lifecycle

development

Bounded audit or remediation to close floating promises, lost failures, uncancelled work, and leaked event listeners.

author security-recipes.ai contributorsteam Security Engineeringmodel used gpt-5-codexupdated 2026-07-12
code-hygienejavascript-typescriptjavascriptpromisesabortcontrollerlisteners

JavaScript module cycles, side effects, and unused exports

development

Bounded audit or remediation to make module initialization order and public exports predictable.

author security-recipes.ai contributorsteam Security Engineeringmodel used gpt-5-codexupdated 2026-07-12
code-hygienejavascript-typescriptjavascriptmodulescyclesexports

React hook, effect, and state lifecycle

development

Bounded audit or remediation to remove stale closures, redundant state, and effect cleanup defects.

author security-recipes.ai contributorsteam Security Engineeringmodel used gpt-5-codexupdated 2026-07-12
code-hygienejavascript-typescriptreacthookseffectsstate

Node.js stream, emitter, and handle lifecycle

development

Bounded audit or remediation to prevent stream stalls, duplicate listeners, and handles that keep processes alive.

author security-recipes.ai contributorsteam Security Engineeringmodel used gpt-5-codexupdated 2026-07-12
code-hygienejavascript-typescriptnodejsstreamseventemitterhandles