Ronen Amiel
Ronen Amiel
I'm having a hard time finding time to finish working on this, I hope I can get back to this soon, but I'm closing this PR until I do. If...
feat(eslint-plugin): [strict-boolean-expressions] check array predicate functions' return statements
Please note that this feature is not behind a flag, which means it will be a breaking change. I don't know how many lint failures this adds to an average...
feat(eslint-plugin): [strict-boolean-expressions] check array predicate functions' return statements
> > breaking change > > From https://typescript-eslint.io/users/versioning/#eslint-plugin: > > > A change to the plugins **_shall not_** be considered breaking if it: > > ... > > > >...
feat(eslint-plugin): [strict-boolean-expressions] check array predicate functions' return statements
> btw - sorry for taking so long to get around to a review on this! No problem, I appreciate your assistance with the PR, it's been very helpful š
Would it make sense to also prevent calling `.toString()` or stringifying a non to-string array ([effectively the same as `.join()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString#description))? ```ts // both resolve to `[object Object],[object Object]` [{}, {}].toString();...
> @ronami is this ready for re-review? > > We normally wait to be explicitly re-requested, so we're holding off posting more comments for now. Oh, I wasn't aware of...
I like this idea, having less dependencies is always nice. However, I think it may take some time forĀ `tinyglobby`Ā to be as stable asĀ `fast-glob`, and using it now...
Thanks @kirkwaiblinger! I'm really sorry for how long it took me to get back to this.
I initially thought this was a duplicate of #6951, where a type parameter gets "backfilled" if it's only used in the return position (definitely +1 to investigate if this can...
@Josh-Cena from what I can see, a similar fix may be necessary for `@typescript-eslint/restrict-template-expressions` and `@typescript-eslint/restrict-plus-operands` too ([see here on the playground](https://typescript-eslint.io/play/#ts=4.8.4&fileType=.ts&code=CYUwxgNghgTiAEYD2A7AzgF3lAXPA3gFDzwDaAygJ4C2ARkhAHQZIAKMAltRxhwG4gAugAoAlHkycUAcwDchAL7zCAAwAk%2BKApXLk6LLXgBebPADU8AOSX5QA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1oCMBDZRLXxdk%2BKkwDm6KImjQO0SABpw2PEVLIK1Og2ZtoKMZTJ18iALbF4vc-QAexQ8mSUOTVBkiz5ildigCEnIqGnpkRhZWZ2NTWmtYZFoOUmheJgATTxk5BUhVAF8QAqA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false)). Does this make sense? I'll be happy to...