Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.18 KB

File metadata and controls

44 lines (30 loc) · 1.18 KB

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