Skip to content

codemod/useful-codemods

Repository files navigation

useful-codemods

A collection of production-ready codemods built and maintained by Codemod. See the Codemod docs for more on building and running codemods.

Codemods

Codemod Description
debarrel Remove barrel files and rewrite imports to point directly at source modules

Development

Codemods in this repo are written using jssg (JS ast-grep) — TypeScript transformation scripts that operate on ASTs generated by ast-grep. See the jssg docs for the full API reference.

# Install dependencies
pnpm install

# Run all tests
pnpm test

# Type-check all codemods
pnpm check-types

Contributing

See CONTRIBUTING.md for guidelines on submitting changes, adding changesets, and the release process.

Project structure

codemods/
  <name>/
    scripts/codemod.ts   # Codemod logic (jssg / ast-grep)
    tests/               # Input/expected test fixtures
    codemod.yaml         # Codemod manifest
    workflow.yaml        # Execution workflow
    package.json

License

MIT

About

A collection of useful codemods made by Codemod.com

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors