Bug: [prefer-for-of] triggered for loops that can not be converted #8984
Labels
awaiting response
Issues waiting for a reply from the OP or another party
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.4.5&fileType=.ts&code=MYewdgzgLgBADgQwE4QKZJgXhmVB3GAEQHkBZABWTSQAoBKAbgFgAoUSWRFVAEy3iroAdFzQAxJCAC2AZShIAlmADmNAOQRpqGAA8pAGzUAaGGqiodUAPR7DjVu2gwkqCAFd9UAHIger-qK8QsqoUACi%2BqhSqGBQEABCAJ4AKgjKXgjR6prRAPpgvqhq9iysVlYwAAJQiXCuwIpwUAC0rvpK1nAuAGbozd0gSM0g3TCgUnD6CEoQMFAAFgiwAEao%2BiAE6yBwMBDzIB58q86okwjAvDDLiTADQyOsdzA0kbAK-AAMDDDvADwn7k8Pj8ECEkRUC2%2BCgA1NC6DAAN6sGAwcq7KBubrdVgAX1YZQqyzcsAWSxgPBA-gKsFQADcYmNpHAFJErqhgAg3GgYAAJZKkAAyAGEQPpIsAoApwMRRhSqSBYIt6TAANoyRJSZaioQKcxIJaDAC6j0Gz0csCQYBgIwBHm8hQg8KRLBRaOgmOxLDxpRYQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Y6RAM0Wlq4D2fAV3RRe0IZHBgAviFlA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eFYDArugDTg2SrIARqwDavGlHQkATAAZp0yDwm0AJgkjiwAXV4BfEHqA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
The rule suggesting the conversion to for-of loop should not trigger in this case
Actual Result
Rule triggers, suggesting uncompilable conversion
Additional Info
No response
The text was updated successfully, but these errors were encountered: