{"id":51119023,"url":"https://github.com/sulthonzh/deadcode-hunter","last_synced_at":"2026-06-25T00:30:38.309Z","repository":{"id":365160082,"uuid":"1267759046","full_name":"sulthonzh/deadcode-hunter","owner":"sulthonzh","description":"Find unused exports and dead code paths in JS/TS projects. Zero deps.","archived":false,"fork":false,"pushed_at":"2026-06-16T05:19:50.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T07:43:32.785Z","etag":null,"topics":["dead-code","javascript","static-analysis","typescript","unused-exports"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sulthonzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-12T20:49:14.000Z","updated_at":"2026-06-16T05:16:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sulthonzh/deadcode-hunter","commit_stats":null,"previous_names":["sulthonzh/deadcode-hunter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sulthonzh/deadcode-hunter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdeadcode-hunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdeadcode-hunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdeadcode-hunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdeadcode-hunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sulthonzh","download_url":"https://codeload.github.com/sulthonzh/deadcode-hunter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdeadcode-hunter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34755061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dead-code","javascript","static-analysis","typescript","unused-exports"],"created_at":"2026-06-25T00:30:38.237Z","updated_at":"2026-06-25T00:30:38.289Z","avatar_url":"https://github.com/sulthonzh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deadcode-hunter 🧹\n\nFind unused exports and dead code paths in your JS/TS projects. Zero dependencies.\n\nBecause shipping code nobody imports is like writing a letter nobody reads — it's there, it takes up space, and it confuses anyone who opens the file.\n\n## What it does\n\nScans your source tree, extracts every `export` and every `import`, then tells you which exported symbols are never imported anywhere. Supports:\n\n- Named exports (`export const/function/class/interface/type`)\n- Default exports\n- Export lists (`export { a, b }`)\n- Named imports, default imports, star imports\n- CommonJS `require()` with destructuring\n- Dynamic `import()`\n- Re-exports (`export * from '...'`)\n\n## Install\n\n```bash\nnpm install -g deadcode-hunter\n# or\nnpx deadcode-hunter ./src\n```\n\n## Usage\n\n```bash\n# Basic scan\ndeadcode-hunter ./src\n\n# JSON output (for tooling)\ndeadcode-hunter ./src --json\n\n# Specify entry points (always considered \"used\")\ndeadcode-hunter ./src --entry index.ts,cli.ts\n\n# Custom extensions and ignore patterns\ndeadcode-hunter ./src --ext .js,.ts --ignore dist,generated\n```\n\n## Programmatic API\n\n```js\nconst { analyze, formatResults } = require('deadcode-hunter');\n\nconst results = analyze('./src', {\n  extensions: ['.js', '.ts'],\n  entryPoints: ['index.ts'],\n  ignore: [/node_modules/, /dist/],\n});\n\nconsole.log(formatResults(results));\n// or use results.unusedExports directly\n```\n\n## Output example\n\n```\nFound 3 unused export(s):\n\n  src/utils.js\n    → formatDate (line 12, named)\n    → parseConfig (line 45, named)\n\n  src/api.js\n    → default (line 1, default)\n\nStats: 28 exports, 25 used, 3 unused (89% usage)\nFiles scanned: 14\n```\n\n## CI Integration\n\nExit code is `1` if any unused exports are found, `0` if clean. Perfect for CI pipelines:\n\n```yaml\n- name: Check for dead code\n  run: npx deadcode-hunter ./src\n```\n\n## Why?\n\nTree-shaking helps at bundle time, but dead code still hurts during development:\n- More code to read and understand\n- More code to maintain and test\n- Confusing API surface (\"is anyone using this?\")\n\nDeadcode Hunter catches it at the source level, before it even gets to your bundler.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fdeadcode-hunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulthonzh%2Fdeadcode-hunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fdeadcode-hunter/lists"}