Bug: @typescript-eslint/prefer-nullish-coalescing mal-fixes nested condition #11097
Open
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.7.2&showAST=types&fileType=.tsx&code=DYUwLgBAhgXBDOYBOBLAdgcwgHwgVzQBMQAzdEQgKFEgCM4BvCAWxHnigxDkVUwgC%2BOfEVLkqAYwD2aRBEgBeCAAowPZOgwBKCAoB88ypWmzIJKVN3RKEW3YD81u3bi0bzhxFoA6Vu04g7h4QcGDKAEQYwFK0UMDeIEhIUkjeBADWaFIA7mjhWpRAA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Y6RAM0WlqYSNkAC1pkA9gEMkyMswDm6KL2jjokcGAC%2BILUA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
The error happens when running the
Fix
on this rule: It breaks the code.ESLint Config
tsconfig
Expected Result
Actual Result
Additional Info
No response
The text was updated successfully, but these errors were encountered: