Skip to content

@private should be empty. #670

@5saviahv

Description

@5saviahv

Expected behavior

Not sure is it bug but "empty-tags" error is shown.

Actual behavior

I am not sure, but I believe it wasnt there before, I made npm update yesterday.

Strangely error disappears if I delete empty line after @private statement.

ESLint Config

{
  "env": {
    "node": true
  },
  "plugins": ["jsdoc"],
  "extends": [
    "eslint:recommended",
    "plugin:jsdoc/recommended",
    "plugin:jest/recommended",
    "plugin:node/recommended",
    "prettier"
  ],
  "globals": { "Set": true, "Symbol": true },
  "rules": {
    "array-callback-return": [
      2,
      {
        "allowImplicit": true
      }
    ],
    "block-scoped-var": 2,
    "eqeqeq": [
      2,
      "always",
      {
        "null": "ignore"
      }
    ],
    "no-lonely-if": 2,
    "no-proto": 2,
    "curly": [2, "multi-line"],
    "one-var": [2, "never"],
    "no-else-return": [
      2,
      {
        "allowElseIf": false
      }
    ],
    "no-shadow": 2,
    "no-unused-expressions": 2,
    "no-useless-call": 2,
    "no-use-before-define": [2, "nofunc"],
    "no-void": 2,
    "yoda": 2,
    "strict": 2,

    "jsdoc/require-jsdoc": 0,
    "jsdoc/check-param-names": 2,
    "jsdoc/check-tag-names": 2,
    "jsdoc/check-types": 2,
    "jsdoc/newline-after-description": 2,
    "jsdoc/require-description-complete-sentence": 2,
    "jsdoc/require-hyphen-before-param-description": 2,
    "jsdoc/require-param-description": 2,
    "jsdoc/require-param-name": 2,
    "jsdoc/require-param-type": 2,
    "jsdoc/require-param": 2,
    "jsdoc/valid-types": 2,

    "node/no-unsupported-features/es-builtins": 0, // TODO
    "node/shebang": 0
  }
}

ESLint sample

/**
 * Create an array.
 *
 * @private
 * 
 * @param {string[]} [elem] - Elements to make an array of.
 * @param {boolean} [clone] - Optionally clone nodes.
 * @returns {string[]} The array of nodes.
 */


// Format JS code here

Environment

  • Node version: v12.19.0
  • ESLint version 7.17.0
  • eslint-plugin-jsdoc version: 31.0.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions