{"id":50874715,"url":"https://github.com/dherault/eslint-plugin-type-imports","last_synced_at":"2026-06-15T08:32:18.847Z","repository":{"id":351321441,"uuid":"1210478932","full_name":"dherault/eslint-plugin-type-imports","owner":"dherault","description":"A Eslint plugin to lint TypeScript type imports","archived":false,"fork":false,"pushed_at":"2026-04-14T13:35:07.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T15:29:17.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dherault.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-04-14T13:06:36.000Z","updated_at":"2026-04-14T13:35:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dherault/eslint-plugin-type-imports","commit_stats":null,"previous_names":["dherault/eslint-plugin-type-imports"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dherault/eslint-plugin-type-imports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Feslint-plugin-type-imports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Feslint-plugin-type-imports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Feslint-plugin-type-imports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Feslint-plugin-type-imports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dherault","download_url":"https://codeload.github.com/dherault/eslint-plugin-type-imports/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dherault%2Feslint-plugin-type-imports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34355157,"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-15T02:00:07.085Z","response_time":63,"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":[],"created_at":"2026-06-15T08:32:17.476Z","updated_at":"2026-06-15T08:32:18.829Z","avatar_url":"https://github.com/dherault.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-type-imports\n\nAn ESLint plugin to enforce consistent usage of TypeScript type imports.\n\n## Installation\n\n```bash\nnpm install --save-dev eslint-plugin-type-imports\n```\n\n## Configuration\n\nAdd the plugin to your ESLint config (`eslint.config.js`):\n\n```javascript\nimport typeImports from 'eslint-plugin-type-imports'\n\nexport default [\n  // ... other configs\n  typeImports.configs.recommended,\n]\n```\n\n## Rules\n\n### `enforce-consistent-type-keyword-in-imports`\n\nEnforces that type imports use the `type` keyword outside of curly braces rather than inline on each specifier.\n\n**Bad:**\n```typescript\nimport { type User } from './types'\nimport { type User, type Post } from './types'\n```\n\n**Good:**\n```typescript\nimport type { User } from './types'\nimport type { User, Post } from './types'\n```\n\n---\n\n### `prevent-duplicate-imports`\n\nPrevents multiple import statements from the same package or path. The auto-fix merges them into a single import.\n\n**Bad:**\n```typescript\nimport { a } from './utils'\nimport { b } from './utils'\n```\n\n**Good:**\n```typescript\nimport { a, b } from './utils'\n```\n\nType imports are handled correctly:\n\n```typescript\n// Two type-only imports are merged with the type keyword preserved\nimport type { A } from './types'\nimport type { B } from './types'\n// → import type { A, B } from './types'\n\n// Mixed value and type imports are merged with inline type specifiers\nimport { a } from './utils'\nimport type { B } from './utils'\n// → import { a, type B } from './utils'\n```\n\nDefault imports are merged with named imports:\n\n```typescript\nimport def from './module'\nimport { a } from './module'\n// → import def, { a } from './module'\n```\n\n\u003e **Note:** Namespace imports (`import * as ns`) and side-effect imports (`import './module'`) are excluded from this rule and left as-is.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdherault%2Feslint-plugin-type-imports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdherault%2Feslint-plugin-type-imports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdherault%2Feslint-plugin-type-imports/lists"}