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