eslint-plugin-jsdoc 63.0.14 → 63.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/rules/normalizeSeeLinks.d.ts +2 -0
- package/dist/index-cjs.cjs +3 -0
- package/dist/index-cjs.cjs.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/rules/normalizeSeeLinks.cjs +261 -0
- package/dist/rules/normalizeSeeLinks.cjs.map +1 -0
- package/dist/rules/normalizeSeeLinks.d.ts +3 -0
- package/dist/rules.d.ts +20 -0
- package/package.json +1 -1
- package/src/index-cjs.js +3 -0
- package/src/index.js +3 -0
- package/src/rules/normalizeSeeLinks.js +355 -0
- package/src/rules.d.ts +20 -0
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","escapeInlineTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","preferImportTag","buildRejectOrPreferRuleDefinition","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireRejects","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTags","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","tsMethodSignatureStyle","tsNoEmptyObjectType","tsNoUnnecessaryTemplateExpression","tsPreferFunctionType","typeFormatting","validTypes","getJsdocProcessorPlugin","semver","ESLint","merge"],"sources":["../src/index.js"],"sourcesContent":["/* AUTO-GENERATED BY build SCRIPT */\n/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\nimport {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n buildRejectOrPreferRuleDefinition,\n} from './buildRejectOrPreferRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport escapeInlineTags from './rules/escapeInlineTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport preferImportTag from './rules/preferImportTag.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireRejects from './rules/requireRejects.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTags from './rules/requireTags.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport tsMethodSignatureStyle from './rules/tsMethodSignatureStyle.js';\nimport tsNoEmptyObjectType from './rules/tsNoEmptyObjectType.js';\nimport tsNoUnnecessaryTemplateExpression from './rules/tsNoUnnecessaryTemplateExpression.js';\nimport tsPreferFunctionType from './rules/tsPreferFunctionType.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\nimport {\n ESLint,\n} from 'eslint';\nimport semver from 'semver';\n\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config\n * > &\n * Record<\n * \"examples\"|\"default-expressions\"|\"examples-and-default-expressions\",\n * import('eslint').Linter.Config[]\n * > &\n * Record<\"flat/recommended-mixed\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'escape-inline-tags': escapeInlineTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'prefer-import-tag': preferImportTag,\n 'reject-any-type': buildRejectOrPreferRuleDefinition({\n description: 'Reports use of `any` or `*` type',\n overrideSettings: {\n '*': {\n message: 'Prefer a more specific type to `*`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n any: {\n message: 'Prefer a more specific type to `any`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n },\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header',\n }),\n 'reject-function-type': buildRejectOrPreferRuleDefinition({\n description: 'Reports use of `Function` type',\n overrideSettings: {\n Function: {\n message: 'Prefer a more specific type to `Function`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n },\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header',\n }),\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([name!=\"\"]):not([description!=\"\"]))',\n context: 'any',\n message: '@next should have a description',\n },\n ],\n description: 'Requires a description for `@next` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-description.md#repos-sticky-header',\n }),\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for `@next` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-rejects': requireRejects,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-tags': requireTags,\n 'require-template': requireTemplate,\n 'require-template-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=template]:not([description!=\"\"]))',\n context: 'any',\n message: '@template should have a description',\n },\n ],\n description: 'Requires a description for `@template` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header',\n }),\n 'require-throws': requireThrows,\n 'require-throws-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^(?:throws|exception)$/]:not([description!=\"\"]))',\n context: 'any',\n message: '@throws should have a description',\n },\n ],\n description: 'Requires a description for `@throws` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-description.md#repos-sticky-header',\n }),\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^(?:throws|exception)$/]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for `@throws` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^yields?$/]:not([name!=\"\"]):not([description!=\"\"]))',\n context: 'any',\n message: '@yields should have a description',\n },\n ],\n description: 'Requires a description for `@yields` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-description.md#repos-sticky-header',\n }),\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^yields?$/]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for `@yields` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'ts-method-signature-style': tsMethodSignatureStyle,\n 'ts-no-empty-object-type': tsNoEmptyObjectType,\n 'ts-no-unnecessary-template-expression': tsNoUnnecessaryTemplateExpression,\n 'ts-prefer-function-type': tsPreferFunctionType,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/escape-inline-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/prefer-import-tag': 'off',\n 'jsdoc/reject-any-type': warnOrError,\n 'jsdoc/reject-function-type': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-description': 'off',\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-rejects': 'off',\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-tags': 'off',\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-template-description': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-description': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-description': 'off',\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/ts-method-signature-style': 'off',\n 'jsdoc/ts-no-empty-object-type': warnOrError,\n 'jsdoc/ts-no-unnecessary-template-expression': 'off',\n 'jsdoc/ts-prefer-function-type': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTsDocRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedTypeScriptRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/require-next-type': 'off',\n 'jsdoc/require-throws-type': 'off',\n 'jsdoc/require-yields-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/escape-inline-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\nindex.configs['recommended-tsdoc'] = createRecommendedTsDocRuleset('warn');\nindex.configs['recommended-tsdoc-error'] = createRecommendedTsDocRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\nindex.configs['flat/recommended-tsdoc'] = createRecommendedTsDocRuleset('warn', 'flat/recommended-tsdoc');\nindex.configs['flat/recommended-tsdoc-error'] = createRecommendedTsDocRuleset('error', 'flat/recommended-tsdoc-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n /* c8 ignore next 11 -- Coercion should work */\n ...(semver.gte(semver.coerce(ESLint.version) ?? '9.0.0', '9.0.0') ? {} : {\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n }),\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n /* c8 ignore next 8 -- Coercion should work */\n ...(semver.gte(semver.coerce(ESLint.version) ?? '9.0.0', '9.0.0') ? {} : {\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n }),\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nindex.configs['flat/recommended-mixed'] = [\n {\n ...index.configs['flat/recommended-typescript-flavor'],\n files: [\n '**/*.{js,jsx,cjs,mjs}',\n ],\n },\n {\n ...index.configs['flat/recommended-typescript'],\n files: [\n '**/*.{ts,tsx,cts,mts}',\n ],\n },\n];\n\nexport default index;\n\n/**\n * @type {((\n * cfg?: import('eslint').Linter.Config & {\n * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * mergeSettings?: boolean,\n * settings?: Partial<import('./iterateJsdoc.js').Settings>,\n * rules?: {[key in keyof import('./rules.d.ts').Rules]?: import('eslint').Linter.RuleEntry<import('./rules.d.ts').Rules[key]>},\n * extraRuleDefinitions?: {\n * forbid?: {\n * [contextName: string]: {\n * description?: string,\n * url?: string,\n * contexts: (string|{\n * message: string,\n * context: string,\n * comment: string\n * })[]\n * }\n * },\n * preferTypes?: {\n * [typeName: string]: {\n * description: string,\n * overrideSettings: {\n * [typeNodeName: string]: {\n * message: string,\n * replacement?: false|string,\n * unifyParentAndChildTypeChecks?: boolean,\n * }\n * },\n * url: string,\n * }\n * }\n * }\n * }\n * ) => import('eslint').Linter.Config)}\n */\nexport const jsdoc = function (cfg) {\n /** @type {import('eslint').Linter.Config} */\n let outputConfig = {\n plugins: {\n jsdoc: index,\n },\n };\n\n if (cfg) {\n if (cfg.config) {\n // @ts-expect-error Security check\n if (cfg.config === '__proto__') {\n throw new TypeError('Disallowed config value');\n }\n\n outputConfig = /** @type {import('eslint').Linter.Config} */ (index.configs[cfg.config]);\n }\n\n if (cfg.rules) {\n outputConfig.rules = {\n ...outputConfig.rules,\n ...cfg.rules,\n };\n }\n\n if (cfg.plugins) {\n outputConfig.plugins = {\n ...outputConfig.plugins,\n ...cfg.plugins,\n };\n }\n\n if (cfg.name) {\n outputConfig.name = cfg.name;\n }\n\n if (cfg.basePath) {\n outputConfig.basePath = cfg.basePath;\n }\n\n if (cfg.files) {\n outputConfig.files = cfg.files;\n }\n\n if (cfg.ignores) {\n outputConfig.ignores = cfg.ignores;\n }\n\n if (cfg.language) {\n outputConfig.language = cfg.language;\n }\n\n if (cfg.languageOptions) {\n outputConfig.languageOptions = cfg.languageOptions;\n }\n\n if (cfg.linterOptions) {\n outputConfig.linterOptions = cfg.linterOptions;\n }\n\n if (cfg.processor) {\n outputConfig.processor = cfg.processor;\n }\n\n if (cfg.extraRuleDefinitions) {\n if (!outputConfig.plugins?.jsdoc?.rules) {\n throw new Error('JSDoc plugin required for `extraRuleDefinitions`');\n }\n\n if (cfg.extraRuleDefinitions.forbid) {\n for (const [\n contextName,\n {\n contexts,\n description,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.forbid)) {\n outputConfig.plugins.jsdoc.rules[`forbid-${contextName}`] =\n buildForbidRuleDefinition({\n contextName,\n contexts,\n description,\n url,\n });\n }\n }\n\n if (cfg.extraRuleDefinitions.preferTypes) {\n for (const [\n typeName,\n {\n description,\n overrideSettings,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.preferTypes)) {\n outputConfig.plugins.jsdoc.rules[`prefer-type-${typeName}`] =\n buildRejectOrPreferRuleDefinition({\n description,\n overrideSettings,\n typeName,\n url,\n });\n }\n }\n }\n }\n\n outputConfig.settings = {\n jsdoc: cfg?.mergeSettings === false ?\n cfg.settings :\n merge(\n {},\n cfg?.settings ?? {},\n cfg?.config?.includes('recommended') ?\n {\n // We may need to drop these for \"typescript\" (non-\"flavor\") configs,\n // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n structuredTags: {\n next: {\n required: [\n 'type',\n ],\n },\n rejects: {\n required: [\n 'type',\n ],\n },\n },\n } :\n {},\n ),\n };\n\n return outputConfig;\n};\n\nexport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\n"],"mappings":";;;;;;;;;;;;;AAEA;AAIA;AAGA;AAGA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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3,"file":"index.cjs","names":["checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","escapeInlineTags","implementsOnClasses","importsAsDependencies","informativeDocs","linesBeforeBlock","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","normalizeSeeLinks","preferImportTag","buildRejectOrPreferRuleDefinition","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","buildForbidRuleDefinition","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireRejects","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireTags","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","tsMethodSignatureStyle","tsNoEmptyObjectType","tsNoUnnecessaryTemplateExpression","tsPreferFunctionType","typeFormatting","validTypes","getJsdocProcessorPlugin","semver","ESLint","merge"],"sources":["../src/index.js"],"sourcesContent":["/* AUTO-GENERATED BY build SCRIPT */\n/* eslint-disable perfectionist/sort-imports -- For auto-generate; Do not remove */\nimport {\n merge,\n} from 'object-deep-merge';\n\nimport {\n buildForbidRuleDefinition,\n} from './buildForbidRuleDefinition.js';\nimport {\n buildRejectOrPreferRuleDefinition,\n} from './buildRejectOrPreferRuleDefinition.js';\nimport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\nimport checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport escapeInlineTags from './rules/escapeInlineTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport linesBeforeBlock from './rules/linesBeforeBlock.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport normalizeSeeLinks from './rules/normalizeSeeLinks.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport preferImportTag from './rules/preferImportTag.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireRejects from './rules/requireRejects.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTags from './rules/requireTags.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport tsMethodSignatureStyle from './rules/tsMethodSignatureStyle.js';\nimport tsNoEmptyObjectType from './rules/tsNoEmptyObjectType.js';\nimport tsNoUnnecessaryTemplateExpression from './rules/tsNoUnnecessaryTemplateExpression.js';\nimport tsPreferFunctionType from './rules/tsPreferFunctionType.js';\nimport typeFormatting from './rules/typeFormatting.js';\nimport validTypes from './rules/validTypes.js';\nimport {\n ESLint,\n} from 'eslint';\nimport semver from 'semver';\n\n/**\n * @typedef {\"recommended\" | \"stylistic\" | \"contents\" | \"logical\" | \"requirements\"} ConfigGroups\n * @typedef {\"\" | \"-typescript\" | \"-typescript-flavor\"} ConfigVariants\n * @typedef {\"\" | \"-error\"} ErrorLevelVariants\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * import('eslint').Linter.Config\n * > &\n * Record<\n * \"examples\"|\"default-expressions\"|\"examples-and-default-expressions\",\n * import('eslint').Linter.Config[]\n * > &\n * Record<\"flat/recommended-mixed\", import('eslint').Linter.Config[]>\n * }}\n */\nconst index = {};\nindex.configs = {};\nindex.rules = {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'escape-inline-tags': escapeInlineTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\n 'informative-docs': informativeDocs,\n 'lines-before-block': linesBeforeBlock,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'no-bad-blocks': noBadBlocks,\n 'no-blank-block-descriptions': noBlankBlockDescriptions,\n 'no-blank-blocks': noBlankBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'normalize-see-links': normalizeSeeLinks,\n 'prefer-import-tag': preferImportTag,\n 'reject-any-type': buildRejectOrPreferRuleDefinition({\n description: 'Reports use of `any` or `*` type',\n overrideSettings: {\n '*': {\n message: 'Prefer a more specific type to `*`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n any: {\n message: 'Prefer a more specific type to `any`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n },\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header',\n }),\n 'reject-function-type': buildRejectOrPreferRuleDefinition({\n description: 'Reports use of `Function` type',\n overrideSettings: {\n Function: {\n message: 'Prefer a more specific type to `Function`',\n replacement: false,\n unifyParentAndChildTypeChecks: true,\n },\n },\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header',\n }),\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-next-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([name!=\"\"]):not([description!=\"\"]))',\n context: 'any',\n message: '@next should have a description',\n },\n ],\n description: 'Requires a description for `@next` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-description.md#repos-sticky-header',\n }),\n 'require-next-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',\n context: 'any',\n message: '@next should have a type',\n },\n ],\n description: 'Requires a type for `@next` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header',\n }),\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-rejects': requireRejects,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-tags': requireTags,\n 'require-template': requireTemplate,\n 'require-template-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=template]:not([description!=\"\"]))',\n context: 'any',\n message: '@template should have a description',\n },\n ],\n description: 'Requires a description for `@template` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header',\n }),\n 'require-throws': requireThrows,\n 'require-throws-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^(?:throws|exception)$/]:not([description!=\"\"]))',\n context: 'any',\n message: '@throws should have a description',\n },\n ],\n description: 'Requires a description for `@throws` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-description.md#repos-sticky-header',\n }),\n 'require-throws-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^(?:throws|exception)$/]:not([parsedType.type]))',\n context: 'any',\n message: '@throws should have a type',\n },\n ],\n description: 'Requires a type for `@throws` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header',\n }),\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'require-yields-description': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^yields?$/]:not([name!=\"\"]):not([description!=\"\"]))',\n context: 'any',\n message: '@yields should have a description',\n },\n ],\n description: 'Requires a description for `@yields` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-description.md#repos-sticky-header',\n }),\n 'require-yields-type': buildForbidRuleDefinition({\n contexts: [\n {\n comment: 'JsdocBlock:has(JsdocTag[tag=/^yields?$/]:not([parsedType.type]))',\n context: 'any',\n message: '@yields should have a type',\n },\n ],\n description: 'Requires a type for `@yields` tags',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header',\n }),\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'ts-method-signature-style': tsMethodSignatureStyle,\n 'ts-no-empty-object-type': tsNoEmptyObjectType,\n 'ts-no-unnecessary-template-expression': tsNoUnnecessaryTemplateExpression,\n 'ts-prefer-function-type': tsPreferFunctionType,\n 'type-formatting': typeFormatting,\n 'valid-types': validTypes,\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {\n name: 'jsdoc/' + flatName,\n } : {}),\n // @ts-expect-error ESLint 8 plugins\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/escape-inline-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\n 'jsdoc/informative-docs': 'off',\n 'jsdoc/lines-before-block': 'off',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': warnOrError,\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-blank-block-descriptions': 'off',\n 'jsdoc/no-blank-blocks': 'off',\n 'jsdoc/no-defaults': warnOrError,\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': warnOrError,\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': warnOrError,\n 'jsdoc/normalize-see-links': 'off',\n 'jsdoc/prefer-import-tag': 'off',\n 'jsdoc/reject-any-type': warnOrError,\n 'jsdoc/reject-function-type': warnOrError,\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': warnOrError,\n 'jsdoc/require-next-description': 'off',\n 'jsdoc/require-next-type': warnOrError,\n 'jsdoc/require-param': warnOrError,\n 'jsdoc/require-param-description': warnOrError,\n 'jsdoc/require-param-name': warnOrError,\n 'jsdoc/require-param-type': warnOrError,\n 'jsdoc/require-property': warnOrError,\n 'jsdoc/require-property-description': warnOrError,\n 'jsdoc/require-property-name': warnOrError,\n 'jsdoc/require-property-type': warnOrError,\n 'jsdoc/require-rejects': 'off',\n 'jsdoc/require-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-tags': 'off',\n 'jsdoc/require-template': 'off',\n 'jsdoc/require-template-description': 'off',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-throws-description': 'off',\n 'jsdoc/require-throws-type': warnOrError,\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/require-yields-description': 'off',\n 'jsdoc/require-yields-type': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/ts-method-signature-style': 'off',\n 'jsdoc/ts-no-empty-object-type': warnOrError,\n 'jsdoc/ts-no-unnecessary-template-expression': 'off',\n 'jsdoc/ts-prefer-function-type': 'off',\n 'jsdoc/type-formatting': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/check-tag-names': [\n warnOrError, {\n typed: true,\n },\n ],\n 'jsdoc/no-types': warnOrError,\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-property-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTsDocRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedTypeScriptRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/require-next-type': 'off',\n 'jsdoc/require-throws-type': 'off',\n 'jsdoc/require-yields-type': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable @stylistic/indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable @stylistic/indent */\n },\n };\n};\n\n/**\n * @param {(string | unknown[])[]} ruleNames\n */\nconst createStandaloneRulesetFactory = (ruleNames) => {\n /**\n * @param {\"warn\"|\"error\"} warnOrError\n * @param {string} [flatName]\n * @returns {import('eslint').Linter.Config}\n */\n return (warnOrError, flatName) => {\n return {\n name: 'jsdoc/' + flatName,\n plugins: {\n jsdoc: index,\n },\n rules: Object.fromEntries(\n ruleNames.map(\n (ruleName) => {\n return (typeof ruleName === 'string' ?\n [\n ruleName, warnOrError,\n ] :\n [\n ruleName[0], [\n warnOrError, ...ruleName.slice(1),\n ],\n ]);\n },\n ),\n ),\n };\n };\n};\n\nconst contentsRules = [\n 'jsdoc/informative-docs',\n 'jsdoc/match-description',\n 'jsdoc/no-blank-block-descriptions',\n 'jsdoc/no-blank-blocks',\n [\n 'jsdoc/text-escaping', {\n escapeHTML: true,\n },\n ],\n];\n\nconst createContentsTypescriptRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(contentsRules);\n\nconst logicalRules = [\n 'jsdoc/check-access',\n 'jsdoc/check-param-names',\n 'jsdoc/check-property-names',\n 'jsdoc/check-syntax',\n 'jsdoc/check-tag-names',\n 'jsdoc/check-template-names',\n 'jsdoc/check-types',\n 'jsdoc/check-values',\n 'jsdoc/empty-tags',\n 'jsdoc/escape-inline-tags',\n 'jsdoc/implements-on-classes',\n 'jsdoc/require-returns-check',\n 'jsdoc/require-yields-check',\n 'jsdoc/no-bad-blocks',\n 'jsdoc/no-defaults',\n 'jsdoc/no-types',\n 'jsdoc/no-undefined-types',\n 'jsdoc/valid-types',\n];\n\nconst createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);\n\nconst requirementsRules = [\n 'jsdoc/require-example',\n 'jsdoc/require-jsdoc',\n 'jsdoc/require-next-type',\n 'jsdoc/require-param',\n 'jsdoc/require-param-description',\n 'jsdoc/require-param-name',\n 'jsdoc/require-property',\n 'jsdoc/require-property-description',\n 'jsdoc/require-property-name',\n 'jsdoc/require-returns',\n 'jsdoc/require-returns-description',\n 'jsdoc/require-throws-type',\n 'jsdoc/require-yields',\n 'jsdoc/require-yields-type',\n];\n\nconst createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);\n\nconst createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([\n ...requirementsRules,\n 'jsdoc/require-param-type',\n 'jsdoc/require-property-type',\n 'jsdoc/require-returns-type',\n 'jsdoc/require-template',\n]);\n\nconst stylisticRules = [\n 'jsdoc/check-alignment',\n 'jsdoc/check-line-alignment',\n 'jsdoc/lines-before-block',\n 'jsdoc/multiline-blocks',\n 'jsdoc/no-multi-asterisks',\n 'jsdoc/require-asterisk-prefix',\n [\n 'jsdoc/require-hyphen-before-param-description', 'never',\n ],\n 'jsdoc/tag-lines',\n];\n\nconst createStylisticTypeScriptRuleset = createStandaloneRulesetFactory(stylisticRules);\n\nconst createStylisticTypeScriptFlavorRuleset = createStandaloneRulesetFactory(stylisticRules);\n\n/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\nindex.configs['recommended-tsdoc'] = createRecommendedTsDocRuleset('warn');\nindex.configs['recommended-tsdoc-error'] = createRecommendedTsDocRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\nindex.configs['flat/recommended-tsdoc'] = createRecommendedTsDocRuleset('warn', 'flat/recommended-tsdoc');\nindex.configs['flat/recommended-tsdoc-error'] = createRecommendedTsDocRuleset('error', 'flat/recommended-tsdoc-error');\n\nindex.configs['flat/contents-typescript'] = createContentsTypescriptRuleset('warn', 'flat/contents-typescript');\nindex.configs['flat/contents-typescript-error'] = createContentsTypescriptRuleset('error', 'flat/contents-typescript-error');\nindex.configs['flat/contents-typescript-flavor'] = createContentsTypescriptFlavorRuleset('warn', 'flat/contents-typescript-flavor');\nindex.configs['flat/contents-typescript-flavor-error'] = createContentsTypescriptFlavorRuleset('error', 'flat/contents-typescript-error-flavor');\nindex.configs['flat/logical-typescript'] = createLogicalTypescriptRuleset('warn', 'flat/logical-typescript');\nindex.configs['flat/logical-typescript-error'] = createLogicalTypescriptRuleset('error', 'flat/logical-typescript-error');\nindex.configs['flat/logical-typescript-flavor'] = createLogicalTypescriptFlavorRuleset('warn', 'flat/logical-typescript-flavor');\nindex.configs['flat/logical-typescript-flavor-error'] = createLogicalTypescriptFlavorRuleset('error', 'flat/logical-typescript-error-flavor');\nindex.configs['flat/requirements-typescript'] = createRequirementsTypeScriptRuleset('warn', 'flat/requirements-typescript');\nindex.configs['flat/requirements-typescript-error'] = createRequirementsTypeScriptRuleset('error', 'flat/requirements-typescript-error');\nindex.configs['flat/requirements-typescript-flavor'] = createRequirementsTypeScriptFlavorRuleset('warn', 'flat/requirements-typescript-flavor');\nindex.configs['flat/requirements-typescript-flavor-error'] = createRequirementsTypeScriptFlavorRuleset('error', 'flat/requirements-typescript-error-flavor');\nindex.configs['flat/stylistic-typescript'] = createStylisticTypeScriptRuleset('warn', 'flat/stylistic-typescript');\nindex.configs['flat/stylistic-typescript-error'] = createStylisticTypeScriptRuleset('error', 'flat/stylistic-typescript-error');\nindex.configs['flat/stylistic-typescript-flavor'] = createStylisticTypeScriptFlavorRuleset('warn', 'flat/stylistic-typescript-flavor');\nindex.configs['flat/stylistic-typescript-flavor-error'] = createStylisticTypeScriptFlavorRuleset('error', 'flat/stylistic-typescript-error-flavor');\n\nindex.configs.examples = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/examples/processor',\n plugins: {\n examples: getJsdocProcessorPlugin(),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.md/*.js',\n ],\n name: 'jsdoc/examples/rules',\n rules: {\n // \"always\" newline rule at end unlikely in sample code\n '@stylistic/eol-last': 0,\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n '@stylistic/no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n '@stylistic/padded-blocks': 0,\n\n '@typescript-eslint/no-unused-vars': 0,\n\n // Wouldn't generally expect example paths to resolve relative to JS file\n 'import/no-unresolved': 0,\n\n // Snippets likely too short to always include import/export info\n 'import/unambiguous': 0,\n\n 'jsdoc/require-file-overview': 0,\n\n // The end of a multiline comment would end the comment the example is in.\n 'jsdoc/require-jsdoc': 0,\n\n // See import/no-unresolved\n 'n/no-missing-import': 0,\n\n 'n/no-missing-require': 0,\n\n // Unlikely to have inadvertent debugging within examples\n 'no-console': 0,\n\n /* c8 ignore next 11 -- Coercion should work */\n ...(semver.gte(semver.coerce(ESLint.version) ?? '9.0.0', '9.0.0') ? {} : {\n // \"always\" newline rule at end unlikely in sample code\n 'eol-last': 0,\n\n // Often wish to start `@example` code after newline; also may use\n // empty lines for spacing\n 'no-multiple-empty-lines': 0,\n\n // Can generally look nicer to pad a little even if code imposes more stringency\n 'padded-blocks': 0,\n }),\n\n // Many variables in examples will be `undefined`\n 'no-undef': 0,\n // Common to define variables for clarity without always using them\n 'no-unused-vars': 0,\n\n // See import/no-unresolved\n 'node/no-missing-import': 0,\n 'node/no-missing-require': 0,\n },\n },\n]);\n\nindex.configs['default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n files: [\n '**/*.js',\n ],\n name: 'jsdoc/default-expressions/processor',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n processor: 'examples/examples',\n },\n {\n files: [\n '**/*.jsdoc-defaults', '**/*.jsdoc-params', '**/*.jsdoc-properties',\n ],\n name: 'jsdoc/default-expressions/rules',\n rules: {\n ...index.configs.examples[1].rules,\n '@stylistic/quotes': [\n 'error', 'double',\n ],\n '@stylistic/semi': [\n 'error', 'never',\n ],\n '@typescript-eslint/no-unused-expressions': 0,\n 'chai-friendly/no-unused-expressions': 0,\n 'no-empty-function': 0,\n 'no-new': 0,\n 'no-unused-expressions': 0,\n /* c8 ignore next 8 -- Coercion should work */\n ...(semver.gte(semver.coerce(ESLint.version) ?? '9.0.0', '9.0.0') ? {} : {\n quotes: [\n 'error', 'double',\n ],\n semi: [\n 'error', 'never',\n ],\n }),\n strict: 0,\n },\n },\n]);\n\nindex.configs['examples-and-default-expressions'] = /** @type {import('eslint').Linter.Config[]} */ ([\n {\n name: 'jsdoc/examples-and-default-expressions',\n plugins: {\n examples: getJsdocProcessorPlugin({\n checkDefaults: true,\n checkParams: true,\n checkProperties: true,\n }),\n },\n },\n ...index.configs.examples.map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n ...index.configs['default-expressions'].map((config) => {\n return {\n ...config,\n plugins: {},\n };\n }),\n]);\n\nindex.configs['flat/recommended-mixed'] = [\n {\n ...index.configs['flat/recommended-typescript-flavor'],\n files: [\n '**/*.{js,jsx,cjs,mjs}',\n ],\n },\n {\n ...index.configs['flat/recommended-typescript'],\n files: [\n '**/*.{ts,tsx,cts,mts}',\n ],\n },\n];\n\nexport default index;\n\n/**\n * @type {((\n * cfg?: import('eslint').Linter.Config & {\n * config?: `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,\n * mergeSettings?: boolean,\n * settings?: Partial<import('./iterateJsdoc.js').Settings>,\n * rules?: {[key in keyof import('./rules.d.ts').Rules]?: import('eslint').Linter.RuleEntry<import('./rules.d.ts').Rules[key]>},\n * extraRuleDefinitions?: {\n * forbid?: {\n * [contextName: string]: {\n * description?: string,\n * url?: string,\n * contexts: (string|{\n * message: string,\n * context: string,\n * comment: string\n * })[]\n * }\n * },\n * preferTypes?: {\n * [typeName: string]: {\n * description: string,\n * overrideSettings: {\n * [typeNodeName: string]: {\n * message: string,\n * replacement?: false|string,\n * unifyParentAndChildTypeChecks?: boolean,\n * }\n * },\n * url: string,\n * }\n * }\n * }\n * }\n * ) => import('eslint').Linter.Config)}\n */\nexport const jsdoc = function (cfg) {\n /** @type {import('eslint').Linter.Config} */\n let outputConfig = {\n plugins: {\n jsdoc: index,\n },\n };\n\n if (cfg) {\n if (cfg.config) {\n // @ts-expect-error Security check\n if (cfg.config === '__proto__') {\n throw new TypeError('Disallowed config value');\n }\n\n outputConfig = /** @type {import('eslint').Linter.Config} */ (index.configs[cfg.config]);\n }\n\n if (cfg.rules) {\n outputConfig.rules = {\n ...outputConfig.rules,\n ...cfg.rules,\n };\n }\n\n if (cfg.plugins) {\n outputConfig.plugins = {\n ...outputConfig.plugins,\n ...cfg.plugins,\n };\n }\n\n if (cfg.name) {\n outputConfig.name = cfg.name;\n }\n\n if (cfg.basePath) {\n outputConfig.basePath = cfg.basePath;\n }\n\n if (cfg.files) {\n outputConfig.files = cfg.files;\n }\n\n if (cfg.ignores) {\n outputConfig.ignores = cfg.ignores;\n }\n\n if (cfg.language) {\n outputConfig.language = cfg.language;\n }\n\n if (cfg.languageOptions) {\n outputConfig.languageOptions = cfg.languageOptions;\n }\n\n if (cfg.linterOptions) {\n outputConfig.linterOptions = cfg.linterOptions;\n }\n\n if (cfg.processor) {\n outputConfig.processor = cfg.processor;\n }\n\n if (cfg.extraRuleDefinitions) {\n if (!outputConfig.plugins?.jsdoc?.rules) {\n throw new Error('JSDoc plugin required for `extraRuleDefinitions`');\n }\n\n if (cfg.extraRuleDefinitions.forbid) {\n for (const [\n contextName,\n {\n contexts,\n description,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.forbid)) {\n outputConfig.plugins.jsdoc.rules[`forbid-${contextName}`] =\n buildForbidRuleDefinition({\n contextName,\n contexts,\n description,\n url,\n });\n }\n }\n\n if (cfg.extraRuleDefinitions.preferTypes) {\n for (const [\n typeName,\n {\n description,\n overrideSettings,\n url,\n },\n ] of Object.entries(cfg.extraRuleDefinitions.preferTypes)) {\n outputConfig.plugins.jsdoc.rules[`prefer-type-${typeName}`] =\n buildRejectOrPreferRuleDefinition({\n description,\n overrideSettings,\n typeName,\n url,\n });\n }\n }\n }\n }\n\n outputConfig.settings = {\n jsdoc: cfg?.mergeSettings === false ?\n cfg.settings :\n merge(\n {},\n cfg?.settings ?? {},\n cfg?.config?.includes('recommended') ?\n {\n // We may need to drop these for \"typescript\" (non-\"flavor\") configs,\n // if support is later added: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n structuredTags: {\n next: {\n required: [\n 'type',\n ],\n },\n rejects: {\n required: [\n 'type',\n ],\n },\n },\n } :\n {},\n ),\n };\n\n return outputConfig;\n};\n\nexport {\n getJsdocProcessorPlugin,\n} from './getJsdocProcessorPlugin.js';\n"],"mappings":";;;;;;;;;;;;;AAEA;AAIA;AAGA;AAGA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAA4B;AArF5B;AACA;;AAsFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AAClB,KAAK,CAAC,KAAK,GAAG;EACZ,cAAc,EAAEA,oBAAW;EAC3B,iBAAiB,EAAEC,uBAAc;EACjC,gBAAgB,EAAEC,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,MAAM,CACT,QAAQ,EACR;UACE,WAAW;UACX,gBAAgB;UAChB;QACF,CAAC,CACF,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE;UACzD,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,QAAQ,EAAE,CAAC,GACzD,IAAAR,mCAAA,iCAAiC,EAAC;YAChC,WAAW;YACX,gBAAgB;YAChB,QAAQ;YACR;UACF,CAAC,CAAC;QACN;MACF;IACF;EACF;EAEA,YAAY,CAAC,QAAQ,GAAG;IACtB,KAAK,EAAE,GAAG,EAAE,aAAa,KAAK,KAAK,GACjC,GAAG,CAAC,QAAQ,GACZ,IAAAuC,iBAAA,KAAK,EACH,CAAC,CAAC,EACF,GAAG,EAAE,QAAQ,IAAI,CAAC,CAAC,EACnB,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,GAClC;MACE;MACA;MACA,cAAc,EAAE;QACd,IAAI,EAAE;UACJ,QAAQ,EAAE,CACR,MAAM;QAEV,CAAC;QACD,OAAO,EAAE;UACP,QAAQ,EAAE,CACR,MAAM;QAEV;MACF;IACF,CAAC,GACD,CAAC,CACL;EACJ,CAAC;EAED,OAAO,YAAY;AACrB,CAAC;AAAC","ignoreList":[]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.cjs"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const markdownLinkRegex = /(?<!\\)\[([^`\]\r\n]+)\]\(([^`\(\)\s]+)\)/gv;
|
|
10
|
+
const prefixLinkRegex = /(?<!\\)\[([^\]\r\n]+)\]\{@link\s+([^\}\s\|]+)\}/gv;
|
|
11
|
+
const pipeLinkRegex = /\{@link\s+([^\}\s\|]+)\s*\|\s*([^\}\r\n]+)\}/gv;
|
|
12
|
+
const markdownLinkAttemptRegex = /(?<!\\)\[[^\]\r\n]*\]\([^\r\n]*(?:\)|$)/v;
|
|
13
|
+
const prefixLinkAttemptRegex = /(?<!\\)\[[^\]\r\n]*\]\{@link[^\}\r\n]*(?:\}|$)/v;
|
|
14
|
+
const pipeLinkAttemptRegex = /\{@link[^\}\r\n]*\|[^\}\r\n]*(?:\}|$)/v;
|
|
15
|
+
const scopedPackageNameRegex = /^@[\w.\-]+\/[\w.\-]+/v;
|
|
16
|
+
const markdownCodeSpanRegex = /(?<!\\)(`+)(?!`)[\s\S]*?(?<!`)\1(?!`)/gv;
|
|
17
|
+
const bareHttpUrlRegex = /^https?:\S+$/v;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {'pipe'|'prefix'} canonicalForm
|
|
21
|
+
* @param {string} label
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
const cannotSafelyFormatLink = (canonicalForm, label) => {
|
|
25
|
+
if (!label.trim()) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
if (canonicalForm === 'pipe') {
|
|
29
|
+
return label.includes('}');
|
|
30
|
+
}
|
|
31
|
+
return label.includes(']');
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @param {string} target
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
38
|
+
const encodeLinkTarget = target => {
|
|
39
|
+
return encodeURI(target).replaceAll(/%25(?=[\dA-F]{2})/giv, '%');
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} description
|
|
44
|
+
* @param {boolean} enabled
|
|
45
|
+
* @returns {string|null}
|
|
46
|
+
*/
|
|
47
|
+
const getBareHttpUrl = (description, enabled) => {
|
|
48
|
+
if (!enabled) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const trimmedDescription = description.trim();
|
|
52
|
+
return bareHttpUrlRegex.test(trimmedDescription) && URL.canParse(trimmedDescription) ? trimmedDescription : null;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} target
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
const formatBareUrl = target => {
|
|
60
|
+
return `{@link ${encodeLinkTarget(target)}}`;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @param {string|undefined} bareUrl
|
|
65
|
+
* @param {'pipe'|'prefix'} canonicalForm
|
|
66
|
+
* @returns {string}
|
|
67
|
+
*/
|
|
68
|
+
const getExpectedMessage = (bareUrl, canonicalForm) => {
|
|
69
|
+
return bareUrl ? 'Expected bare @see URL to use a {@link} tag.' : `Expected @see link to use the ${canonicalForm} form.`;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {string} description
|
|
74
|
+
* @param {number} index
|
|
75
|
+
* @returns {boolean}
|
|
76
|
+
*/
|
|
77
|
+
const isInsideMarkdownCodeSpan = (description, index) => {
|
|
78
|
+
for (const match of description.matchAll(markdownCodeSpanRegex)) {
|
|
79
|
+
const delimiterLength = match[1].length;
|
|
80
|
+
const contentStart = match.index + delimiterLength;
|
|
81
|
+
const contentEnd = match.index + match[0].length - delimiterLength;
|
|
82
|
+
if (index >= contentStart && index < contentEnd) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @param {'pipe'|'prefix'} canonicalForm
|
|
91
|
+
* @param {string} label
|
|
92
|
+
* @param {string} target
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
const formatLink = (canonicalForm, label, target) => {
|
|
96
|
+
const encodedTarget = encodeLinkTarget(target);
|
|
97
|
+
return canonicalForm === 'pipe' ? `{@link ${encodedTarget}|${label.trim()}}` : `[${label.trim()}]{@link ${encodedTarget}}`;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @param {string} description
|
|
102
|
+
* @param {'pipe'|'prefix'} canonicalForm
|
|
103
|
+
* @returns {string}
|
|
104
|
+
*/
|
|
105
|
+
const normalizeDescription = (description, canonicalForm) => {
|
|
106
|
+
const markdownNormalized = description.replaceAll(new RegExp(markdownLinkRegex, 'gv'), (_match, label, target) => {
|
|
107
|
+
return formatLink(canonicalForm, label, target);
|
|
108
|
+
});
|
|
109
|
+
if (canonicalForm === 'pipe') {
|
|
110
|
+
return markdownNormalized.replaceAll(new RegExp(prefixLinkRegex, 'gv'), (_match, label, target) => {
|
|
111
|
+
return formatLink(canonicalForm, label, target);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return markdownNormalized.replaceAll(new RegExp(pipeLinkRegex, 'gv'), (_match, target, label) => {
|
|
115
|
+
return formatLink(canonicalForm, label, target);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
119
|
+
context,
|
|
120
|
+
jsdoc,
|
|
121
|
+
utils
|
|
122
|
+
}) => {
|
|
123
|
+
const {
|
|
124
|
+
canonicalForm = 'pipe',
|
|
125
|
+
enableFixer = true,
|
|
126
|
+
wrapBareUrls = false
|
|
127
|
+
} = context.options[0] || {};
|
|
128
|
+
const descriptionMatcher = canonicalForm === 'pipe' ? new RegExp(`${markdownLinkRegex.source}|${prefixLinkRegex.source}`, 'v') : new RegExp(`${markdownLinkRegex.source}|${pipeLinkRegex.source}`, 'v');
|
|
129
|
+
|
|
130
|
+
/** @type {import('comment-parser').Spec[]} */
|
|
131
|
+
const fixableTags = [];
|
|
132
|
+
/** @type {Map<import('comment-parser').Spec, string>} */
|
|
133
|
+
const bareUrlTags = new Map();
|
|
134
|
+
for (const tag of jsdoc.tags) {
|
|
135
|
+
if (tag.tag !== 'see') {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
const firstTokens = tag.source[0].tokens;
|
|
139
|
+
const tagDescription = String(utils.getTagDescription(tag));
|
|
140
|
+
const rawDescription = firstTokens.name ? firstTokens.name + firstTokens.postName + tagDescription : tagDescription;
|
|
141
|
+
let hasAmbiguousLink = false;
|
|
142
|
+
let hasNoncanonicalLink = false;
|
|
143
|
+
const bareUrl = getBareHttpUrl(rawDescription, wrapBareUrls);
|
|
144
|
+
if (bareUrl) {
|
|
145
|
+
bareUrlTags.set(tag, bareUrl);
|
|
146
|
+
hasNoncanonicalLink = true;
|
|
147
|
+
}
|
|
148
|
+
for (const match of rawDescription.matchAll(markdownLinkRegex)) {
|
|
149
|
+
const label = match[1];
|
|
150
|
+
const target = match[2];
|
|
151
|
+
if (isInsideMarkdownCodeSpan(rawDescription, match.index) || scopedPackageNameRegex.test(target) || cannotSafelyFormatLink(canonicalForm, label)) {
|
|
152
|
+
hasAmbiguousLink = true;
|
|
153
|
+
} else {
|
|
154
|
+
hasNoncanonicalLink = true;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
for (const inlineTag of tag.inlineTags) {
|
|
158
|
+
if (inlineTag.tag !== 'link' || !inlineTag.text) {
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (inlineTag.format === 'space') {
|
|
162
|
+
hasAmbiguousLink = true;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (cannotSafelyFormatLink(canonicalForm, inlineTag.text)) {
|
|
166
|
+
hasAmbiguousLink = true;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
if (inlineTag.format === canonicalForm) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
const {
|
|
173
|
+
start
|
|
174
|
+
} = /** @type {typeof inlineTag & {start: number}} */inlineTag;
|
|
175
|
+
if (isInsideMarkdownCodeSpan(rawDescription, start) || scopedPackageNameRegex.test(inlineTag.namepathOrURL)) {
|
|
176
|
+
hasAmbiguousLink = true;
|
|
177
|
+
} else {
|
|
178
|
+
hasNoncanonicalLink = true;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const unrecognizedLinkText = rawDescription.replaceAll(new RegExp(markdownLinkRegex, 'gv'), '').replaceAll(new RegExp(prefixLinkRegex, 'gv'), '').replaceAll(new RegExp(pipeLinkRegex, 'gv'), '');
|
|
182
|
+
hasAmbiguousLink ||= markdownLinkAttemptRegex.test(unrecognizedLinkText) || prefixLinkAttemptRegex.test(unrecognizedLinkText) || pipeLinkAttemptRegex.test(unrecognizedLinkText);
|
|
183
|
+
if (hasAmbiguousLink) {
|
|
184
|
+
utils.reportJSDoc('@see link cannot be safely normalized.', {
|
|
185
|
+
line: tag.source[0].number
|
|
186
|
+
}, null);
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (!hasNoncanonicalLink) {
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
fixableTags.push(tag);
|
|
193
|
+
}
|
|
194
|
+
for (const [reportIdx, tag] of fixableTags.entries()) {
|
|
195
|
+
const bareUrl = bareUrlTags.get(tag);
|
|
196
|
+
utils.reportJSDoc(getExpectedMessage(bareUrl, canonicalForm), {
|
|
197
|
+
line: tag.source[0].number
|
|
198
|
+
}, enableFixer && reportIdx === 0 ? () => {
|
|
199
|
+
for (const fixableTag of fixableTags) {
|
|
200
|
+
const firstTokens = fixableTag.source[0].tokens;
|
|
201
|
+
if (firstTokens.name) {
|
|
202
|
+
firstTokens.description = firstTokens.name + firstTokens.postName + firstTokens.description;
|
|
203
|
+
firstTokens.name = '';
|
|
204
|
+
firstTokens.postName = '';
|
|
205
|
+
}
|
|
206
|
+
const fixableBareUrl = bareUrlTags.get(fixableTag);
|
|
207
|
+
if (fixableBareUrl) {
|
|
208
|
+
for (const source of fixableTag.source) {
|
|
209
|
+
if (!source.tokens.description.includes(fixableBareUrl)) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
source.tokens.description = source.tokens.description.replace(fixableBareUrl, () => {
|
|
213
|
+
return formatBareUrl(fixableBareUrl);
|
|
214
|
+
});
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
for (let sourceIdx = 0; sourceIdx < fixableTag.source.length; sourceIdx++) {
|
|
220
|
+
if (!descriptionMatcher.test(fixableTag.source[sourceIdx].tokens.description)) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
utils.setTagDescription(fixableTag, descriptionMatcher, description => {
|
|
224
|
+
return normalizeDescription(description, canonicalForm);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
} : null, true);
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
iterateAllJsdocs: true,
|
|
232
|
+
meta: {
|
|
233
|
+
docs: {
|
|
234
|
+
description: 'Normalizes labeled links in `@see` tags to a canonical `{@link}` form.',
|
|
235
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header'
|
|
236
|
+
},
|
|
237
|
+
fixable: 'code',
|
|
238
|
+
schema: [{
|
|
239
|
+
additionalProperties: false,
|
|
240
|
+
properties: {
|
|
241
|
+
canonicalForm: {
|
|
242
|
+
description: 'The canonical `{@link}` form: `"pipe"` produces `{@link url|label}`, while `"prefix"` produces `[label]{@link url}`. Defaults to `"pipe"`.',
|
|
243
|
+
enum: ['pipe', 'prefix'],
|
|
244
|
+
type: 'string'
|
|
245
|
+
},
|
|
246
|
+
enableFixer: {
|
|
247
|
+
description: 'Whether to enable the fixer. Defaults to `true`.',
|
|
248
|
+
type: 'boolean'
|
|
249
|
+
},
|
|
250
|
+
wrapBareUrls: {
|
|
251
|
+
description: 'Whether to wrap an `@see` description containing only a lowercase `http:` or `https:` URL (for example, `@see https://example.com`) in a plain `{@link https://example.com}`. Defaults to `false`.',
|
|
252
|
+
type: 'boolean'
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
type: 'object'
|
|
256
|
+
}],
|
|
257
|
+
type: 'suggestion'
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
module.exports = exports.default;
|
|
261
|
+
//# sourceMappingURL=normalizeSeeLinks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeSeeLinks.cjs","names":["iterateJsdoc"],"sources":["../../src/rules/normalizeSeeLinks.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nconst markdownLinkRegex = /(?<!\\\\)\\[([^`\\]\\r\\n]+)\\]\\(([^`\\(\\)\\s]+)\\)/gv;\nconst prefixLinkRegex = /(?<!\\\\)\\[([^\\]\\r\\n]+)\\]\\{@link\\s+([^\\}\\s\\|]+)\\}/gv;\nconst pipeLinkRegex = /\\{@link\\s+([^\\}\\s\\|]+)\\s*\\|\\s*([^\\}\\r\\n]+)\\}/gv;\n\nconst markdownLinkAttemptRegex = /(?<!\\\\)\\[[^\\]\\r\\n]*\\]\\([^\\r\\n]*(?:\\)|$)/v;\nconst prefixLinkAttemptRegex = /(?<!\\\\)\\[[^\\]\\r\\n]*\\]\\{@link[^\\}\\r\\n]*(?:\\}|$)/v;\nconst pipeLinkAttemptRegex = /\\{@link[^\\}\\r\\n]*\\|[^\\}\\r\\n]*(?:\\}|$)/v;\n\nconst scopedPackageNameRegex = /^@[\\w.\\-]+\\/[\\w.\\-]+/v;\nconst markdownCodeSpanRegex = /(?<!\\\\)(`+)(?!`)[\\s\\S]*?(?<!`)\\1(?!`)/gv;\nconst bareHttpUrlRegex = /^https?:\\S+$/v;\n\n/**\n * @param {'pipe'|'prefix'} canonicalForm\n * @param {string} label\n * @returns {boolean}\n */\nconst cannotSafelyFormatLink = (canonicalForm, label) => {\n if (!label.trim()) {\n return true;\n }\n\n if (canonicalForm === 'pipe') {\n return label.includes('}');\n }\n\n return label.includes(']');\n};\n\n/**\n * @param {string} target\n * @returns {string}\n */\nconst encodeLinkTarget = (target) => {\n return encodeURI(target).replaceAll(/%25(?=[\\dA-F]{2})/giv, '%');\n};\n\n/**\n * @param {string} description\n * @param {boolean} enabled\n * @returns {string|null}\n */\nconst getBareHttpUrl = (description, enabled) => {\n if (!enabled) {\n return null;\n }\n\n const trimmedDescription = description.trim();\n\n return bareHttpUrlRegex.test(trimmedDescription) &&\n URL.canParse(trimmedDescription) ?\n trimmedDescription : null;\n};\n\n/**\n * @param {string} target\n * @returns {string}\n */\nconst formatBareUrl = (target) => {\n return `{@link ${encodeLinkTarget(target)}}`;\n};\n\n/**\n * @param {string|undefined} bareUrl\n * @param {'pipe'|'prefix'} canonicalForm\n * @returns {string}\n */\nconst getExpectedMessage = (bareUrl, canonicalForm) => {\n return bareUrl ?\n 'Expected bare @see URL to use a {@link} tag.' :\n `Expected @see link to use the ${canonicalForm} form.`;\n};\n\n/**\n * @param {string} description\n * @param {number} index\n * @returns {boolean}\n */\nconst isInsideMarkdownCodeSpan = (description, index) => {\n for (const match of description.matchAll(markdownCodeSpanRegex)) {\n const delimiterLength = match[1].length;\n const contentStart = match.index + delimiterLength;\n const contentEnd = match.index + match[0].length - delimiterLength;\n\n if (index >= contentStart && index < contentEnd) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * @param {'pipe'|'prefix'} canonicalForm\n * @param {string} label\n * @param {string} target\n * @returns {string}\n */\nconst formatLink = (canonicalForm, label, target) => {\n const encodedTarget = encodeLinkTarget(target);\n\n return canonicalForm === 'pipe' ?\n `{@link ${encodedTarget}|${label.trim()}}` :\n `[${label.trim()}]{@link ${encodedTarget}}`;\n};\n\n/**\n * @param {string} description\n * @param {'pipe'|'prefix'} canonicalForm\n * @returns {string}\n */\nconst normalizeDescription = (description, canonicalForm) => {\n const markdownNormalized = description.replaceAll(\n new RegExp(markdownLinkRegex, 'gv'),\n (_match, label, target) => {\n return formatLink(canonicalForm, label, target);\n },\n );\n\n if (canonicalForm === 'pipe') {\n return markdownNormalized.replaceAll(\n new RegExp(prefixLinkRegex, 'gv'),\n (_match, label, target) => {\n return formatLink(canonicalForm, label, target);\n },\n );\n }\n\n return markdownNormalized.replaceAll(\n new RegExp(pipeLinkRegex, 'gv'),\n (_match, target, label) => {\n return formatLink(canonicalForm, label, target);\n },\n );\n};\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n utils,\n}) => {\n const {\n canonicalForm = 'pipe',\n enableFixer = true,\n wrapBareUrls = false,\n } = context.options[0] || {};\n\n const descriptionMatcher = canonicalForm === 'pipe' ?\n new RegExp(`${markdownLinkRegex.source}|${prefixLinkRegex.source}`, 'v') :\n new RegExp(`${markdownLinkRegex.source}|${pipeLinkRegex.source}`, 'v');\n\n /** @type {import('comment-parser').Spec[]} */\n const fixableTags = [];\n /** @type {Map<import('comment-parser').Spec, string>} */\n const bareUrlTags = new Map();\n\n for (const tag of jsdoc.tags) {\n if (tag.tag !== 'see') {\n continue;\n }\n\n const firstTokens = tag.source[0].tokens;\n const tagDescription = String(utils.getTagDescription(tag));\n const rawDescription = firstTokens.name ?\n firstTokens.name + firstTokens.postName + tagDescription :\n tagDescription;\n\n let hasAmbiguousLink = false;\n let hasNoncanonicalLink = false;\n const bareUrl = getBareHttpUrl(rawDescription, wrapBareUrls);\n\n if (bareUrl) {\n bareUrlTags.set(tag, bareUrl);\n hasNoncanonicalLink = true;\n }\n\n for (const match of rawDescription.matchAll(markdownLinkRegex)) {\n const label = match[1];\n const target = match[2];\n\n if (\n isInsideMarkdownCodeSpan(rawDescription, match.index) ||\n scopedPackageNameRegex.test(target) ||\n cannotSafelyFormatLink(canonicalForm, label)\n ) {\n hasAmbiguousLink = true;\n } else {\n hasNoncanonicalLink = true;\n }\n }\n\n for (const inlineTag of tag.inlineTags) {\n if (inlineTag.tag !== 'link' || !inlineTag.text) {\n continue;\n }\n\n if (inlineTag.format === 'space') {\n hasAmbiguousLink = true;\n continue;\n }\n\n if (cannotSafelyFormatLink(\n canonicalForm,\n inlineTag.text,\n )) {\n hasAmbiguousLink = true;\n continue;\n }\n\n if (inlineTag.format === canonicalForm) {\n continue;\n }\n\n const {\n start,\n } = /** @type {typeof inlineTag & {start: number}} */ (inlineTag);\n\n if (\n isInsideMarkdownCodeSpan(rawDescription, start) ||\n scopedPackageNameRegex.test(inlineTag.namepathOrURL)\n ) {\n hasAmbiguousLink = true;\n } else {\n hasNoncanonicalLink = true;\n }\n }\n\n const unrecognizedLinkText = rawDescription\n .replaceAll(new RegExp(markdownLinkRegex, 'gv'), '')\n .replaceAll(new RegExp(prefixLinkRegex, 'gv'), '')\n .replaceAll(new RegExp(pipeLinkRegex, 'gv'), '');\n\n hasAmbiguousLink ||= markdownLinkAttemptRegex.test(unrecognizedLinkText) ||\n prefixLinkAttemptRegex.test(unrecognizedLinkText) ||\n pipeLinkAttemptRegex.test(unrecognizedLinkText);\n\n if (hasAmbiguousLink) {\n utils.reportJSDoc('@see link cannot be safely normalized.', {\n line: tag.source[0].number,\n }, null);\n continue;\n }\n\n if (!hasNoncanonicalLink) {\n continue;\n }\n\n fixableTags.push(tag);\n }\n\n for (const [\n reportIdx,\n tag,\n ] of fixableTags.entries()) {\n const bareUrl = bareUrlTags.get(tag);\n\n utils.reportJSDoc(\n getExpectedMessage(bareUrl, canonicalForm),\n {\n line: tag.source[0].number,\n },\n enableFixer && reportIdx === 0 ?\n () => {\n for (const fixableTag of fixableTags) {\n const firstTokens = fixableTag.source[0].tokens;\n\n if (firstTokens.name) {\n firstTokens.description = firstTokens.name +\n firstTokens.postName + firstTokens.description;\n firstTokens.name = '';\n firstTokens.postName = '';\n }\n\n const fixableBareUrl = bareUrlTags.get(fixableTag);\n\n if (fixableBareUrl) {\n for (const source of fixableTag.source) {\n if (!source.tokens.description.includes(fixableBareUrl)) {\n continue;\n }\n\n source.tokens.description = source.tokens.description.replace(\n fixableBareUrl,\n () => {\n return formatBareUrl(fixableBareUrl);\n },\n );\n break;\n }\n\n continue;\n }\n\n for (\n let sourceIdx = 0;\n sourceIdx < fixableTag.source.length;\n sourceIdx++\n ) {\n if (!descriptionMatcher.test(\n fixableTag.source[sourceIdx].tokens.description,\n )) {\n continue;\n }\n\n utils.setTagDescription(\n fixableTag,\n descriptionMatcher,\n (description) => {\n return normalizeDescription(description, canonicalForm);\n },\n );\n }\n }\n } :\n null,\n true,\n );\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Normalizes labeled links in `@see` tags to a canonical `{@link}` form.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/normalize-see-links.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n canonicalForm: {\n description: 'The canonical `{@link}` form: `\"pipe\"` produces `{@link url|label}`, while `\"prefix\"` produces `[label]{@link url}`. Defaults to `\"pipe\"`.',\n enum: [\n 'pipe',\n 'prefix',\n ],\n type: 'string',\n },\n enableFixer: {\n description: 'Whether to enable the fixer. Defaults to `true`.',\n type: 'boolean',\n },\n wrapBareUrls: {\n description: 'Whether to wrap an `@see` description containing only a lowercase `http:` or `https:` URL (for example, `@see https://example.com`) in a plain `{@link https://example.com}`. Defaults to `false`.',\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA8C;AAE9C,MAAM,iBAAiB,GAAG,6CAA6C;AACvE,MAAM,eAAe,GAAG,mDAAmD;AAC3E,MAAM,aAAa,GAAG,gDAAgD;AAEtE,MAAM,wBAAwB,GAAG,0CAA0C;AAC3E,MAAM,sBAAsB,GAAG,iDAAiD;AAChF,MAAM,oBAAoB,GAAG,wCAAwC;AAErE,MAAM,sBAAsB,GAAG,uBAAuB;AACtD,MAAM,qBAAqB,GAAG,yCAAyC;AACvE,MAAM,gBAAgB,GAAG,eAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,CAAC,aAAa,EAAE,KAAK,KAAK;EACvD,IAAI,CAAC,KAAK,C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AY,EAAE;UACZ,WAAW,EAAE,oMAAoM;UACjN,IAAI,EAAE;QACR;MACF,CAAC;MACD,IAAI,EAAE;IACR,CAAC,CACF;IACD,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA","ignoreList":[]}
|
package/dist/rules.d.ts
CHANGED
|
@@ -1292,6 +1292,26 @@ export interface Rules {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
];
|
|
1294
1294
|
|
|
1295
|
+
/** Normalizes labeled links in `@see` tags to a canonical `{@link}` form. */
|
|
1296
|
+
"jsdoc/normalize-see-links":
|
|
1297
|
+
| []
|
|
1298
|
+
| [
|
|
1299
|
+
{
|
|
1300
|
+
/**
|
|
1301
|
+
* The canonical `{@link}` form: `"pipe"` produces `{@link url|label}`, while `"prefix"` produces `[label]{@link url}`. Defaults to `"pipe"`.
|
|
1302
|
+
*/
|
|
1303
|
+
canonicalForm?: "pipe" | "prefix";
|
|
1304
|
+
/**
|
|
1305
|
+
* Whether to enable the fixer. Defaults to `true`.
|
|
1306
|
+
*/
|
|
1307
|
+
enableFixer?: boolean;
|
|
1308
|
+
/**
|
|
1309
|
+
* Whether to wrap an `@see` description containing only a lowercase `http:` or `https:` URL (for example, `@see https://example.com`) in a plain `{@link https://example.com}`. Defaults to `false`.
|
|
1310
|
+
*/
|
|
1311
|
+
wrapBareUrls?: boolean;
|
|
1312
|
+
}
|
|
1313
|
+
];
|
|
1314
|
+
|
|
1295
1315
|
/** Prefer `@import` tags to inline `import()` statements. */
|
|
1296
1316
|
"jsdoc/prefer-import-tag":
|
|
1297
1317
|
| []
|
package/package.json
CHANGED