reindent
Reindent and trim code
Installation
npm i reindent -g
Usage
God! it is too complex, close this project!
reindent *.js *.json
complex usage
find . -name '*.js' -exec reindent {} +
Option
Usage: reindent [options] <file ...> Options: -h, --help output usage information -V, --version output the version number -i, --in-place edit files in place like sed -i -v, --verbose verbose info --indent [val] code indent, default is tab
Support
- javascript
- json
Don't support below
if code
use
if code
or
if code
Don't write open bracket at the end of comment
// something {// it will be indented