shvgn / organize-imports-cli

VS Code's 'Organize imports' executable from command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

organize-imports-cli

VS Code's 'Organize imports' executable from command line

Plays nicely with Prettier and lint-staged:

"lint-staged": {
  "*.ts": [
    "organize-imports-cli",
    "prettier --write",
    "git add"
  ]
}

Usage

> 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.

About

VS Code's 'Organize imports' executable from command line


Languages

Language:JavaScript 98.3%Language:TypeScript 1.7%