-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
feat(linter): eslint-plugin-import no-named-as-default-member rule #1988
Conversation
XantreDev
commented
Jan 11, 2024
•
edited
Loading
edited
- Docs: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md
- Code: https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default-member.js
- Tests: https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default-member.js
CodSpeed Performance ReportMerging #1988 will not alter performanceComparing Summary
|
708a1fa
to
b9c5eb0
Compare
crates/oxc_linter/src/rules/import/no_named_as_default_member.rs
Outdated
Show resolved
Hide resolved
b9c5eb0
to
068e73d
Compare
Will you merge it?) |
095182f
to
84a3604
Compare
Thank you! |
84a3604
to
64de6e9
Compare
AstKind::VariableDeclarator(decl) => { | ||
if let Some(Expression::MemberExpression(member_expr)) = &decl.init { | ||
process_member_expr(member_expr); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XantreGodlike I know why, these return
should be continue
? 🙃 Change this will let the below case fail.
import baz from './named-exports';
{
const baz = {};
const a = baz.a;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, will fix it in this week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…xc-project#1988) - Docs: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md - Code: https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default-member.js - Tests: https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default-member.js