Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thorn0/organize-imports-cli
VS Code's 'Organize imports' executable from command line
https://github.com/thorn0/organize-imports-cli
Last synced: 14 days ago
JSON representation
VS Code's 'Organize imports' executable from command line
- Host: GitHub
- URL: https://github.com/thorn0/organize-imports-cli
- Owner: thorn0
- Created: 2019-06-24T22:55:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T20:12:22.000Z (over 1 year ago)
- Last Synced: 2024-10-01T23:38:26.672Z (about 1 month ago)
- Language: JavaScript
- Size: 882 KB
- Stars: 99
- Watchers: 2
- Forks: 14
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# organize-imports-cli
> VS Code's '[Organize imports](https://code.visualstudio.com/updates/v1_23#_javascript-and-typescript-organize-imports)' executable from command line
Plays nicely with [Prettier](https://prettier.io) and [lint-staged](https://github.com/okonet/lint-staged):
```json
"lint-staged": {
"*.ts": [
"organize-imports-cli",
"prettier --write"
]
}
```## Usage
```console
> organize-imports-cli [--list-different] files...
```Files can be specific `ts` and `js` files or `tsconfig[.*].json`, in which case the whole project is processed.
Files containing the substring `// organize-imports-ignore` are skipped.
The `--list-different` flag prints a list of files with unorganized imports. No files are modified.