Enforce a pure-functional subset of JS
npm i --save-dev babel-plugin-pure-js
- Add the plugin to your .babelrc
- Name any Pure JS files to end with
.pure.js
Example .babelrc:
{
"presets": ["env"],
"plugins": ["pure-js", "transform-object-rest-spread"]
}