Skip to content

Overview

What are codemods?

A codemod is a function that takes files as input and output. It reads the files of interest, makes some changes, then saves the result to your disk.

One special case is the identity function. That is, not all codemods need to make a change. As a result, linters are a codemod. Tools that gather files, collect metrics, analyze package dependencies, or find vulnerabilities are also one.

In short, codemods are everywhere and you’ve likely used a few already.

What is codemod-utils?

codemod-utils provides a framework (tools and conventions) to help you write codemods. Use @codemod-utils/cli to get started.

sh
pnpx @codemod-utils/cli <your-codemod-name>

Package overview

Made with codemod-utils

  1. @ember-intl/lint
  2. @ember-intl/vite
  3. add-return-type
  4. analyze-ember-project-dependencies
  5. blueprints-v2-addon
  6. codemod-generate-release-notes
  7. create-v2-addon-repo
  8. ember-codemod-add-component-signatures
  9. ember-codemod-add-missing-tests
  10. ember-codemod-add-template-tags
  11. ember-codemod-css-modules
  12. ember-codemod-ember-render-helpers-to-v1
  13. ember-codemod-pod-to-octane
  14. ember-codemod-remove-ember-css-modules
  15. ember-codemod-remove-global-styles
  16. ember-codemod-remove-inject-as-service
  17. ember-codemod-rename-test-modules
  18. ember-codemod-sort-invocations
  19. ember-codemod-v1-to-v2
  20. ignore-lint-errors
  21. prettier-plugin-ember-hbs-tag
  22. shadcn-ember
  23. type-css-modules
  24. update-workspace-root-version