Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-types message for @returns has empty string for some reason #103

Closed
brettz9 opened this issue Nov 1, 2018 · 1 comment
Closed
Labels

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Nov 1, 2018

With jsdoc/check-types, I'm getting the message:

Invalid JSDoc @returns "" type "object".

The empty string there comes from jsdocTag.name within this line of src/rules/checkTypes.js:

report('Invalid JSDoc @' + jsdocTag.tag + ' "' + jsdocTag.name + '" type "' + invalidType + '".', fix, jsdocTag);

I assume that this may apply to the likes of name obtained from your call to https://github.com/yavorskiy/comment-parser , though in the case of @returns a name is not expected, so this doesn't really fit here I think (and though, off topic somewhat, I don't know why I'm not seeing at least "A" being passed as the name here when the line flagging this rule is * @returns {object} A color object).

(FWIW, I tried debugging comment-parser at https://npm.runkit.com/comment-parser .)

@brettz9 brettz9 changed the title check-types message for returns has empty string for some reason check-types message for @returns has empty string for some reason Nov 1, 2018
@gajus gajus closed this as completed in 6c172eb Mar 14, 2019
gajus added a commit that referenced this issue Mar 14, 2019
Fix: correct error message of `check-types` (fixes #103)
@gajus
Copy link
Owner

gajus commented Mar 14, 2019

🎉 This issue has been resolved in version 4.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants