potiuk commented on PR #73488:
URL: https://github.com/apache/airflow/pull/73488#issuecomment-5985174332

   @bbovenzi @pierrejeambrun, could you review the lint changes in this 
Dependabot bump before it's merged?
   
   eslint-plugin-unicorn 73 → 76 widens two rules that `rules/unicorn.js` 
already sets to `ERROR`. Together they produced about 105 new errors on 
existing code:
   - `prefer-ternary`: applied with `--fix`.
   - `prefer-logical-operator-over-ternary`: 52 cases, rewritten by hand, e.g. 
`cond ? refetchInterval : false` → `cond && refetchInterval` and `cond ? false 
: x` → `!cond && x`. I checked that each condition is a real boolean, so 
results don't change.
   
   A few spots worth a closer look:
   - `PoolForm.tsx`: the validator is now one ternary on 
`Number.isFinite(value)`.
   - `queryClient.ts`: the retry condition is negated with De Morgan's laws.
   - `utils.ts` (`isSelectionWithin`): rewritten as one `&&` chain.
   - `ClearTaskInstanceDialog.tsx`: `isDialogOpen` is hoisted to satisfy 
`jsx-no-leaked-render`.
   
   If you'd rather not adopt the widened rules, the alternative is to switch 
them off in `rules/unicorn.js` and drop this commit.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by @potiuk before posting
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to