Skip to content

Commit

Permalink
added test with scope
Browse files Browse the repository at this point in the history
  • Loading branch information
XantreDev committed Jan 12, 2024
1 parent 068e73d commit dce6616
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ fn test() {
r#"import baz from "./named-exports"; const a = baz.a;"#,
r#"import baz from "./named-exports"; const a = baz["a"];"#,
r#"import baz from "./named-exports"; baz.a();"#,
r"import baz from './named-exports';
{
const a = baz.a;
}",
r#"import baz, { bar } from "./named-exports"; const {a} = baz"#,
r#"import baz from "./named-and-default-export"; const {foo: _foo} = baz"#,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ expression: no_named_as_default_member
╰────
help: Check if you meant to write `import {a} from "./named-exports"`

eslint-plugin-import(no-named-as-default-member): "baz" also has a named export "a"
╭─[index.js:2:1]
2 │ {
3const a = baz.a;
· ─────
4 │ }
╰────
help: Check if you meant to write `import {a} from "./named-exports"`

eslint-plugin-import(no-named-as-default-member): "baz" also has a named export "a"
╭─[index.js:1:1]
1import baz, { bar } from "./named-exports"; const {a} = baz
Expand Down

0 comments on commit dce6616

Please sign in to comment.