Ronen Amiel
Ronen Amiel
> Oh, the repro repo is unnecessary, actually; here's an easy playground repro: https://typescript-eslint.io/play/#ts=5.6.2&fileType=.tsx&code=HYQwtgpgzgDiDGEAEAVJBvAUEpEAeMA9gE4AuSAlsKRMQGYLIBihhGAvpp5vkWUvAA2IKFCQAhEMQA8KAHyUwMQREjUxKAHQs2WHFEKQAshFIALQgBMAFADcQggK4QAXKgCUGbDgGFgBlU1BQgBzOwdndwBub05OIA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tidmUQAmtAG4BDaKgyQA7uKaRwYAL4glQA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false I think this also includes a missing report, if the generic `T` is unused ([playground link](https://typescript-eslint.io/play/#ts=5.6.2&fileType=.tsx&code=PTAECcFMAcHtwC6QCagIYGdQFcB22MVQAjbBUDAC1mwBtlcByBAKFzQFtINo0BjSKAAqoAN4tQoSAA84iUAEtcScADN%2BggGKxYYgL4sDLEIoxNyUOUlSYc%2BQqlLkqNeiUgsZV0H1qYsAEJo4AA8QgB8ihzQtJBcylhCAHTauuIGQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tidmUQAmtAG4BDaKgyQA7uKaRwYAL4glQA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false)).
I looked a bit more into this, and it seems like an issue with the scope manager that affects more than `no-unused-vars`, `implements` and `namespace`s. Some examples: - [`no-unused-vars`](https://typescript-eslint.io/play/#ts=5.6.2&showAST=scope&fileType=.tsx&code=PTAECcFMAcHtwC6QCagEYFcGgM4AtYMAbZAOwHIEAoSUjAW1ADFZZQBvK0UAIQENwAGioBfKlRCgEAT2iRQ0AX3qQk4UAAMWsDbgLFUaeVDiIUoPjlAY6Oc5mwBLHBWqQAHqewBjIpasAKgA82gB8HFygKggEyAAUAJQAXMysAHT86pzc3JKRYmISYHxEOLBpFeKS%2BIQk6MYw8Eiolta29ligzq5UMnK8AqAAvKAAjADcVWAx8hqZulAAZpBQpN7yzhCQAObOauatfFvLq%2BtSbDMWaLAAbpBFoADueI7eeLiQkPRWjmvwUN5qH15PwAF6g4YDcBpAASkGkkyAA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tidmUQAmtAG4BDaKgyRE0aB2iRwYAL4hlQA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false) (not...
I looked into this for a while, and have some thoughts/questions: - What's the best way to resolve the issue? According to this issue (at least to my understanding), the...
Would it make sense for this to be split into two rules (e.g. `no-useless-default-parameters` and `no-useless-default-values`)? These two examples check for unnecessary destructuring default values: ```ts function Bar({ foo =...
👍 Interesting! I think there are similar variations of this ([playground link](https://typescript-eslint.io/play/#ts=5.8.2&fileType=.ts&code=GYVwdgxgLglg9mABDAzgZSgJxmA5gCgDcBDAGxAFMAuRcAazDgHcwBKGk8i5FRFLHLkQBvAFCJEmClBCYkUAJ4AHCnGCJOlRAF5diAOT9sefQG5RAX1GiAJhQiliUxBAT8%2BNMCAC2AIwqY5qIw6vioGMYEKKysIuJ8ogD0iYgAegD8ltYhiPiKKmp8OnqGAiaxYhIoSSkZWUA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0yHJgBNK%2BSpPRgA2uGw5E0aB2iQANKrVY12SGQAW-ANYAVEogAK0RDLJD8KRfjiID2AL6%2BALqqAX5AA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false)): ```ts function isString(value: unknown): value is string { return typeof value === 'string'; } declare const s: number;...
Hmm some questions/thoughts after looking into this some more - - > This isn't just checker.isAssignableTo(argumentType, predicateType) because the logic is really whether the intersection of the argument type and...