Skip to content

Alias for default tag name broken for @constructor #785

@Crystal-Spider

Description

@Crystal-Spider

Expected behavior

Not to give off a warning saying "Invalid JSDoc tag (preference). Replace "constructor" JSDoc tag with "class"." when I set
"settings": { "jsdoc": { "tagNamePreference": { "constructor": "constructor" } }
For other tag aliases, like the one proposed in the README "return", it works fine.

Actual behavior

image

ESLint Config

{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "plugins": [
    "jsdoc"
  ],
  "rules": {
    "jsdoc/check-tag-names": "warn"
  },
  "settings": {
    "jsdoc": {
      "tagNamePreference": {
        "constructor": "constructor"
      }
    }
  },
  "ignorePatterns": [
    "build",
    "dist",
    "**/*.d.ts"
  ]
}

ESLint sample

/**
 * @constructor
 */
 constructor() {}

Environment

  • Node version: 14.17.1
  • ESLint version: 7.32.0
  • eslint-plugin-jsdoc version: 36.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions