Skip to content

require-jsdoc on module export arrow function #551

@ellioseven

Description

@ellioseven

Expected behavior

Rules:

{
  "rules": {
    "jsdoc/require-jsdoc": [
      "error",
      {
        "publicOnly": false,
        "require": {
          "FunctionExpression": true,
          "ArrowFunctionExpression": true,
          "FunctionDeclaration": true,
          "MethodDefinition": true
        }
      }
    ]
  }
}

Code:

module.exports.foo = (bar) => {
  return bar + "biz"
}

Error:

// error   Missing JSDoc comment    jsdoc/require-jsdoc

Perhaps I'm missing something here? But I can't seem to get an error to trigger. I've looked at the examples and tried the issue queue but I can't seem to get this to work. Is this a bug or am I doing something wrong?

Actual behavior

No error is formed.

Environment

  • Node version: 10.15.3
  • ESLint version 7.1.0
  • eslint-plugin-jsdoc version: 25.4.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions