Skip to content

Commit 148c7a8

Browse files
authored
fix(linter): replace bitwise AND (&) with logical AND (&&) in explici… (#5780)
…t_function_return_type rule This PR fixes an issue where the Bitwise AND (&) operator was mistakenly used in a conditional statement, instead of the Logical AND (&&) operator.
1 parent e613a3d commit 148c7a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/oxc_linter/src/rules/typescript/explicit_function_return_type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl Rule for ExplicitFunctionReturnType {
164164
fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
165165
match node.kind() {
166166
AstKind::Function(func) => {
167-
if !func.is_declaration() & !func.is_expression() {
167+
if !func.is_declaration() && !func.is_expression() {
168168
return;
169169
}
170170

0 commit comments

Comments
 (0)