fix(linter): exclude typescript syntax function in only_used_in_recursion (#2595)

close: #2559
This commit is contained in:
Dunqing 2024-03-04 11:43:32 +08:00 committed by GitHub
parent ac520d01a9
commit c09c602ea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ impl Rule for OnlyUsedInRecursion {
let Some(function_id) = &function.id else { return };
if function.body.is_none() {
if function.is_typescript_syntax() {
return;
}
@ -233,6 +233,8 @@ fn test() {
return _get(target, property, receiver || target);
}
"#,
"function foo() {}
declare function foo() {}",
];
let fail = vec![