-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Question about type definitions #1197
Comments
ESLint lints one file at a time, so if you don't import the variables (e.g., by using ESM), it won't be aware of them. So the jsdoc, the tool, defined a popular syntax which has since become refined by TypeScript. One can use TypeScript-flavored jsdoc within plain JavaScript without need for TypeScript syntax (using the |
Thank you. That's what I expected to be the case.
This does not seem relevant to the question asked. In particular, it does not apply to JavaScript projects. |
It does apply to JavaScript projects. TypeScript tooling and documentation generation can be used with plain JavaScript. That's what I was talking about with the |
In jsdoc type definitions are picked up regardless of the file they are defined in. Consider:
foo.js
bar.js
Running
jsdoc -p *.js
on the above will result in anout/index.html
that shows aBar
definition that links back toFoo
:But if we have the
jsdoc/no-undefined-types
rule enabled for this eslint plugin we will get an error inbar.js
aboutFoo
being undefined. I think #99 is discussing this same problem, but I'm not clear what the resolution is. Are we able to configure this plugin to work as jsdoc does?The text was updated successfully, but these errors were encountered: