import-sort
import-sort copied to clipboard
Add stdin support to import-sort-cli
This PR add the support for applying import sort to a file passed in through stdin
.
Two options are added to the import-sort
CLI util:
-
--stdin
: Makeimport-sort
read from stdin. Requires--stdin-filepath
; conflicts with--write
. -
--stdin-filepath=<path>
: Assumed path to file.
Example invocation:
cat x.js \
| import-sort-cli --stdin --stdin-filepath='src/model/A.js' \
| prettier --stdin --stdin-filepath='src/model/A.js'
This is excellent!
@renke Any chance you can merge this soon? My team could really use this feature.