Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this makes sense technically 😄. But working with types like this can be irksome since you have to do it consistently. Is there an end-user reason for this change?
I'm not opposed to it, just curious how it came up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh hi 😄.
It's true that this isn't a random PR out of nowhere. I was reviewing my
typescript-eslint
rule typings (I have only 4 of them and they are for a no-deadline personal project, which means that there's room for everything + the kitchen sink in it) and originally I had something like the following:I checked
no-invalid-void-type
's documentation and noticed that the typing forallowInGenericTypeArguments
had tightened up. For some reason (probably because I wanted to find out whether I can get rule typings directly fromtypescript-eslint
source) I checked the rule source and noticed immediately that theOptions
typing for it was out-of-date, largely because it's at the top of the file I guess.I figured that the out-of-date typing would affect DX for
typescript-eslint
itself, but after creating a test script inpackages/eslint-plugin/src
(of thetypescript-eslint
repo) and doing:I felt I was in a bit too deep to be comfortable, so instead of figuring out how the
create
method fits in the whole scheme of things, and then doing a "Complex Bug With a Reproduction" issue with my fork oftypescript-eslint
as the repo, I figured that I'd just take my chances and go straight to a PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, makes sense. It looks like this is the only
minItems: 1
in a non-deprecated rule, so I guess you're setting a good precedent. Nice 😄