-
-
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
no-undefined-types
doesn't read local variables
#178
Comments
Could not reproduce on v4.4.3 using the following settings. Might not be a bad idea to include your settings. "rules": {
"jsdoc/check-param-names": 2,
"jsdoc/check-tag-names": 2,
"jsdoc/require-hyphen-before-param-description": 2,
"jsdoc/require-param": 2,
"jsdoc/require-param-description": 2,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
"jsdoc/check-types": 2,
"jsdoc/valid-types": 2,
"jsdoc/require-returns-type": 2,
"jsdoc/require-returns": 2,
"jsdoc/require-returns-check": 1,
"jsdoc/no-undefined-types": 1,
"jsdoc/check-examples": 0,
"jsdoc/require-example": 0,
"jsdoc/require-description": 0,
"jsdoc/require-description-complete-sentence": 0,
"jsdoc/newline-after-description": 0,
"jsdoc/require-returns-description": 0,
} |
Here you go:
You might have to uncomment some of the rules to trigger this issue. I forget. I worked around this issue by changing the way I was handling circular dependencies (https://stackoverflow.com/a/42264822/14731). Thanks. |
Reducing the config file to the following simplified test case replicates as well: module.exports = {
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/no-undefined-types": "error"
}
}; |
And yes, the current behavior indeed only checks globals (or, in the case of modules, the module scope). |
no-undefined-types
doesn't read local variables
With #1098 now dropping |
Given:
The plugin complains
The type 'TestClass' is undefined.
on line 23 (the@param
). I am expecting a method to know about its enclosing class.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: