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.
check-types
will now include the preferred type in its report messageno-undefined-types
now automatically allowsNaN
andInfinity
typescheck-types
andno-undefined-types
: utilizesettings.jsdoc.preferredTypes
mapcheck-types
: Add option object withnoDefaults
no-undefined-types
: Add option object withpreferredTypesAreDefined
anddefinedTypes
no-undefined-types
: Mention role of globalsCloses #107, Closes #164, Closes #166, Closes #215 .
Also unblocks the one item I think is remaining for #1 , namely to correlate our new
preferredTypes
to eslint's deprecatedvalid-jsdoc
.Regarding #164, @gajus, I wonder if you want to also make a breaking change to the default behavior and require
object
instead ofObject
, given that valid-jsdoc did so and TypeScript recommends so. I think the rationale for this is thatObject.create(null)
will create an object whosetypeof
isobject
but which is notinstanceof Object
. While this PR allows overriding the default behavior, I think this makes sense as a new default as well, especially considering theObject.create(null)
aspect.There is also one issue in this PR I have not been able to figure out, and wonder if it is an issue with eslint itself. Though I changed this to get the test to passed, what I would expect in line 477 at https://github.com/brettz9/eslint-plugin-jsdoc/blob/a571c68bb988732b45308f3f6ae0353ce71678b3/test/rules/assertions/checkTypes.js#L477 really would instead be "number" lower-cased, as I'd think that both reported errors for this test would be fixed, but only one is. This seems not to be tied to this specific problem but it appears to me only one fix can get made. Any idea why that is?