JavaScript & TypeScript Code Hygiene
Type, module, asynchronous, React, and Node.js lifecycle hygiene.
Choose a focused JavaScript & TypeScript recipe
This collection contains 5 bounded JavaScript & TypeScript workflows. Choose the recipe whose objective matches the repository evidence instead of combining unrelated cleanup into one run.
- TypeScript strictness and escape-hatch debt: Use it to reduce unsafe any, ignore directives, assertions, and disabled strict checks incrementally.
- JavaScript promise, abort, and listener lifecycle: Use it to close floating promises, lost failures, uncancelled work, and leaked event listeners.
- JavaScript module cycles, side effects, and unused exports: Use it to make module initialization order and public exports predictable.
- React hook, effect, and state lifecycle: Use it to remove stale closures, redundant state, and effect cleanup defects.
- Node.js stream, emitter, and handle lifecycle: Use it to prevent stream stalls, duplicate listeners, and handles that keep processes alive.
How to use this collection
Read the repository’s configured runtime, compiler, framework, analyzer, and test commands before selecting a workflow. Start in audit mode, record file and symbol evidence, and authorize a fix only after the candidate scope is reviewable. Preserve supported versions, public behavior, and existing tool configuration.
If the evidence is a named CVE, scanner finding, exposed secret, authorization flaw, or injection path, use the focused vulnerability-remediation playbook instead of a code-hygiene recipe. Stop when the safe result requires an owner decision about architecture, compatibility, production data, or deployment state.
Full recipe list
TypeScript strictness and escape-hatch debt
developmentTypeScript strictness and escape-hatch debt: Reduce unsafe any, ignore directives, assertions, and disabled strict checks incrementally.
JavaScript promise, abort, and listener lifecycle
developmentJavaScript promise, abort, and listener lifecycle: Close floating promises, lost failures, uncancelled work, and leaked event listeners.
JavaScript module cycles, side effects, and unused exports
developmentJavaScript module cycles, side effects, and unused exports: Make module initialization order and public exports predictable.
React hook, effect, and state lifecycle
developmentReact hook, effect, and state lifecycle: Remove stale closures, redundant state, and effect cleanup defects.
Node.js stream, emitter, and handle lifecycle
developmentNode.js stream, emitter, and handle lifecycle: Prevent stream stalls, duplicate listeners, and handles that keep processes alive.