Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@change-org/change-codemod

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@change-org/change-codemod

Codemods for automated JS code maintenance.

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

change-codemod

Codemods for automated JS code maintenance.

Setup

npm install

Available codemods

lodash-to-object-spread

TARGET=path/to/your/js/repo npm run lodash-to-object-spread
Description

Converts non-mutating usees of _.extend and _.assignIn to use object spread syntax.

Associated lint rule

change/prefer-object-spread-to-lodash

Development

Run tests

npm test

Creating a new codemod

Writing your codemod

TODO

https://astexplorer.net/ is very helpful here.

Testing your codemod

See https://github.com/facebook/jscodeshift#unit-testing

Implementing an npm script for your codemod
    "lodash-to-object-spread": "TRANSFORM_PATH=path/to/your/transform.js npm run codemod && TRANSFORM_PATH=path/to/another/transform.js npm run codemod"

FAQs

Package last updated on 29 Aug 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc