🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More →
Socket
Book a DemoSign in
Socket

@sharpinit/codemod

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sharpinit/codemod

Sharpinit's codemod

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

codemod

This repository contains a collection of codemod scripts based for use with jscodeshift that help update MUI APIs.

Setup & run

npx @sharpinit/codemod <codemod> <paths...>

Applies a `@sharpinit/codemod` to the specified paths

Positionals:
  codemod  The name of the codemod                                [string]
  paths    Paths forwarded to `jscodeshift`                       [string]

Options:
  --version  Show version number                                 [boolean]
  --help     Show help                                           [boolean]
  --dry      dry run (no changes are made to files)
                                                [boolean] [default: false]
  --parser   which parser for jscodeshift to use.
                                                [string] [default: 'tsx']
  --print    print transformed files to stdout, useful for development
                                                [boolean] [default: false]
  --jscodeshift                                  [string] [default: false]

Examples:
  npx @sharpinit/codemod direct-import src --jscodeshift="--modules=@mui/icons-material"

jscodeshift options

To pass more options directly to jscodeshift, use --jscodeshift="...". For example:

npx @sharpinit/codemod --jscodeshift="--run-in-band --verbose=2"

See all available options here.

Recast Options

Options to recast's printer can be provided through jscodeshift's printOptions command line argument

npx @sharpinit/codemod <transform> <path> --jscodeshift="--printOptions='{\"quote\":\"double\"}'"

Inspired by:

Keywords

codemod

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts