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

Don't require a `@return` tag for `@interface` #4860

tschaub opened this Issue Jan 5, 2016 · 2 comments


None yet
4 participants
Copy link

tschaub commented Jan 5, 2016

There is already a condition that disables the check for @return for @class and @constructor. The @interface tag may be applied to a constructor instead of one of these.

With ESLint @ 009a949, the code below doesn't pass the valid-jsdoc rule:

/* eslint valid-jsdoc: 2 */

 * Creates a new thing.
 * @interface
function Thing() {}

3:1 error Missing JSDoc @returns for function valid-jsdoc

If @interface is changed to @constructor, valid-jsdoc passes (as it should).


This comment has been minimized.

Copy link

eslintbot commented Jan 5, 2016

@tschaub Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.


This comment has been minimized.

Copy link

nzakas commented Jan 5, 2016

Yeah, that looks like a bug.

@nzakas nzakas closed this in #4861 Jan 5, 2016

nzakas pushed a commit that referenced this issue Jan 5, 2016

nzakas added a commit that referenced this issue Jan 5, 2016

Merge pull request #4861 from tschaub/interface
Fix: do not require a @return tag for @interface (fixes #4860)

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.