-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
jsdoc/no-types
: Not reporting violations on TS interfaces
#1249
jsdoc/no-types
: Not reporting violations on TS interfaces
#1249
Comments
The defaults for certain rules are to only check 'ArrowFunctionExpression', 'FunctionDeclaration', 'FunctionExpression', and 'TSDeclareFunction'. You can add more contexts to the |
Hi @brettz9, |
The rules have long been designed this way—I don't know if it was chosen for performance reasons or what, but it would seem to me to make sense to be on by default in more places or as someone requested, to have a config which enables all of the stricter settings (see #701). I'm frankly just not as inclined to work on doing this myself, but a PR would be welcome. |
I think we can discuss any further concerns at #701 , so closing for now. Feel free to comment further there as needed. |
Is this really the same issue as #701? It would seem that over there, we're talking about creating one or multiple configs with all rules turned on, whereas here, we're not talking about enabling or disabling rules, but rather broadening the scope on which these rules apply. Or are you saying that it wouldn't work to make |
Part of #701 would be tweaking the rules with specific options (e.g., enabling more contexts).
Yes, it'd simply be ignored. I think
I think we can include TS interfaces for all environments. I'll reopen, as it's fine to just track this for |
🎉 This issue has been resolved in version 48.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I've added handling by default for the case you mentioned. Let me know if others come up. |
Wow faster than the flash, thanks heaps!! |
Hi @brettz9, It looks like export class A {
/**
* @param paramA Something something
*/
public methodA(_paramA: string): void {
//
}
}; The rule complains as expected: But if it's an interface: export interface B {
/**
* @param paramA Something something
*/
methodB(paramB: string): void
}; The rule doesn't warn. I only caught this because typedoc complained. |
🎉 This issue has been resolved in version 48.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Dupe of #1225 . |
Hi there!
I have the following eslint config:
And the following code:
no-types
is warning me not to use types in my JSdoc (as expected):If however, I don't declare a
class
, but aninterface
, like so:The rule no longer reports a violation.
Is this expected behavior? I would expect it to report a violation on interfaces as well.
Thanks a lot in advance!
Environment
eslint-plugin-jsdoc
version: 48.2.13The text was updated successfully, but these errors were encountered: