Use 🐊Putout as babel plugin
.
In
// input code
const s = 'hi';
Out
// output code
$ npm install babel-plugin-putout
.babelrc.json
{
"plugins": [
["putout", {
"rules": {
"remove-unused-variables": false
}
}]
]
}
$ babel --plugins putout script.js
require('babel-core').transform('code', {
plugins: ['putout'],
});