You'll need to have lebab and prettier installed. Keep in mind some of lebab's transforms are unsafe, so don't use the resulting code in production without first testing it.
Output cleaned contents to stdout:
cat somefile.js | clean-js
Write cleaned contents to file:
cat somefile.js | clean-js > someotherfile.js
Replace file with cleaned contents:
cat somefile.js | clean-js | tee somefile.js
And so on.