We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ff113 commit 146c6f7Copy full SHA for 146c6f7
crates/oxc_linter/src/rules/eslint/no_unused_vars/tests/oxc.rs
@@ -277,6 +277,13 @@ fn test_vars_discarded_reads() {
277
return (yield fn(), 1);
278
}
279
}",
280
+ // https://github.com/oxc-project/oxc/issues/12592
281
+ "export const Foo = ({ onDismiss }) => {
282
+ const { remove } = useToaster();
283
+ return (
284
+ <button onClick={() => (onDismiss?.(), remove())}>x</button>
285
+ );
286
+ };",
287
];
288
289
let fail = vec![
crates/oxc_linter/src/rules/eslint/no_unused_vars/usage.rs
@@ -651,6 +651,7 @@ impl<'a> Symbol<'_, 'a> {
651
AstKind::CallExpression(_)
652
| AstKind::AwaitExpression(_)
653
| AstKind::YieldExpression(_)
654
+ | AstKind::ChainExpression(_)
655
) {
656
continue;
657
0 commit comments