Replaces
R.merge(a, b)with{ ...a, ...b }
Using npm
npm install --save-dev babel-plugin-ramda-no-useless-mergeor using yarn
yarn add babel-plugin-ramda-no-useless-mergeconst c = R.merge(a, b);const c = { ...a, ...b };{
"plugins": ["ramda-no-useless-merge"]
}babel --plugins ramda-no-useless-merge script.js- Babel Plugin Handbook by @thejameskyle
- Using Babel to Codemod your Code by @kentcdodds
- Frontend Masters Course - Code Transformation and Linting with ASTs by @kentcdodds
- AST Explorer
MIT