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

Support "Arbitrary module namespace identifier names" #2355

Closed
sosukesuzuki opened this issue Jan 15, 2022 · 3 comments · Fixed by #2358
Closed

Support "Arbitrary module namespace identifier names" #2355

sosukesuzuki opened this issue Jan 15, 2022 · 3 comments · Fixed by #2358

Comments

@sosukesuzuki
Copy link
Contributor

Some rules need to be changed for tc39/ecma262#2154?

related:

@ljharb
Copy link
Member

ljharb commented Jan 15, 2022

If so, a PR with test cases would be most helpful.

However, I'd expect no changes are needed, since we rely on the parser to handle this.

@sosukesuzuki
Copy link
Contributor Author

However, I'd expect no changes are needed, since we rely on the parser to handle this.

For example, no-named-default should warn for the below code:

import { "default" as bar } from "./bar";

However, current one doesn't warn. We should also handle specifier.imported.value because specifier.imported can be a Literal on

if (im.type === 'ImportSpecifier' && im.imported.name === 'default') {
.

These small changes need to be made for many rules.

@ljharb
Copy link
Member

ljharb commented Jan 15, 2022

Good catch! A PR would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants