Skip to content

Feature request: npx react-codemod ./path/to/local/codemod #282

Open

Description

@threepointone

The cli experience of react-codemod is quite nice, and has made running codemods on react codebases very pleasant/accessible. Occasionally this repo will get a request to add a new type of codemod (or I'll hear about it on twitter), and the suggestion is that they use jscodeshift directly for their requirements. Which is fine, but means they have to rediscover some of the cli args that we pass to jscodeshift by default, and other niceties.

My proposal is that we allow react-codemod to accept a local path alongside the known codemods. So running npx react-codemod ./path/to/local/codemod should "just work".

Submitting this RFC because it came to mind, not sure when I'll work on it myself; others are free to try it if they'd like, and I'd be happy to review a PR.

Activity

  1. changed the title [-]RFC: npx react-codemod ./path/to/local/codemod[/-] [+]Feature request: npx react-codemod ./path/to/local/codemod[/+] on Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions