Find CommonJS imports for migration to ESM.
Section: Editor Refactor Recipes
Find CommonJS require calls
regex
regex
\bconst\s+([A-Za-z_$][\w$]*)\s*=\s*require\((['"][^'"]+['"])\)Explanation
Useful when converting Node projects to ESM.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Editor Refactor Recipes
Find simple `var` declarations
Find `var` declarations for modernization review.
Capture ES import path
Find JavaScript/TypeScript imports and capture the module path.
Add commas to object properties
Find non-final object property lines missing a comma.