eslint-plugin-jsdoc
Version:
JSDoc linting rules for ESLint.
1 lines • 10.2 kB
Source Map (JSON)
{"version":3,"file":"tagNames.cjs","names":[],"sources":["../src/tagNames.js"],"sourcesContent":["/**\n * @typedef {{\n * [key: string]: string[]\n * }} AliasedTags\n */\n\n/**\n * @type {AliasedTags}\n */\nconst jsdocTagsUndocumented = {\n // Undocumented but present; see\n // https://github.com/jsdoc/jsdoc/issues/1283#issuecomment-516816802\n // https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594\n modifies: [],\n};\n\n/**\n * @type {AliasedTags}\n */\nconst jsdocTags = {\n ...jsdocTagsUndocumented,\n abstract: [\n 'virtual',\n ],\n access: [],\n alias: [],\n async: [],\n augments: [\n 'extends',\n ],\n author: [],\n borrows: [],\n callback: [],\n class: [\n 'constructor',\n ],\n classdesc: [],\n constant: [\n 'const',\n ],\n constructs: [],\n copyright: [],\n default: [\n 'defaultvalue',\n ],\n deprecated: [],\n description: [\n 'desc',\n ],\n enum: [],\n event: [],\n example: [],\n exports: [],\n external: [\n 'host',\n ],\n file: [\n 'fileoverview',\n 'overview',\n ],\n fires: [\n 'emits',\n ],\n function: [\n 'func',\n 'method',\n ],\n generator: [],\n global: [],\n hideconstructor: [],\n ignore: [],\n implements: [],\n inheritdoc: [],\n\n // Allowing casing distinct from jsdoc `definitions.js` (required in Closure)\n inheritDoc: [],\n\n inner: [],\n instance: [],\n interface: [],\n kind: [],\n lends: [],\n license: [],\n listens: [],\n member: [\n 'var',\n ],\n memberof: [],\n 'memberof!': [],\n mixes: [],\n mixin: [],\n\n module: [],\n name: [],\n namespace: [],\n override: [],\n package: [],\n param: [\n 'arg',\n 'argument',\n ],\n private: [],\n property: [\n 'prop',\n ],\n protected: [],\n public: [],\n readonly: [],\n requires: [],\n returns: [\n 'return',\n ],\n see: [],\n since: [],\n static: [],\n summary: [],\n\n this: [],\n throws: [\n 'exception',\n ],\n todo: [],\n tutorial: [],\n type: [],\n typedef: [],\n variation: [],\n version: [],\n yields: [\n 'yield',\n ],\n};\n\n/**\n * @see {@link https://tsdoc.org/}\n * @type {AliasedTags}\n */\nconst tsdocTags = {\n alpha: [],\n beta: [],\n decorator: [],\n eventProperty: [],\n experimental: [],\n packageDocumentation: [],\n privateRemarks: [],\n remarks: [],\n sealed: [],\n};\n\n/**\n * @see {@link https://typedoc.org/documents/Tags.html}\n * @type {AliasedTags}\n */\nconst typedocTags = {\n category: [],\n // https://typedoc.org/documents/Tags._category.html#category-descriptions\n categoryDescription: [],\n // https://typedoc.org/documents/Tags._group.html#disablegroups\n disableGroups: [],\n document: [],\n expand: [],\n // https://typedoc.org/documents/Tags._expand.html#expandtype\n expandType: [],\n group: [],\n // https://typedoc.org/documents/Tags._group.html#groupdescription\n groupDescription: [],\n hidden: [],\n // https://typedoc.org/documents/Tags._category.html#navigation-customization\n hideCategories: [],\n // https://typedoc.org/documents/Tags._group.html#navigation-customization\n hideGroups: [],\n inline: [],\n // https://typedoc.org/documents/Tags._inline.html#inlinetype\n inlineType: [],\n mergeModuleWith: [],\n // https://typedoc.org/documents/Tags._expand.html#preventexpand\n preventExpand: [],\n // https://typedoc.org/documents/Tags._inline.html#preventinline\n preventInline: [],\n primaryExport: [],\n // https://typedoc.org/documents/Tags._category.html#navigation-customization\n showCategories: [],\n // https://typedoc.org/documents/Tags._group.html#navigation-customization\n showGroups: [],\n sortStrategy: [],\n useDeclaredType: [],\n};\n\n/**\n * @type {AliasedTags}\n */\nconst typeScriptTags = {\n ...jsdocTags,\n ...tsdocTags,\n ...typedocTags,\n\n // https://github.com/microsoft/TypeScript/issues/22160\n // https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#the-jsdoc-import-tag\n import: [],\n\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n internal: [],\n\n // https://typedoc.org/documents/Tags.TypeScript_Tags.html\n jsx: [],\n\n // https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#overload-support-in-jsdoc\n overload: [],\n\n // https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#satisfies-support-in-jsdoc\n satisfies: [],\n\n // `@template` is also in TypeScript per:\n // https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#template\n template: [\n // Alias as per https://typedoc.org/documents/Tags._typeParam.html\n 'typeParam',\n ],\n};\n\n/**\n * @type {AliasedTags}\n */\nconst undocumentedClosureTags = {\n // These are in Closure source but not in jsdoc source nor in the Closure\n // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java\n closurePrimitive: [],\n customElement: [],\n expose: [],\n hidden: [],\n idGenerator: [],\n meaning: [],\n mixinClass: [],\n mixinFunction: [],\n ngInject: [],\n owner: [],\n typeSummary: [],\n wizaction: [],\n};\n\nconst {\n /* eslint-disable no-unused-vars */\n inheritdoc,\n internal,\n overload,\n // Will be inverted to prefer `return`\n returns,\n\n satisfies,\n /* eslint-enable no-unused-vars */\n ...typeScriptTagsInClosure\n} = typeScriptTags;\n\n/**\n * @type {AliasedTags}\n */\nconst closureTags = {\n ...typeScriptTagsInClosure,\n ...undocumentedClosureTags,\n\n // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler\n // These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js\n // except for the experimental `noinline` and the casing differences noted below\n\n // Defined as a synonym of `const` in jsdoc `definitions.js`\n define: [],\n\n dict: [],\n export: [],\n externs: [],\n final: [],\n\n // With casing distinct from jsdoc `definitions.js`\n implicitCast: [],\n\n noalias: [],\n nocollapse: [],\n nocompile: [],\n noinline: [],\n nosideeffects: [],\n polymer: [],\n polymerBehavior: [],\n preserve: [],\n\n // Defined as a synonym of `interface` in jsdoc `definitions.js`\n record: [],\n\n return: [\n 'returns',\n ],\n\n struct: [],\n suppress: [],\n\n unrestricted: [],\n};\n\nexport {\n closureTags,\n jsdocTags,\n typeScriptTags,\n};\n"],"mappings":";;;;;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