Skip to content

@pumpkin-plugins/codemod API / types / CodemodDefinition

Interface: CodemodDefinition ​

Defined in: types.ts:2

Defines a named transformation the codemod CLI can discover and run.

Properties ​

description ​

description: string

Defined in: types.ts:4

Short summary shown by the codemod list command.


id ​

id: string

Defined in: types.ts:6

Stable identifier used as the CLI argument.

Methods ​

matchesFile() ​

matchesFile(relativePath): boolean

Defined in: types.ts:9

Selects files this codemod understands, using a project-relative path.

Parameters ​

relativePath ​

string

Returns ​

boolean


transform() ​

transform(context): TransformResult

Defined in: types.ts:12

Transforms one selected file and may return review notes for the user.

Parameters ​

context ​

TransformContext

Returns ​

TransformResult

pumpkin-plugins documentation