Search and Rewrite code at large scale using precise AST pattern
npm install @ast-grep/cli
ast-grep(sg) is a CLI tool for code structural search, lint, and rewriting.
Please see ast-grep's official site and repositoryfor more information.