--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.cjs --- # Input ```cjs with (obj?.foo) {}; ``` # Diagnostics ``` invalid.cjs:1:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. > 1 │ with (obj?.foo) {}; │ ^^ 2 │ i If it short-circuits with 'undefined' the evaluation will throw TypeError here: > 1 │ with (obj?.foo) {}; │ ^^^^^^^^^^^^^^^^^^ 2 │ ```