jscodeshift
Meta's toolkit for writing and running codemods on JavaScript and TypeScript code.
In more detail
A jscodeshift transform receives each file's syntax tree, finds patterns such as a JSX attribute and rewrites them, then prints the updated code with formatting preserved as far as possible. Design systems ship such transforms so consumers can migrate across a breaking release with one command.
Related terms
- codemod — A script that rewrites source code automatically, for example renaming a deprecated prop across a whole codebase.
Taught in
- System Governance: Changesets, Semantic Versioning & Deprecation — Design Systems & Component Engineering