.codemodrc.json
configuration file in its root directory.codemodrc.json
configuration file allows Codemod platform to better understand information about your codemod, as well as bring an enhanced running experience.
The structure of the codemod package can vary based on the codemod engine used. This document explains the requirements for a valid codemod package for each of the supported codemod engines.
.codemodrc.json
reference.codemodrc.json
configuration file includes several metafields that can be used to help Codemod platform understand more information about your codemod package.
private
.@codemod/my-codemod
, visibility will default to private
unless explicitly specified.ast-grep
jscodeshift
ts-morph
workflow
recipe
(requires additional names
field, which is an ordered array of codemod names that will be executed)from
and to
keys that are both arrays of tuples.
This field can be used to specify the dependencies and versions this codemod is made for.Specifying the applicability criteria of your codemod helps:<
, >
, <=
, >=
, =
)-
sign.
Each dependency should be a string in one of the following formats:package-name@version
-package-name
package-name
src/index.{js,ts}
path and ast-grep uses **/rule.yaml
patterns.