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

feature request: add ignore options for `import/no-duplicates` #1479

Open
JounQin opened this issue Sep 17, 2019 · 2 comments
Open

feature request: add ignore options for `import/no-duplicates` #1479

JounQin opened this issue Sep 17, 2019 · 2 comments

Comments

@JounQin
Copy link
Contributor

@JounQin JounQin commented Sep 17, 2019

When using TypeScript with date-fns, it only has one bundled typings.d.ts, so eslint-import-resolver-ts will resolve all modules to it.

But they are not all exported from date-fns, what means date-fns and date-fns/locale are different.

So we should allow this case by whitelist.

@ljharb

This comment has been minimized.

Copy link
Collaborator

@ljharb ljharb commented Sep 17, 2019

This seems like an inherent flaw in resolving a module to a d.ts file that might represent multiple files. I don’t think forcing an allowlist is an elegant solution; I’d prefer to find a better one.

@JounQin

This comment has been minimized.

Copy link
Contributor Author

@JounQin JounQin commented Sep 17, 2019

If we do have a better one, that will be greater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.