Closed yvele closed 8 months ago
Do you have settings: {jsdoc: {mode: 'jsdoc'}}
set? It should instead be either omitted or explicitly set to the default of settings: {jsdoc: {mode: 'typescript'}}
.
This mode is for the TypeScript flavor of JSDoc, not necessarily for TypeScript syntax, so you can use it inside of JavaScript files. The "jsdoc"
mode is for the original https://jsdoc.app syntax only.
How yeah right I was using jsdoc
mode. I've removed it (implicit typescript
mode) and everything works fine.
Thank you @brettz9 ❤️
Motivation
Maybe related to https://github.com/gajus/eslint-plugin-jsdoc/issues/145
I'm using JavaScript (not TypeScript), but I still want to import TypeScript type in inline fashion.
Current behavior
Using:
or
Triggers the following error:
Desired behavior
I want the ESLint JSDoc plugin to consider the inline TypeScript import as valid (although coding in JavaScript).
Note that Visual Studio code automatically created the
@returns {import("@slack/web/api").ChatPostMessageArguments}
so I consider it as valid.Alternatives considered
🤷
Any better workaround?