You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the round-3 adversarial review of #1310 (MEDIUM): publy/no-iife does not peel ConditionalExpression / LogicalExpression callees, so these IIFEs pass unflagged (verified RC=0, not covered by no-iife.test.ts):
(cond ? ()=>1 : ()=>2)();(cond&&(()=>3))();
Fix
In unwrapCallee, peel ConditionalExpression (both branches) and LogicalExpression (both operands): if ANY reachable branch is a function literal, report.
RuleTester cases red on the current rule for both shapes (+ nested a ? (b ? fn : fn2) : fn3), and precision cases where no branch is a function literal.
From the round-3 adversarial review of #1310 (MEDIUM):
publy/no-iifedoes not peelConditionalExpression/LogicalExpressioncallees, so these IIFEs pass unflagged (verified RC=0, not covered byno-iife.test.ts):Fix
unwrapCallee, peelConditionalExpression(both branches) andLogicalExpression(both operands): if ANY reachable branch is a function literal, report.a ? (b ? fn : fn2) : fn3), and precision cases where no branch is a function literal.apps/front/src+packages/**with the rule at error; extract any real offender the same way as lint: add custom publy/no-iife (port from DigitalPrevention) and extract existing IIFEs #1310.Part of #1210.