rename-oldthing-to-newthing
Renames the JSX component OldThing to NewThing in .tsx files and renames the bar prop to count on migrated OldThing usages.
What It Changes
<OldThing ... />becomes<NewThing ... /><OldThing ...></OldThing>becomes<NewThing ...></NewThing>bar={...}becomescount={...}on migratedOldThingJSX only- Local imports are updated when the imported binding is the one referenced by the migrated JSX
import { OldThing } from "..."becomesimport { NewThing } from "..."import OldThing from "..."becomesimport NewThing from "..."
Out Of Scope
- Renaming
barprops on unrelated components - Renaming arbitrary strings, comments, or property keys
- Renaming local declarations, exports, or re-exports that are not directly resolved from migrated JSX imports in the AST step
The workflow includes an optional AI cleanup step for edge cases where a project needs follow-up cleanup after the deterministic AST transform.
Example
Before
tsx
After
tsx
Workflow
Workflow name: default
Workflow parameter: runAiCleanup
- Type: boolean
- Default:
true - Purpose: runs the optional
AI review and cleanupstep after the AST transform
Run locally:
bash
Disable the AI cleanup step:
bash
Development
bash
License
MIT