You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking into this Definitely Typed pull request and picking through the issues with @JoshuaKGoldberg. We encountered an interesting case with the no-unnecessary-generics rule which we think could be better. Consider:
You'll note that we have an eslint-disable-next-line just before the last line; the ReturnType of the method. Without this in place the red squigglies would be under:
JQuery<TElement>~~~~~~~~
This isn't the useful place to have this report. Perhaps the better place would be the first mention of TElement, like so:
Hi all!
I've been looking into this Definitely Typed pull request and picking through the issues with @JoshuaKGoldberg. We encountered an interesting case with the
no-unnecessary-generics
rule which we think could be better. Consider:You'll note that we have an
eslint-disable-next-line
just before the last line; the ReturnType of the method. Without this in place the red squigglies would be under:This isn't the useful place to have this report. Perhaps the better place would be the first mention of
TElement
, like so:Looking at
DefinitelyTyped-tools/packages/eslint-plugin/src/rules/no-unnecessary-generics.ts
Line 57 in 822dadb
Is this good? What do you think?
The text was updated successfully, but these errors were encountered: