mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(linter): not use new_inline with flexible str (#2106)
This commit is contained in:
parent
4adce6fb45
commit
142f84f654
1 changed files with 6 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ impl Rule for NoNamedAsDefaultMember {
|
|||
return;
|
||||
};
|
||||
if let Some(module_name) =
|
||||
get_external_module_name_if_has_entry(ident, &Atom::new_inline(prop_str))
|
||||
get_external_module_name_if_has_entry(ident, &Atom::from(prop_str))
|
||||
{
|
||||
ctx.diagnostic(NoNamedAsDefaultMemberDignostic(
|
||||
match member_expr {
|
||||
|
|
@ -165,6 +165,11 @@ fn test() {
|
|||
const baz = {};
|
||||
const a = baz.a;
|
||||
}",
|
||||
r"import baz from './named-exports';
|
||||
{
|
||||
const baz = {};
|
||||
const a = baz.looooooooooooooooooooooooong;
|
||||
}",
|
||||
];
|
||||
|
||||
let fail = vec![
|
||||
|
|
|
|||
Loading…
Reference in a new issue