Skip to content

jsdoc/valid-types throwing warning when we use import syntax #593

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

Closed
shirotech opened this issue Jun 23, 2020 · 2 comments
Closed

jsdoc/valid-types throwing warning when we use import syntax #593

shirotech opened this issue Jun 23, 2020 · 2 comments

Comments

@shirotech
Copy link

shirotech commented Jun 23, 2020

warning  Syntax error in type: import('http').ClientRequest   jsdoc/valid-types

Was wondering what would be the right syntax if it's not a bug? Example below:

/**
 * @param {import('http').ClientRequest} req
 * @param {Function} [callback]
 * @return {Promise}
 */
@brettz9
Copy link
Collaborator

brettz9 commented Jun 23, 2020

You currently need to have settings.jsdoc.mode set to "typescript". However, I plan to submit a fix within a couple hours so that if we detect you are using @typescript-eslint/parser, you won't have to set the mode manually.

cc: @doberkofler

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jun 23, 2020
…fault to `typescript` when `typescript-eslint/parser` is on; fixes gajus#593
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jun 23, 2020
…fault to `typescript` when `typescript-eslint/parser` is on; fixes gajus#593
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jun 23, 2020
…fault to `typescript` when `typescript-eslint/parser` is on; fixes gajus#593
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jun 23, 2020
…fault to `typescript` when `typescript-eslint/parser` is on; fixes gajus#593
@gajus
Copy link
Owner

gajus commented Jun 23, 2020

🎉 This issue has been resolved in version 28.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

3 participants