Skip to content
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

Allow require-param-* and require-returns-description/require-returns-type/require-returns rules to check @callback and @function tags #406

Closed
brettz9 opened this issue Oct 20, 2019 · 1 comment

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Oct 20, 2019

The @callback tag has no associated context, so it would need to be checked throughout the file, but although we can't check require-param if we don't know the JavaScript function to which it applies, we can at least check require-param-name, require-param-type, and require-param-description if enabled for this tag.

Similarly, we can apply require-returns-description/require-returns-type and a modified form of require-returns (i.e., like forceRequireReturn which, if enabled, always checks its presence); require-returns-check would not be applicable.

The @function tag is mentioned here since in the case of @interface functions, these may not appear above an actual JavaScript function. See https://jsdoc.app/tags-interface.html .

@brettz9 brettz9 changed the title Allow require-param-* rules to check @callback tags Allow require-param-* and require-returns-description/require-returns-type/require-returns rules to check @callback tags Oct 20, 2019
@brettz9 brettz9 changed the title Allow require-param-* and require-returns-description/require-returns-type/require-returns rules to check @callback tags Allow require-param-* and require-returns-description/require-returns-type/require-returns rules to check @callback and @function tags Oct 20, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 29, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Dec 31, 2019
…ws `contexts` option to be set to "any" to check virtual function docs like `@callback` or `@function` with `@interface`; fixes gajus#406
brettz9 added a commit that referenced this issue Dec 31, 2019
@gajus
Copy link
Owner

gajus commented Dec 31, 2019

🎉 This issue has been resolved in version 19.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants