File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
crates/oxc_linter/src/rules/eslint/no_unused_vars Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,13 @@ fn test_vars_discarded_reads() {
277277 return (yield fn(), 1);
278278 }
279279 }" ,
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+ };" ,
280287 ] ;
281288
282289 let fail = vec ! [
Original file line number Diff line number Diff line change @@ -651,6 +651,7 @@ impl<'a> Symbol<'_, 'a> {
651651 AstKind :: CallExpression ( _)
652652 | AstKind :: AwaitExpression ( _)
653653 | AstKind :: YieldExpression ( _)
654+ | AstKind :: ChainExpression ( _)
654655 ) {
655656 continue ;
656657 }
You can’t perform that action at this time.
0 commit comments