diff --git a/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs b/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs index b8cc036ebb39a..57f3e9b84b52a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs +++ b/crates/oxc_linter/src/rules/eslint/no_lone_blocks.rs @@ -83,10 +83,7 @@ impl Rule for NoLoneBlocks { { mark_lone_block(node, &mut lone_blocks); } - Some(Declaration::ClassDeclaration(_)) => { - mark_lone_block(node, &mut lone_blocks); - } - Some(Declaration::FunctionDeclaration(_)) => { + Some(Declaration::ClassDeclaration(_) | Declaration::FunctionDeclaration(_)) => { mark_lone_block(node, &mut lone_blocks); } _ => {}