diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_camel_case.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_camel_case.rs index 93244948327..e04ce413e69 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_camel_case.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_camel_case.rs @@ -85,9 +85,8 @@ fn is_non_camel_ok(binding: &JsIdentifierBinding, model: &SemanticModel) -> Opti for reference in binding.all_reads(model) { let greatparent = reference.node().grand_parent()?; - match greatparent.kind() { - JS_NEW_EXPRESSION => return Some(true), - _ => {} + if let JS_NEW_EXPRESSION = greatparent.kind() { + return Some(true); } } diff --git a/crates/rome_js_analyze/tests/specs/nursery/useCamelCase.js.snap b/crates/rome_js_analyze/tests/specs/nursery/useCamelCase.js.snap index 18cc019a7e1..5be10545027 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useCamelCase.js.snap +++ b/crates/rome_js_analyze/tests/specs/nursery/useCamelCase.js.snap @@ -209,7 +209,7 @@ Safe fix: Rename this symbol to camel case ``` ``` -warning[js/useCamelCase]: Prefer functions names in camel case. +warning[nursery/useCamelCase]: Prefer functions names in camel case. ┌─ useCamelCase.js:45:10 │ 45 │ function PascalCaseNOk() { }