{"id":16773251,"url":"https://github.com/aeksco/ts-find-unused","last_synced_at":"2025-03-16T17:14:44.607Z","repository":{"id":88680782,"uuid":"410405140","full_name":"aeksco/ts-find-unused","owner":"aeksco","description":"CLI tool to find unused code in TypeScript projects ","archived":false,"fork":false,"pushed_at":"2022-01-30T00:37:05.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T03:46:01.623Z","etag":null,"topics":["cli","typescript","utility"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aeksco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T23:42:25.000Z","updated_at":"2023-03-24T05:40:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"62f3c3ca-7112-44c3-9c86-ea2d6a585014","html_url":"https://github.com/aeksco/ts-find-unused","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeksco%2Fts-find-unused","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeksco%2Fts-find-unused/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeksco%2Fts-find-unused/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeksco%2Fts-find-unused/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeksco","download_url":"https://codeload.github.com/aeksco/ts-find-unused/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902288,"owners_count":20366260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","typescript","utility"],"created_at":"2024-10-13T06:45:12.725Z","updated_at":"2025-03-16T17:14:44.583Z","avatar_url":"https://github.com/aeksco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ts-find-unused\n\nCLI tool to find unused code in TypeScript projects\n\n---\n\n### TODOs\n\n- Add remaining CLI options - what else here????\n\n- Add error handling when `tsconfig.json` can't be found\n\n- Add loading spinner? https://blog.bitsrc.io/build-command-line-spinners-in-node-js-3e432d926d56\n\n- Add some color to `printToStdout` function?\n\n- Documentation\n\n  - [IN_PROGRESS] Add proper header to `README.md`\n  - [IN_PROGRESS] Add `Installation Instructions` to `README.md` (just use `npx`?)\n  - [READY] Add `CONTRIBUTING.md`\n  - [IN_PROGRESS] Add PR template\n  - [READY] Add issue template\n  - [READY] Add .vscode directory w/ recommended extensions\n  - [READY] Add .github/DONATE configuration\n  - [READY] Update repo to scan for `.ts-find-unused.js` config\n  - [READY] Add option to fail when unused code is detected?\n  - [READY] Add note -\u003e you will need `noUnusedLocals` turned on in your `tsconfig.json` to find unused locals.\n\n  - Link issue requesting feedback to VSCode Extension\n\n  - Finalize name of project?\n\n    - `ts-find-unused`\n    - `ts-tidy`\n    - `ts-tidy-up`\n    - `tidy-up-ts`\n    - `typescript-tidy`\n    - `tidy-typescript`\n    - `@ts-tidy/cli`\n\n  - Layout release plan\n\n---\n\n### Installation \u0026 Usage\n\nYou can run the CLI app locally using [npx](https://www.npmjs.com/package/npx):\n\n```console\n[aeksco@local][my-project]$ npx ts-find-unused [...options]\n```\n\nYou can also install `ts-find-unused` as a development dependency in your TypeScript project and run it using an NPM script defined in your `package.json` file:\n\n```json\n{\n  \"scripts\": {\n    \"find-unused\": \"ts-find-unused\"\n  }\n}\n```\n\nYou can then run the `yarn find-unused` command to run `ts-find-unused` against your project.\n\n---\n\n### Example Usage\n\n**Basic / default:**\n\n- `ts-find-unused /path/to/project`\n\n**Debug flag:**\n\n- `ts-find-unused /path/to/project --debug`\n\n- `ts-find-unused /path/to/project -d`\n\n**Ignore Patterns** (comma separated)\n\n- `ts-find-unused /path/to/project --ignorePatterns=__tests__,stories`\n\n**Reference Ignore Patterns** (comma separated)\n\n- `ts-find-unused /path/to/project --reference-ignore-patterns=index.ts`\n\n**Output Format**\n\n- `ts-find-unused /path/to/project --outputFormat=txt` (default)\n\n- `ts-find-unused /path/to/project --outputFormat=markdown`\n\n- `ts-find-unused /path/to/project --outputFormat=json`\n\n**Output Destination**\n\n- `ts-find-unused /path/to/project --outputDestination=./unused.txt`\n\n- `ts-find-unused /path/to/project --outputFormat=markdown --outputDestination=./unused.md`\n\n- `ts-find-unused /path/to/project --outputFormat=json --outputDestination=./unused.json`\n\n### Developing\n\nRun `yarn build` to build the CLI app locally:\n\n```\nyarn build\n```\n\nYou can run the CLI app locally like so:\n\n```\nnode ./bin/ts-find-unused.js\n```\n\n### Built With\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [Commander.js](https://github.com/tj/commander.js/)\n- [Chalk](https://github.com/chalk/chalk)\n- [Jest](https://jestjs.io/)\n- [Prettier](http://prettier.io/)\n- [ts-morph](https://github.com/dsherret/ts-morph)\n\n### License\n\nReleased and distributed under the [MIT License](https://github.com/aeksco/ts-find-unused/blob/main/LICENSE). Build with :heart: by [@aeksco](https://twitter.com/aeksco).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeksco%2Fts-find-unused","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeksco%2Fts-find-unused","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeksco%2Fts-find-unused/lists"}