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

Incorrect reporting of an issue from import/no-named-as-default #2894

Closed
amiramix opened this issue Oct 6, 2023 · 3 comments
Closed

Incorrect reporting of an issue from import/no-named-as-default #2894

amiramix opened this issue Oct 6, 2023 · 3 comments

Comments

@amiramix
Copy link

amiramix commented Oct 6, 2023

@testing-library exports both, default and named export using the same name, i.e.:

export { userEvent as default, userEvent } from './setup/index.js';

We then import it with

import userEvent from '@testing-library/user-event'

Which eslint incorrectly reports as error:

 error  Using exported name 'userEvent' as identifier for default export

Can the rule be modified to accept a list of named exports to ignore?

@VigneshElangovan52
Copy link

Facing a similar issue when we try to upgrade testing-library/user-event to v14.4.3. Were you able to find any workaround or so? @amiramix
Any updates or addresses from the team would be very helpful. Thanks!

@ljharb
Copy link
Member

ljharb commented Jul 12, 2024

This is a bug that should be fixed; adding an ignore list would just be papering over the problem.

@akwodkiewicz
Copy link
Contributor

Duplicate of #1594

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants