Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: consistent-type-imports support importKind type #5927

Closed
4 tasks done
kentcdodds opened this issue Nov 4, 2022 · 4 comments
Closed
4 tasks done

Enhancement: consistent-type-imports support importKind type #5927

kentcdodds opened this issue Nov 4, 2022 · 4 comments
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@kentcdodds
Copy link
Contributor

Before You File a Proposal Please Confirm You Have Done The Following...

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Link to the rule's documentation

https://typescript-eslint.io/rules/consistent-type-imports/

Description

I'd like an option that allows ESLint to auto-fix from this:

import type { ActionArgs } from '@remix-run/node'
import { json } from '@remix-run/node'

To this:

import { type ActionArgs, json } from '@remix-run/node'

Basically, I want to only have a single import from a single module and I want type imports to be treated as type imports.

Fail

import type { ActionArgs } from '@remix-run/node'


### Pass

```typescript
import { type ActionArgs } from '@remix-run/node'


### Additional Info

_No response_
@kentcdodds kentcdodds added enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Nov 4, 2022
@Josh-Cena
Copy link
Member

Looks like a duplicate of #4338?

@Josh-Cena Josh-Cena added awaiting response Issues waiting for a reply from the OP or another party and removed triage Waiting for maintainers to take a look labels Nov 4, 2022
@bradzacher
Copy link
Member

Yup duplicate!

@bradzacher bradzacher closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
@bradzacher bradzacher added duplicate This issue or pull request already exists and removed enhancement: plugin rule option New rule option for an existing eslint-plugin rule awaiting response Issues waiting for a reply from the OP or another party labels Nov 4, 2022
@kentcdodds
Copy link
Contributor Author

Thanks! Sorry I missed it.

@snewcomer
Copy link
Contributor

@kentcdodds We are close! 2 more PRs left❗❕

import-js/eslint-plugin-import#2475
#5050

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

4 participants