mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(linter): exclude typescript syntax function in only_used_in_recursion (#2595)
close: #2559
This commit is contained in:
parent
ac520d01a9
commit
c09c602ea0
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ impl Rule for OnlyUsedInRecursion {
|
||||||
|
|
||||||
let Some(function_id) = &function.id else { return };
|
let Some(function_id) = &function.id else { return };
|
||||||
|
|
||||||
if function.body.is_none() {
|
if function.is_typescript_syntax() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -233,6 +233,8 @@ fn test() {
|
||||||
return _get(target, property, receiver || target);
|
return _get(target, property, receiver || target);
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
|
"function foo() {}
|
||||||
|
declare function foo() {}",
|
||||||
];
|
];
|
||||||
|
|
||||||
let fail = vec![
|
let fail = vec![
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue