@depup/eslint-plugin-jsdoc 62.8.0-depup.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/LICENSE +24 -0
- package/README.md +33 -0
- package/changes.json +18 -0
- package/dist/WarnSettings.cjs +38 -0
- package/dist/WarnSettings.cjs.map +1 -0
- package/dist/WarnSettings.d.ts +17 -0
- package/dist/alignTransform.cjs +402 -0
- package/dist/alignTransform.cjs.map +1 -0
- package/dist/alignTransform.d.ts +34 -0
- package/dist/buildForbidRuleDefinition.cjs +101 -0
- package/dist/buildForbidRuleDefinition.cjs.map +1 -0
- package/dist/buildForbidRuleDefinition.d.ts +15 -0
- package/dist/buildRejectOrPreferRuleDefinition.cjs +352 -0
- package/dist/buildRejectOrPreferRuleDefinition.cjs.map +1 -0
- package/dist/buildRejectOrPreferRuleDefinition.d.ts +9 -0
- package/dist/cjs/WarnSettings.d.ts +16 -0
- package/dist/cjs/alignTransform.d.ts +33 -0
- package/dist/cjs/buildForbidRuleDefinition.d.ts +14 -0
- package/dist/cjs/buildRejectOrPreferRuleDefinition.d.ts +8 -0
- package/dist/cjs/defaultTagOrder.d.ts +4 -0
- package/dist/cjs/exportParser.d.ts +40 -0
- package/dist/cjs/getDefaultTagStructureForMode.d.ts +10 -0
- package/dist/cjs/getJsdocProcessorPlugin.d.cts +5 -0
- package/dist/cjs/getJsdocProcessorPlugin.d.ts +66 -0
- package/dist/cjs/index-cjs.d.ts +23 -0
- package/dist/cjs/index.cjs.d.cts +2 -0
- package/dist/cjs/iterateJsdoc.d.cts +7 -0
- package/dist/cjs/iterateJsdoc.d.ts +495 -0
- package/dist/cjs/jsdocUtils.d.ts +493 -0
- package/dist/cjs/rules/checkAccess.d.ts +2 -0
- package/dist/cjs/rules/checkAlignment.d.ts +2 -0
- package/dist/cjs/rules/checkExamples.d.ts +3 -0
- package/dist/cjs/rules/checkIndentation.d.ts +2 -0
- package/dist/cjs/rules/checkLineAlignment.d.ts +9 -0
- package/dist/cjs/rules/checkParamNames.d.ts +2 -0
- package/dist/cjs/rules/checkPropertyNames.d.ts +2 -0
- package/dist/cjs/rules/checkSyntax.d.ts +2 -0
- package/dist/cjs/rules/checkTagNames.d.ts +2 -0
- package/dist/cjs/rules/checkTemplateNames.d.ts +2 -0
- package/dist/cjs/rules/checkTypes.d.ts +7 -0
- package/dist/cjs/rules/checkValues.d.ts +2 -0
- package/dist/cjs/rules/convertToJsdocComments.d.ts +266 -0
- package/dist/cjs/rules/emptyTags.d.ts +2 -0
- package/dist/cjs/rules/escapeInlineTags.d.ts +2 -0
- package/dist/cjs/rules/implementsOnClasses.d.ts +2 -0
- package/dist/cjs/rules/importsAsDependencies.d.ts +2 -0
- package/dist/cjs/rules/informativeDocs.d.ts +2 -0
- package/dist/cjs/rules/linesBeforeBlock.d.ts +2 -0
- package/dist/cjs/rules/matchDescription.d.ts +2 -0
- package/dist/cjs/rules/matchName.d.ts +2 -0
- package/dist/cjs/rules/multilineBlocks.d.ts +2 -0
- package/dist/cjs/rules/noBadBlocks.d.ts +2 -0
- package/dist/cjs/rules/noBlankBlockDescriptions.d.ts +2 -0
- package/dist/cjs/rules/noBlankBlocks.d.ts +2 -0
- package/dist/cjs/rules/noDefaults.d.ts +2 -0
- package/dist/cjs/rules/noMissingSyntax.d.ts +9 -0
- package/dist/cjs/rules/noMultiAsterisks.d.ts +2 -0
- package/dist/cjs/rules/noRestrictedSyntax.d.ts +2 -0
- package/dist/cjs/rules/noTypes.d.ts +2 -0
- package/dist/cjs/rules/noUndefinedTypes.d.ts +2 -0
- package/dist/cjs/rules/preferImportTag.d.ts +2 -0
- package/dist/cjs/rules/requireAsteriskPrefix.d.ts +2 -0
- package/dist/cjs/rules/requireDescription.d.ts +2 -0
- package/dist/cjs/rules/requireDescriptionCompleteSentence.d.ts +2 -0
- package/dist/cjs/rules/requireExample.d.ts +2 -0
- package/dist/cjs/rules/requireFileOverview.d.ts +2 -0
- package/dist/cjs/rules/requireHyphenBeforeParamDescription.d.ts +2 -0
- package/dist/cjs/rules/requireJsdoc.d.ts +24 -0
- package/dist/cjs/rules/requireParam.d.ts +3 -0
- package/dist/cjs/rules/requireParamDescription.d.ts +2 -0
- package/dist/cjs/rules/requireParamName.d.ts +2 -0
- package/dist/cjs/rules/requireParamType.d.ts +2 -0
- package/dist/cjs/rules/requireProperty.d.ts +2 -0
- package/dist/cjs/rules/requirePropertyDescription.d.ts +2 -0
- package/dist/cjs/rules/requirePropertyName.d.ts +2 -0
- package/dist/cjs/rules/requirePropertyType.d.ts +2 -0
- package/dist/cjs/rules/requireRejects.d.ts +2 -0
- package/dist/cjs/rules/requireReturns.d.ts +2 -0
- package/dist/cjs/rules/requireReturnsCheck.d.ts +2 -0
- package/dist/cjs/rules/requireReturnsDescription.d.ts +2 -0
- package/dist/cjs/rules/requireReturnsType.d.ts +2 -0
- package/dist/cjs/rules/requireTags.d.ts +2 -0
- package/dist/cjs/rules/requireTemplate.d.ts +2 -0
- package/dist/cjs/rules/requireThrows.d.ts +2 -0
- package/dist/cjs/rules/requireYields.d.ts +2 -0
- package/dist/cjs/rules/requireYieldsCheck.d.ts +2 -0
- package/dist/cjs/rules/sortTags.d.ts +2 -0
- package/dist/cjs/rules/tagLines.d.ts +2 -0
- package/dist/cjs/rules/textEscaping.d.ts +2 -0
- package/dist/cjs/rules/tsMethodSignatureStyle.d.ts +2 -0
- package/dist/cjs/rules/tsNoEmptyObjectType.d.ts +2 -0
- package/dist/cjs/rules/tsNoUnnecessaryTemplateExpression.d.ts +2 -0
- package/dist/cjs/rules/tsPreferFunctionType.d.ts +2 -0
- package/dist/cjs/rules/typeFormatting.d.ts +2 -0
- package/dist/cjs/rules/validTypes.d.ts +2 -0
- package/dist/cjs/tagNames.d.ts +15 -0
- package/dist/cjs/utils/hasReturnValue.d.ts +19 -0
- package/dist/defaultTagOrder.cjs +46 -0
- package/dist/defaultTagOrder.cjs.map +1 -0
- package/dist/defaultTagOrder.d.ts +5 -0
- package/dist/exportParser.cjs +732 -0
- package/dist/exportParser.cjs.map +1 -0
- package/dist/exportParser.d.ts +41 -0
- package/dist/generateDocs.cjs +342 -0
- package/dist/generateDocs.cjs.map +1 -0
- package/dist/generateOptions.cjs +62 -0
- package/dist/generateOptions.cjs.map +1 -0
- package/dist/generateRule.cjs +248 -0
- package/dist/generateRule.cjs.map +1 -0
- package/dist/generateRuleTypes.cjs +24 -0
- package/dist/generateRuleTypes.cjs.map +1 -0
- package/dist/getDefaultTagStructureForMode.cjs +289 -0
- package/dist/getDefaultTagStructureForMode.cjs.map +1 -0
- package/dist/getDefaultTagStructureForMode.d.ts +11 -0
- package/dist/getJsdocProcessorPlugin.cjs +587 -0
- package/dist/getJsdocProcessorPlugin.cjs.map +1 -0
- package/dist/getJsdocProcessorPlugin.cts +5 -0
- package/dist/getJsdocProcessorPlugin.d.ts +67 -0
- package/dist/index-cjs.cjs +595 -0
- package/dist/index-cjs.cjs.map +1 -0
- package/dist/index-cjs.d.ts +24 -0
- package/dist/index-esm.cjs +162 -0
- package/dist/index-esm.cjs.map +1 -0
- package/dist/index-esm.d.ts +72 -0
- package/dist/index.cjs +743 -0
- package/dist/index.cjs.cts +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +93 -0
- package/dist/iterateJsdoc.cjs +2150 -0
- package/dist/iterateJsdoc.cjs.map +1 -0
- package/dist/iterateJsdoc.cts +7 -0
- package/dist/iterateJsdoc.d.ts +496 -0
- package/dist/jsdocUtils.cjs +1725 -0
- package/dist/jsdocUtils.cjs.map +1 -0
- package/dist/jsdocUtils.d.ts +494 -0
- package/dist/rules/checkAccess.cjs +40 -0
- package/dist/rules/checkAccess.cjs.map +1 -0
- package/dist/rules/checkAccess.d.ts +3 -0
- package/dist/rules/checkAlignment.cjs +78 -0
- package/dist/rules/checkAlignment.cjs.map +1 -0
- package/dist/rules/checkAlignment.d.ts +3 -0
- package/dist/rules/checkExamples.cjs +521 -0
- package/dist/rules/checkExamples.cjs.map +1 -0
- package/dist/rules/checkExamples.d.ts +4 -0
- package/dist/rules/checkIndentation.cjs +170 -0
- package/dist/rules/checkIndentation.cjs.map +1 -0
- package/dist/rules/checkIndentation.d.ts +3 -0
- package/dist/rules/checkLineAlignment.cjs +398 -0
- package/dist/rules/checkLineAlignment.cjs.map +1 -0
- package/dist/rules/checkLineAlignment.d.ts +10 -0
- package/dist/rules/checkParamNames.cjs +407 -0
- package/dist/rules/checkParamNames.cjs.map +1 -0
- package/dist/rules/checkParamNames.d.ts +3 -0
- package/dist/rules/checkPropertyNames.cjs +135 -0
- package/dist/rules/checkPropertyNames.cjs.map +1 -0
- package/dist/rules/checkPropertyNames.d.ts +3 -0
- package/dist/rules/checkSyntax.cjs +38 -0
- package/dist/rules/checkSyntax.cjs.map +1 -0
- package/dist/rules/checkSyntax.d.ts +3 -0
- package/dist/rules/checkTagNames.cjs +312 -0
- package/dist/rules/checkTagNames.cjs.map +1 -0
- package/dist/rules/checkTagNames.d.ts +3 -0
- package/dist/rules/checkTemplateNames.cjs +185 -0
- package/dist/rules/checkTemplateNames.cjs.map +1 -0
- package/dist/rules/checkTemplateNames.d.ts +3 -0
- package/dist/rules/checkTypes.cjs +111 -0
- package/dist/rules/checkTypes.cjs.map +1 -0
- package/dist/rules/checkTypes.d.ts +8 -0
- package/dist/rules/checkValues.cjs +166 -0
- package/dist/rules/checkValues.cjs.map +1 -0
- package/dist/rules/checkValues.d.ts +3 -0
- package/dist/rules/convertToJsdocComments.cjs +356 -0
- package/dist/rules/convertToJsdocComments.cjs.map +1 -0
- package/dist/rules/convertToJsdocComments.d.ts +267 -0
- package/dist/rules/emptyTags.cjs +85 -0
- package/dist/rules/emptyTags.cjs.map +1 -0
- package/dist/rules/emptyTags.d.ts +3 -0
- package/dist/rules/escapeInlineTags.cjs +149 -0
- package/dist/rules/escapeInlineTags.cjs.map +1 -0
- package/dist/rules/escapeInlineTags.d.ts +3 -0
- package/dist/rules/implementsOnClasses.cjs +74 -0
- package/dist/rules/implementsOnClasses.cjs.map +1 -0
- package/dist/rules/implementsOnClasses.d.ts +3 -0
- package/dist/rules/importsAsDependencies.cjs +104 -0
- package/dist/rules/importsAsDependencies.cjs.map +1 -0
- package/dist/rules/importsAsDependencies.d.ts +3 -0
- package/dist/rules/informativeDocs.cjs +187 -0
- package/dist/rules/informativeDocs.cjs.map +1 -0
- package/dist/rules/informativeDocs.d.ts +3 -0
- package/dist/rules/linesBeforeBlock.cjs +120 -0
- package/dist/rules/linesBeforeBlock.cjs.map +1 -0
- package/dist/rules/linesBeforeBlock.d.ts +3 -0
- package/dist/rules/matchDescription.cjs +356 -0
- package/dist/rules/matchDescription.cjs.map +1 -0
- package/dist/rules/matchDescription.d.ts +3 -0
- package/dist/rules/matchName.cjs +160 -0
- package/dist/rules/matchName.cjs.map +1 -0
- package/dist/rules/matchName.d.ts +3 -0
- package/dist/rules/multilineBlocks.cjs +431 -0
- package/dist/rules/multilineBlocks.cjs.map +1 -0
- package/dist/rules/multilineBlocks.d.ts +3 -0
- package/dist/rules/noBadBlocks.cjs +100 -0
- package/dist/rules/noBadBlocks.cjs.map +1 -0
- package/dist/rules/noBadBlocks.d.ts +3 -0
- package/dist/rules/noBlankBlockDescriptions.cjs +63 -0
- package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -0
- package/dist/rules/noBlankBlockDescriptions.d.ts +3 -0
- package/dist/rules/noBlankBlocks.cjs +54 -0
- package/dist/rules/noBlankBlocks.cjs.map +1 -0
- package/dist/rules/noBlankBlocks.d.ts +3 -0
- package/dist/rules/noDefaults.cjs +102 -0
- package/dist/rules/noDefaults.cjs.map +1 -0
- package/dist/rules/noDefaults.d.ts +3 -0
- package/dist/rules/noMissingSyntax.cjs +196 -0
- package/dist/rules/noMissingSyntax.cjs.map +1 -0
- package/dist/rules/noMissingSyntax.d.ts +10 -0
- package/dist/rules/noMultiAsterisks.cjs +126 -0
- package/dist/rules/noMultiAsterisks.cjs.map +1 -0
- package/dist/rules/noMultiAsterisks.d.ts +3 -0
- package/dist/rules/noRestrictedSyntax.cjs +68 -0
- package/dist/rules/noRestrictedSyntax.cjs.map +1 -0
- package/dist/rules/noRestrictedSyntax.d.ts +3 -0
- package/dist/rules/noTypes.cjs +101 -0
- package/dist/rules/noTypes.cjs.map +1 -0
- package/dist/rules/noTypes.d.ts +3 -0
- package/dist/rules/noUndefinedTypes.cjs +588 -0
- package/dist/rules/noUndefinedTypes.cjs.map +1 -0
- package/dist/rules/noUndefinedTypes.d.ts +3 -0
- package/dist/rules/preferImportTag.cjs +362 -0
- package/dist/rules/preferImportTag.cjs.map +1 -0
- package/dist/rules/preferImportTag.d.ts +3 -0
- package/dist/rules/requireAsteriskPrefix.cjs +190 -0
- package/dist/rules/requireAsteriskPrefix.cjs.map +1 -0
- package/dist/rules/requireAsteriskPrefix.d.ts +3 -0
- package/dist/rules/requireDescription.cjs +164 -0
- package/dist/rules/requireDescription.cjs.map +1 -0
- package/dist/rules/requireDescription.d.ts +3 -0
- package/dist/rules/requireDescriptionCompleteSentence.cjs +321 -0
- package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -0
- package/dist/rules/requireDescriptionCompleteSentence.d.ts +3 -0
- package/dist/rules/requireExample.cjs +133 -0
- package/dist/rules/requireExample.cjs.map +1 -0
- package/dist/rules/requireExample.d.ts +3 -0
- package/dist/rules/requireFileOverview.cjs +194 -0
- package/dist/rules/requireFileOverview.cjs.map +1 -0
- package/dist/rules/requireFileOverview.d.ts +3 -0
- package/dist/rules/requireHyphenBeforeParamDescription.cjs +166 -0
- package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -0
- package/dist/rules/requireHyphenBeforeParamDescription.d.ts +3 -0
- package/dist/rules/requireJsdoc.cjs +722 -0
- package/dist/rules/requireJsdoc.cjs.map +1 -0
- package/dist/rules/requireJsdoc.d.ts +25 -0
- package/dist/rules/requireParam.cjs +772 -0
- package/dist/rules/requireParam.cjs.map +1 -0
- package/dist/rules/requireParam.d.ts +4 -0
- package/dist/rules/requireParamDescription.cjs +105 -0
- package/dist/rules/requireParamDescription.cjs.map +1 -0
- package/dist/rules/requireParamDescription.d.ts +3 -0
- package/dist/rules/requireParamName.cjs +68 -0
- package/dist/rules/requireParamName.cjs.map +1 -0
- package/dist/rules/requireParamName.d.ts +3 -0
- package/dist/rules/requireParamType.cjs +104 -0
- package/dist/rules/requireParamType.cjs.map +1 -0
- package/dist/rules/requireParamType.d.ts +3 -0
- package/dist/rules/requireProperty.cjs +63 -0
- package/dist/rules/requireProperty.cjs.map +1 -0
- package/dist/rules/requireProperty.d.ts +3 -0
- package/dist/rules/requirePropertyDescription.cjs +29 -0
- package/dist/rules/requirePropertyDescription.cjs.map +1 -0
- package/dist/rules/requirePropertyDescription.d.ts +3 -0
- package/dist/rules/requirePropertyName.cjs +29 -0
- package/dist/rules/requirePropertyName.cjs.map +1 -0
- package/dist/rules/requirePropertyName.d.ts +3 -0
- package/dist/rules/requirePropertyType.cjs +29 -0
- package/dist/rules/requirePropertyType.cjs.map +1 -0
- package/dist/rules/requirePropertyType.d.ts +3 -0
- package/dist/rules/requireRejects.cjs +226 -0
- package/dist/rules/requireRejects.cjs.map +1 -0
- package/dist/rules/requireRejects.d.ts +3 -0
- package/dist/rules/requireReturns.cjs +262 -0
- package/dist/rules/requireReturns.cjs.map +1 -0
- package/dist/rules/requireReturns.d.ts +3 -0
- package/dist/rules/requireReturnsCheck.cjs +140 -0
- package/dist/rules/requireReturnsCheck.cjs.map +1 -0
- package/dist/rules/requireReturnsCheck.d.ts +3 -0
- package/dist/rules/requireReturnsDescription.cjs +72 -0
- package/dist/rules/requireReturnsDescription.cjs.map +1 -0
- package/dist/rules/requireReturnsDescription.d.ts +3 -0
- package/dist/rules/requireReturnsType.cjs +68 -0
- package/dist/rules/requireReturnsType.cjs.map +1 -0
- package/dist/rules/requireReturnsType.d.ts +3 -0
- package/dist/rules/requireTags.cjs +74 -0
- package/dist/rules/requireTags.cjs.map +1 -0
- package/dist/rules/requireTags.d.ts +3 -0
- package/dist/rules/requireTemplate.cjs +220 -0
- package/dist/rules/requireTemplate.cjs.map +1 -0
- package/dist/rules/requireTemplate.d.ts +3 -0
- package/dist/rules/requireThrows.cjs +118 -0
- package/dist/rules/requireThrows.cjs.map +1 -0
- package/dist/rules/requireThrows.d.ts +3 -0
- package/dist/rules/requireYields.cjs +224 -0
- package/dist/rules/requireYields.cjs.map +1 -0
- package/dist/rules/requireYields.d.ts +3 -0
- package/dist/rules/requireYieldsCheck.cjs +179 -0
- package/dist/rules/requireYieldsCheck.cjs.map +1 -0
- package/dist/rules/requireYieldsCheck.d.ts +3 -0
- package/dist/rules/sortTags.cjs +656 -0
- package/dist/rules/sortTags.cjs.map +1 -0
- package/dist/rules/sortTags.d.ts +3 -0
- package/dist/rules/tagLines.cjs +374 -0
- package/dist/rules/tagLines.cjs.map +1 -0
- package/dist/rules/tagLines.d.ts +3 -0
- package/dist/rules/textEscaping.cjs +141 -0
- package/dist/rules/textEscaping.cjs.map +1 -0
- package/dist/rules/textEscaping.d.ts +3 -0
- package/dist/rules/tsMethodSignatureStyle.cjs +240 -0
- package/dist/rules/tsMethodSignatureStyle.cjs.map +1 -0
- package/dist/rules/tsMethodSignatureStyle.d.ts +3 -0
- package/dist/rules/tsNoEmptyObjectType.cjs +62 -0
- package/dist/rules/tsNoEmptyObjectType.cjs.map +1 -0
- package/dist/rules/tsNoEmptyObjectType.d.ts +3 -0
- package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs +104 -0
- package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs.map +1 -0
- package/dist/rules/tsNoUnnecessaryTemplateExpression.d.ts +3 -0
- package/dist/rules/tsPreferFunctionType.cjs +110 -0
- package/dist/rules/tsPreferFunctionType.cjs.map +1 -0
- package/dist/rules/tsPreferFunctionType.d.ts +3 -0
- package/dist/rules/typeFormatting.cjs +607 -0
- package/dist/rules/typeFormatting.cjs.map +1 -0
- package/dist/rules/typeFormatting.d.ts +3 -0
- package/dist/rules/validTypes.cjs +328 -0
- package/dist/rules/validTypes.cjs.map +1 -0
- package/dist/rules/validTypes.d.ts +3 -0
- package/dist/rules.d.ts +3203 -0
- package/dist/tagNames.cjs +244 -0
- package/dist/tagNames.cjs.map +1 -0
- package/dist/tagNames.d.ts +16 -0
- package/dist/to-valid-identifier.cjs +263 -0
- package/dist/utils/hasReturnValue.cjs +495 -0
- package/dist/utils/hasReturnValue.cjs.map +1 -0
- package/dist/utils/hasReturnValue.d.ts +20 -0
- package/package.json +220 -0
- package/rollup.config.js +16 -0
- package/src/WarnSettings.js +34 -0
- package/src/alignTransform.js +444 -0
- package/src/buildForbidRuleDefinition.js +106 -0
- package/src/buildRejectOrPreferRuleDefinition.js +481 -0
- package/src/defaultTagOrder.js +169 -0
- package/src/exportParser.js +973 -0
- package/src/getDefaultTagStructureForMode.js +968 -0
- package/src/getJsdocProcessorPlugin.cts +5 -0
- package/src/getJsdocProcessorPlugin.js +692 -0
- package/src/index-cjs.js +755 -0
- package/src/index-esm.js +196 -0
- package/src/index.cjs.cts +3 -0
- package/src/index.js +940 -0
- package/src/iterateJsdoc.cts +7 -0
- package/src/iterateJsdoc.js +2612 -0
- package/src/jsdocUtils.js +2158 -0
- package/src/rules/checkAccess.js +45 -0
- package/src/rules/checkAlignment.js +82 -0
- package/src/rules/checkExamples.js +613 -0
- package/src/rules/checkIndentation.js +176 -0
- package/src/rules/checkLineAlignment.js +453 -0
- package/src/rules/checkParamNames.js +541 -0
- package/src/rules/checkPropertyNames.js +174 -0
- package/src/rules/checkSyntax.js +30 -0
- package/src/rules/checkTagNames.js +414 -0
- package/src/rules/checkTemplateNames.js +208 -0
- package/src/rules/checkTypes.js +130 -0
- package/src/rules/checkValues.js +264 -0
- package/src/rules/convertToJsdocComments.js +444 -0
- package/src/rules/emptyTags.js +106 -0
- package/src/rules/escapeInlineTags.js +189 -0
- package/src/rules/implementsOnClasses.js +78 -0
- package/src/rules/importsAsDependencies.js +132 -0
- package/src/rules/informativeDocs.js +228 -0
- package/src/rules/linesBeforeBlock.js +144 -0
- package/src/rules/matchDescription.js +413 -0
- package/src/rules/matchName.js +179 -0
- package/src/rules/multilineBlocks.js +562 -0
- package/src/rules/noBadBlocks.js +127 -0
- package/src/rules/noBlankBlockDescriptions.js +69 -0
- package/src/rules/noBlankBlocks.js +55 -0
- package/src/rules/noDefaults.js +104 -0
- package/src/rules/noMissingSyntax.js +215 -0
- package/src/rules/noMultiAsterisks.js +162 -0
- package/src/rules/noRestrictedSyntax.js +72 -0
- package/src/rules/noTypes.js +108 -0
- package/src/rules/noUndefinedTypes.js +797 -0
- package/src/rules/preferImportTag.js +521 -0
- package/src/rules/requireAsteriskPrefix.js +217 -0
- package/src/rules/requireDescription.js +190 -0
- package/src/rules/requireDescriptionCompleteSentence.js +376 -0
- package/src/rules/requireExample.js +143 -0
- package/src/rules/requireFileOverview.js +213 -0
- package/src/rules/requireHyphenBeforeParamDescription.js +210 -0
- package/src/rules/requireJsdoc.js +897 -0
- package/src/rules/requireParam.js +848 -0
- package/src/rules/requireParamDescription.js +110 -0
- package/src/rules/requireParamName.js +69 -0
- package/src/rules/requireParamType.js +109 -0
- package/src/rules/requireProperty.js +66 -0
- package/src/rules/requirePropertyDescription.js +25 -0
- package/src/rules/requirePropertyName.js +25 -0
- package/src/rules/requirePropertyType.js +25 -0
- package/src/rules/requireRejects.js +246 -0
- package/src/rules/requireReturns.js +291 -0
- package/src/rules/requireReturnsCheck.js +180 -0
- package/src/rules/requireReturnsDescription.js +73 -0
- package/src/rules/requireReturnsType.js +65 -0
- package/src/rules/requireTags.js +85 -0
- package/src/rules/requireTemplate.js +246 -0
- package/src/rules/requireThrows.js +128 -0
- package/src/rules/requireYields.js +265 -0
- package/src/rules/requireYieldsCheck.js +226 -0
- package/src/rules/sortTags.js +766 -0
- package/src/rules/tagLines.js +486 -0
- package/src/rules/textEscaping.js +158 -0
- package/src/rules/tsMethodSignatureStyle.js +300 -0
- package/src/rules/tsNoEmptyObjectType.js +61 -0
- package/src/rules/tsNoUnnecessaryTemplateExpression.js +130 -0
- package/src/rules/tsPreferFunctionType.js +127 -0
- package/src/rules/typeFormatting.js +690 -0
- package/src/rules/validTypes.js +466 -0
- package/src/rules.d.ts +3203 -0
- package/src/tagNames.js +301 -0
- package/src/utils/hasReturnValue.js +572 -0
- package/typings/babel__eslint-parser.d.ts +1 -0
- package/typings/gitdown.d.ts +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireParam.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","rootNamer","desiredRoots","currentIndex","name","idx","incremented","length","base","suffix","shift","_default","exports","iterateJsdoc","context","jsdoc","node","utils","avoidDocs","hasTag","autoIncrementBase","checkDestructured","checkDestructuredRoots","checkRestProperty","checkTypesPattern","enableFixer","enableRestElementFixer","enableRootFixer","ignoreWhenAllParamsMissing","interfaceExemptsParamsCheck","unnamedRootBase","useDefaultObjectProperties","options","parent","type","id","typeAnnotation","preferredTagName","getPreferredTagName","tagName","functionParameterNames","getFunctionParameterNames","jsdocParameterNames","getJsdocTagsDeep","shallowJsdocParameterNames","filter","tag","includes","map","checkTypesRegex","getRegexFromString","missingTags","flattenedRoots","flattenRoots","names","paramIndex","hasParamIndex","cur","dropPathSegmentQuotes","String","getParamIndex","setParamIndex","entries","findExpectedIndex","jsdocTags","indexAtFunctionParams","remainingFlattenedRoots","slice","foundIndex","findIndex","newAdd","some","flattenedRoot","endsWith","tags","tagLineCount","source","tokens","end","nextRootName","namer","thisOffset","functionParameterIdx","functionParameterName","inc","Array","isArray","matchedJsdoc","rootName","search","hasPropertyRest","hasRestElement","rests","notCheckingNames","paramName","find","fpn","emptyParamIdx","push","remove","fullParamName","notCheckingName","paramType","comparePaths","undefined","startsWith","funcParamName","restElement","fix","createTokens","tagIndex","sourceIndex","spliceCount","number","delimiter","description","lineEnd","postDelimiter","postName","postTag","postType","start","splice","inlineTags","optional","problems","firstNumber","src","offset","expectedIdx","firstParamLine","baseOffset","fixer","missingTag","makeMultiline","reportJSDoc","contextDefaults","meta","docs","url","fixable","schema","additionalProperties","properties","checkConstructors","checkGetters","checkSetters","contexts","items","anyOf","comment","exemptedBy","noTracking","module"],"sources":["../../src/rules/requireParam.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\n/**\n * @typedef {[string, boolean, () => RootNamerReturn]} RootNamerReturn\n */\n\n/**\n * @param {string[]} desiredRoots\n * @param {number} currentIndex\n * @returns {RootNamerReturn}\n */\nconst rootNamer = (desiredRoots, currentIndex) => {\n /** @type {string} */\n let name;\n let idx = currentIndex;\n const incremented = desiredRoots.length <= 1;\n if (incremented) {\n const base = desiredRoots[0];\n const suffix = idx++;\n name = `${base}${suffix}`;\n } else {\n name = /** @type {string} */ (desiredRoots.shift());\n }\n\n return [\n name,\n incremented,\n () => {\n return rootNamer(desiredRoots, idx);\n },\n ];\n};\n\n/* eslint-disable complexity -- Temporary */\nexport default iterateJsdoc(({\n context,\n jsdoc,\n node,\n utils,\n}) => {\n /* eslint-enable complexity -- Temporary */\n if (utils.avoidDocs()) {\n return;\n }\n\n // Param type is specified by type in @type\n if (utils.hasTag('type')) {\n return;\n }\n\n const {\n autoIncrementBase = 0,\n checkDestructured = true,\n checkDestructuredRoots = true,\n checkRestProperty = false,\n checkTypesPattern = '/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/',\n enableFixer = true,\n enableRestElementFixer = true,\n enableRootFixer = true,\n ignoreWhenAllParamsMissing = false,\n interfaceExemptsParamsCheck = false,\n unnamedRootBase = [\n 'root',\n ],\n useDefaultObjectProperties = false,\n } = context.options[0] || {};\n\n if (interfaceExemptsParamsCheck && node &&\n node.parent?.type === 'VariableDeclarator' &&\n 'typeAnnotation' in node.parent.id && node.parent.id.typeAnnotation) {\n return;\n }\n\n const preferredTagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'param',\n }));\n if (!preferredTagName) {\n return;\n }\n\n const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties, interfaceExemptsParamsCheck);\n if (!functionParameterNames.length) {\n return;\n }\n\n const jsdocParameterNames =\n /**\n * @type {{\n * idx: import('../iterateJsdoc.js').Integer;\n * name: string;\n * type: string;\n * }[]}\n */ (utils.getJsdocTagsDeep(preferredTagName));\n\n if (ignoreWhenAllParamsMissing && !jsdocParameterNames.length) {\n return;\n }\n\n const shallowJsdocParameterNames = jsdocParameterNames.filter((tag) => {\n return !tag.name.includes('.');\n }).map((tag, idx) => {\n return {\n ...tag,\n idx,\n };\n });\n\n const checkTypesRegex = utils.getRegexFromString(checkTypesPattern);\n\n /**\n * @type {{\n * functionParameterIdx: import('../iterateJsdoc.js').Integer,\n * functionParameterName: string,\n * inc: boolean|undefined,\n * remove?: true,\n * type?: string|undefined\n * }[]}\n */\n const missingTags = [];\n const flattenedRoots = utils.flattenRoots(functionParameterNames).names;\n\n /**\n * @type {{\n * [key: string]: import('../iterateJsdoc.js').Integer\n * }}\n */\n const paramIndex = {};\n\n /**\n * @param {string} cur\n * @returns {boolean}\n */\n const hasParamIndex = (cur) => {\n return utils.dropPathSegmentQuotes(String(cur)) in paramIndex;\n };\n\n /**\n *\n * @param {string|number|undefined} cur\n * @returns {import('../iterateJsdoc.js').Integer}\n */\n const getParamIndex = (cur) => {\n return paramIndex[utils.dropPathSegmentQuotes(String(cur))];\n };\n\n /**\n *\n * @param {string} cur\n * @param {import('../iterateJsdoc.js').Integer} idx\n * @returns {void}\n */\n const setParamIndex = (cur, idx) => {\n paramIndex[utils.dropPathSegmentQuotes(String(cur))] = idx;\n };\n\n for (const [\n idx,\n cur,\n ] of flattenedRoots.entries()) {\n setParamIndex(cur, idx);\n }\n\n /**\n *\n * @param {(import('@es-joy/jsdoccomment').JsdocTagWithInline & {\n * newAdd?: boolean\n * })[]} jsdocTags\n * @param {import('../iterateJsdoc.js').Integer} indexAtFunctionParams\n * @returns {{\n * foundIndex: import('../iterateJsdoc.js').Integer,\n * tagLineCount: import('../iterateJsdoc.js').Integer,\n * }}\n */\n const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {\n // Get the parameters that come after the current index in the flattened order\n const remainingFlattenedRoots = flattenedRoots.slice((indexAtFunctionParams || 0) + 1);\n\n // Find the first existing tag that comes after the current parameter in the flattened order\n const foundIndex = jsdocTags.findIndex(({\n name,\n newAdd,\n }) => {\n if (newAdd) {\n return false;\n }\n\n // Check if the tag name matches any of the remaining flattened roots\n return remainingFlattenedRoots.some((flattenedRoot) => {\n // The flattened roots don't have the root prefix (e.g., \"bar\", \"bar.baz\")\n // but JSDoc tags do (e.g., \"root0\", \"root0.bar\", \"root0.bar.baz\")\n // So we need to check if the tag name ends with the flattened root\n\n // Check if tag name ends with \".<flattenedRoot>\"\n if (name.endsWith(`.${flattenedRoot}`)) {\n return true;\n }\n\n // Also check if tag name exactly matches the flattenedRoot\n // (for single-level params)\n if (name === flattenedRoot) {\n return true;\n }\n\n return false;\n });\n });\n\n const tags = foundIndex > -1 ?\n jsdocTags.slice(0, foundIndex) :\n jsdocTags.filter(({\n tag,\n }) => {\n return tag === preferredTagName;\n });\n\n let tagLineCount = 0;\n for (const {\n source,\n } of tags) {\n for (const {\n tokens: {\n end,\n },\n } of source) {\n if (!end) {\n tagLineCount++;\n }\n }\n }\n\n return {\n foundIndex,\n tagLineCount,\n };\n };\n\n let [\n nextRootName,\n incremented,\n namer,\n ] = rootNamer([\n ...unnamedRootBase,\n ], autoIncrementBase);\n\n const thisOffset = functionParameterNames[0] === 'this' ? 1 : 0;\n\n for (const [\n functionParameterIdx,\n functionParameterName,\n ] of functionParameterNames.entries()) {\n let inc;\n if (Array.isArray(functionParameterName)) {\n const matchedJsdoc = shallowJsdocParameterNames[functionParameterIdx - thisOffset];\n\n /** @type {string} */\n let rootName;\n if (functionParameterName[0]) {\n rootName = functionParameterName[0];\n } else if (matchedJsdoc && matchedJsdoc.name) {\n rootName = matchedJsdoc.name;\n if (matchedJsdoc.type && matchedJsdoc.type.search(checkTypesRegex) === -1) {\n continue;\n }\n } else {\n rootName = nextRootName;\n inc = incremented;\n }\n\n [\n nextRootName,\n incremented,\n namer,\n ] = namer();\n\n const {\n hasPropertyRest,\n hasRestElement,\n names,\n rests,\n } = /**\n * @type {import('../jsdocUtils.js').FlattendRootInfo & {\n * annotationParamName?: string | undefined;\n * }}\n */ (functionParameterName[1]);\n const notCheckingNames = [];\n if (!enableRestElementFixer && hasRestElement) {\n continue;\n }\n\n if (!checkDestructuredRoots) {\n continue;\n }\n\n for (const [\n idx,\n paramName,\n ] of names.entries()) {\n // Add root if the root name is not in the docs (and is not already\n // in the tags to be fixed)\n if (!jsdocParameterNames.find(({\n name,\n }) => {\n return name === rootName;\n }) && !missingTags.find(({\n functionParameterName: fpn,\n }) => {\n return fpn === rootName;\n })) {\n const emptyParamIdx = jsdocParameterNames.findIndex(({\n name,\n }) => {\n return !name;\n });\n\n if (emptyParamIdx > -1) {\n missingTags.push({\n functionParameterIdx: emptyParamIdx,\n functionParameterName: rootName,\n inc,\n remove: true,\n });\n } else {\n missingTags.push({\n functionParameterIdx: hasParamIndex(rootName) ?\n getParamIndex(rootName) :\n getParamIndex(paramName),\n functionParameterName: rootName,\n inc,\n });\n }\n }\n\n if (!checkDestructured) {\n continue;\n }\n\n if (!checkRestProperty && rests[idx]) {\n continue;\n }\n\n const fullParamName = `${rootName}.${paramName}`;\n\n const notCheckingName = jsdocParameterNames.find(({\n name,\n type: paramType,\n }) => {\n return utils.comparePaths(name)(fullParamName) && paramType.search(checkTypesRegex) === -1 && paramType !== '';\n });\n\n if (notCheckingName !== undefined) {\n notCheckingNames.push(notCheckingName.name);\n }\n\n if (notCheckingNames.find((name) => {\n return fullParamName.startsWith(name);\n })) {\n continue;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return utils.comparePaths(name)(fullParamName);\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(\n functionParameterName[0] ? fullParamName : paramName,\n ),\n functionParameterName: fullParamName,\n inc,\n type: hasRestElement && !hasPropertyRest ? '{...any}' : undefined,\n });\n }\n }\n\n continue;\n }\n\n /** @type {string} */\n let funcParamName;\n let type;\n if (typeof functionParameterName === 'object') {\n if (!enableRestElementFixer && functionParameterName.restElement) {\n continue;\n }\n\n funcParamName = /** @type {string} */ (functionParameterName.name);\n type = '{...any}';\n } else {\n funcParamName = /** @type {string} */ (functionParameterName);\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return name === funcParamName;\n }) && funcParamName !== 'this') {\n missingTags.push({\n functionParameterIdx: getParamIndex(funcParamName),\n functionParameterName: funcParamName,\n inc,\n type,\n });\n }\n }\n\n /**\n *\n * @param {{\n * functionParameterIdx: import('../iterateJsdoc.js').Integer,\n * functionParameterName: string,\n * remove?: true,\n * inc?: boolean,\n * type?: string\n * }} cfg\n */\n const fix = ({\n functionParameterIdx,\n functionParameterName,\n inc,\n remove,\n type,\n }) => {\n if (inc && !enableRootFixer) {\n return;\n }\n\n /**\n *\n * @param {import('../iterateJsdoc.js').Integer} tagIndex\n * @param {import('../iterateJsdoc.js').Integer} sourceIndex\n * @param {import('../iterateJsdoc.js').Integer} spliceCount\n * @returns {void}\n */\n const createTokens = (tagIndex, sourceIndex, spliceCount) => {\n // console.log(sourceIndex, tagIndex, jsdoc.tags, jsdoc.source);\n const tokens = {\n number: sourceIndex + 1,\n source: '',\n tokens: {\n delimiter: '*',\n description: '',\n end: '',\n lineEnd: '',\n name: functionParameterName,\n newAdd: true,\n postDelimiter: ' ',\n postName: '',\n postTag: ' ',\n postType: type ? ' ' : '',\n start: jsdoc.source[sourceIndex].tokens.start,\n tag: `@${preferredTagName}`,\n type: type ?? '',\n },\n };\n\n /**\n * @type {(import('@es-joy/jsdoccomment').JsdocTagWithInline & {\n * newAdd?: true\n * })[]}\n */ (jsdoc.tags).splice(tagIndex, spliceCount, {\n description: '',\n inlineTags: [],\n name: functionParameterName,\n newAdd: true,\n optional: false,\n problems: [],\n source: [\n tokens,\n ],\n tag: preferredTagName,\n type: type ?? '',\n });\n const firstNumber = jsdoc.source[0].number;\n jsdoc.source.splice(sourceIndex, spliceCount, tokens);\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(sourceIndex).entries()) {\n src.number = firstNumber + sourceIndex + idx;\n }\n };\n\n const offset = jsdoc.source.findIndex(({\n tokens: {\n end,\n tag,\n },\n }) => {\n return tag || end;\n });\n if (remove) {\n createTokens(functionParameterIdx, offset + functionParameterIdx, 1);\n } else {\n const {\n foundIndex,\n tagLineCount: expectedIdx,\n } =\n findExpectedIndex(jsdoc.tags, functionParameterIdx);\n\n const firstParamLine = jsdoc.source.findIndex(({\n tokens,\n }) => {\n return tokens.tag === `@${preferredTagName}`;\n });\n const baseOffset = foundIndex > -1 || firstParamLine === -1 ?\n offset :\n firstParamLine;\n\n createTokens(expectedIdx, baseOffset + expectedIdx, 0);\n }\n };\n\n /**\n * @returns {void}\n */\n const fixer = () => {\n for (const missingTag of missingTags) {\n fix(missingTag);\n }\n };\n\n if (missingTags.length && jsdoc.source.length === 1) {\n utils.makeMultiline();\n }\n\n for (const {\n functionParameterName,\n } of missingTags) {\n utils.reportJSDoc(\n `Missing JSDoc @${preferredTagName} \"${functionParameterName}\" declaration.`,\n null,\n enableFixer ? fixer : null,\n );\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters are documented with a `@param` tag.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n autoIncrementBase: {\n default: 0,\n description: `Numeric to indicate the number at which to begin auto-incrementing roots.\nDefaults to \\`0\\`.`,\n type: 'integer',\n },\n checkConstructors: {\n default: true,\n description: `A value indicating whether \\`constructor\\`s should be checked. Defaults to\n\\`true\\`.`,\n type: 'boolean',\n },\n checkDestructured: {\n default: true,\n description: 'Whether to require destructured properties. Defaults to `true`.',\n type: 'boolean',\n },\n checkDestructuredRoots: {\n default: true,\n description: `Whether to check the existence of a corresponding \\`@param\\` for root objects\nof destructured properties (e.g., that for \\`function ({a, b}) {}\\`, that there\nis something like \\`@param myRootObj\\` defined that can correspond to\nthe \\`{a, b}\\` object parameter).\n\nIf \\`checkDestructuredRoots\\` is \\`false\\`, \\`checkDestructured\\` will also be\nimplied to be \\`false\\` (i.e., the inside of the roots will not be checked\neither, e.g., it will also not complain if \\`a\\` or \\`b\\` do not have their own\ndocumentation). Defaults to \\`true\\`.`,\n type: 'boolean',\n },\n checkGetters: {\n default: false,\n description: 'A value indicating whether getters should be checked. Defaults to `false`.',\n type: 'boolean',\n },\n checkRestProperty: {\n default: false,\n description: `If set to \\`true\\`, will report (and add fixer insertions) for missing rest\nproperties. Defaults to \\`false\\`.\n\nIf set to \\`true\\`, note that you can still document the subproperties of the\nrest property using other jsdoc features, e.g., \\`@typedef\\`:\n\n\\`\\`\\`js\n/**\n * @typedef ExtraOptions\n * @property innerProp1\n * @property innerProp2\n */\n\n/**\n * @param cfg\n * @param cfg.num\n * @param {ExtraOptions} extra\n */\nfunction quux ({num, ...extra}) {\n}\n\\`\\`\\`\n\nSetting this option to \\`false\\` (the default) may be useful in cases where\nyou already have separate \\`@param\\` definitions for each of the properties\nwithin the rest property.\n\nFor example, with the option disabled, this will not give an error despite\n\\`extra\\` not having any definition:\n\n\\`\\`\\`js\n/**\n * @param cfg\n * @param cfg.num\n */\nfunction quux ({num, ...extra}) {\n}\n\\`\\`\\`\n\nNor will this:\n\n\\`\\`\\`js\n/**\n * @param cfg\n * @param cfg.num\n * @param cfg.innerProp1\n * @param cfg.innerProp2\n */\nfunction quux ({num, ...extra}) {\n}\n\\`\\`\\``,\n type: 'boolean',\n },\n checkSetters: {\n default: false,\n description: 'A value indicating whether setters should be checked. Defaults to `false`.',\n type: 'boolean',\n },\n checkTypesPattern: {\n description: `When one specifies a type, unless it is of a generic type, like \\`object\\`\nor \\`array\\`, it may be considered unnecessary to have that object's\ndestructured components required, especially where generated docs will\nlink back to the specified type. For example:\n\n\\`\\`\\`js\n/**\n * @param {SVGRect} bbox - a SVGRect\n */\nexport const bboxToObj = function ({x, y, width, height}) {\n return {x, y, width, height};\n};\n\\`\\`\\`\n\nBy default \\`checkTypesPattern\\` is set to\n\\`/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/v\\`,\nmeaning that destructuring will be required only if the type of the \\`@param\\`\n(the text between curly brackets) is a match for \"Object\" or \"Array\" (with or\nwithout initial caps), \"PlainObject\", or \"GenericObject\", \"GenericArray\" (or\nif no type is present). So in the above example, the lack of a match will\nmean that no complaint will be given about the undocumented destructured\nparameters.\n\nNote that the \\`/\\` delimiters are optional, but necessary to add flags.\n\nDefaults to using (only) the \\`v\\` flag, so to add your own flags, encapsulate\nyour expression as a string, but like a literal, e.g., \\`/^object$/vi\\`.\n\nYou could set this regular expression to a more expansive list, or you\ncould restrict it such that even types matching those strings would not\nneed destructuring.`,\n type: 'string',\n },\n contexts: {\n description: `Set this to an array of strings representing the AST context (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). May be useful for adding such as\n\\`TSMethodSignature\\` in TypeScript or restricting the contexts\nwhich are checked.\n\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n description: 'Whether to enable the fixer. Defaults to `true`.',\n type: 'boolean',\n },\n enableRestElementFixer: {\n description: `Whether to enable the rest element fixer.\n\nThe fixer will automatically report/insert\n[JSDoc repeatable parameters](https://jsdoc.app/tags-param.html#multiple-types-and-repeatable-parameters)\nif missing.\n\n\\`\\`\\`js\n/**\n * @param {GenericArray} cfg\n * @param {number} cfg.\"0\"\n */\nfunction baar ([a, ...extra]) {\n //\n}\n\\`\\`\\`\n\n...becomes:\n\n\\`\\`\\`js\n/**\n * @param {GenericArray} cfg\n * @param {number} cfg.\"0\"\n * @param {...any} cfg.\"1\"\n */\nfunction baar ([a, ...extra]) {\n //\n}\n\\`\\`\\`\n\nNote that the type \\`any\\` is included since we don't know of any specific\ntype to use.\n\nDefaults to \\`true\\`.`,\n type: 'boolean',\n },\n enableRootFixer: {\n description: `Whether to enable the auto-adding of incrementing roots.\n\nThe default behavior of \\`true\\` is for \"root\" to be auto-inserted for missing\nroots, followed by a 0-based auto-incrementing number.\n\nSo for:\n\n\\`\\`\\`js\nfunction quux ({foo}, {bar}, {baz}) {\n}\n\\`\\`\\`\n\n...the default JSDoc that would be added if the fixer is enabled would be:\n\n\\`\\`\\`js\n/**\n* @param root0\n* @param root0.foo\n* @param root1\n* @param root1.bar\n* @param root2\n* @param root2.baz\n*/\n\\`\\`\\`\n\nHas no effect if \\`enableFixer\\` is set to \\`false\\`.`,\n type: 'boolean',\n },\n exemptedBy: {\n description: `Array of tags (e.g., \\`['type']\\`) whose presence on the document block\navoids the need for a \\`@param\\`. Defaults to an array with\n\\`inheritdoc\\`. If you set this array, it will overwrite the default,\nso be sure to add back \\`inheritdoc\\` if you wish its presence to cause\nexemption of the rule.`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n ignoreWhenAllParamsMissing: {\n description: `Set to \\`true\\` to ignore reporting when all params are missing. Defaults to\n\\`false\\`.`,\n type: 'boolean',\n },\n interfaceExemptsParamsCheck: {\n description: `Set if you wish TypeScript interfaces to exempt checks for the existence of\n\\`@param\\`'s.\n\nWill check for a type defining the function itself (on a variable\ndeclaration) or if there is a single destructured object with a type.\nDefaults to \\`false\\`.`,\n type: 'boolean',\n },\n unnamedRootBase: {\n description: `An array of root names to use in the fixer when roots are missing. Defaults\nto \\`['root']\\`. Note that only when all items in the array besides the last\nare exhausted will auto-incrementing occur. So, with\n\\`unnamedRootBase: ['arg', 'config']\\`, the following:\n\n\\`\\`\\`js\nfunction quux ({foo}, [bar], {baz}) {\n}\n\\`\\`\\`\n\n...will get the following JSDoc block added:\n\n\\`\\`\\`js\n/**\n* @param arg\n* @param arg.foo\n* @param config0\n* @param config0.\"0\" (\\`bar\\`)\n* @param config1\n* @param config1.baz\n*/\n\\`\\`\\``,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n useDefaultObjectProperties: {\n description: `Set to \\`true\\` if you wish to expect documentation of properties on objects\nsupplied as default values. Defaults to \\`false\\`.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n\n // We cannot cache comment nodes as the contexts may recur with the\n // same comment node but a different JS node, and we may need the different\n // JS node to ensure we iterate its context\n noTracking: true,\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAGA,CAACC,YAAY,EAAEC,YAAY,KAAK;EAChD;EACA,IAAIC,IAAI;EACR,IAAIC,GAAG,GAAGF,YAAY;EACtB,MAAMG,WAAW,GAAGJ,YAAY,CAACK,MAAM,IAAI,CAAC;EAC5C,IAAID,WAAW,EAAE;IACf,MAAME,IAAI,GAAGN,YAAY,CAAC,CAAC,CAAC;IAC5B,MAAMO,MAAM,GAAGJ,GAAG,EAAE;IACpBD,IAAI,GAAG,GAAGI,IAAI,GAAGC,MAAM,EAAE;EAC3B,CAAC,MAAM;IACLL,IAAI,GAAG,qBAAuBF,YAAY,CAACQ,KAAK,CAAC,CAAE;EACrD;EAEA,OAAO,CACLN,IAAI,EACJE,WAAW,EACX,MAAM;IACJ,OAAOL,SAAS,CAACC,YAAY,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,KAAK;MAC3BC,UAAU,EAAE;QACV3H,iBAAiB,EAAE;UACjBpB,OAAO,EAAE,CAAC;UACVmH,WAAW,EAAE;AACzB,mBAAmB;UACPjF,IAAI,EAAE;QACR,CAAC;QACD8G,iBAAiB,EAAE;UACjBhJ,OAAO,EAAE,IAAI;UACbmH,WAAW,EAAE;AACzB,UAAU;UACEjF,IAAI,EAAE;QACR,CAAC;QACDb,iBAAiB,EAAE;UACjBrB,OAAO,EAAE,IAAI;UACbmH,WAAW,EAAE,iEAAiE;UAC9EjF,IAAI,EAAE;QACR,CAAC;QACDZ,sBAAsB,EAAE;UACtBtB,OAAO,EAAE,IAAI;UACbmH,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;UAC1BjF,IAAI,EAAE;QACR,CAAC;QACD+G,YAAY,EAAE;UACZjJ,OAAO,EAAE,KAAK;UACdmH,WAAW,EAAE,4EAA4E;UACzFjF,IAAI,EAAE;QACR,CAAC;QACDX,iBAAiB,EAAE;UACjBvB,OAAO,EAAE,KAAK;UACdmH,WAAW,EAAE;AACzB;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,OAAO;UACKjF,IAAI,EAAE;QACR,CAAC;QACDgH,YAAY,EAAE;UACZlJ,OAAO,EAAE,KAAK;UACdmH,WAAW,EAAE,4EAA4E;UACzFjF,IAAI,EAAE;QACR,CAAC;QACDV,iBAAiB,EAAE;UACjB2F,WAAW,EAAE;AACzB;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,oBAAoB;UACRjF,IAAI,EAAE;QACR,CAAC;QACDiH,QAAQ,EAAE;UACRhC,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;UAClDiC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEnH,IAAI,EAAE;YACR,CAAC,EACD;cACE4G,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVO,OAAO,EAAE;kBACPpH,IAAI,EAAE;gBACR,CAAC;gBACDpB,OAAO,EAAE;kBACPoB,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDT,WAAW,EAAE;UACX0F,WAAW,EAAE,kDAAkD;UAC/DjF,IAAI,EAAE;QACR,CAAC;QACDR,sBAAsB,EAAE;UACtByF,WAAW,EAAE;AACzB;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,sBAAsB;UACVjF,IAAI,EAAE;QACR,CAAC;QACDP,eAAe,EAAE;UACfwF,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;UAC1CjF,IAAI,EAAE;QACR,CAAC;QACDqH,UAAU,EAAE;UACVpC,WAAW,EAAE;AACzB;AACA;AACA;AACA,uBAAuB;UACXiC,KAAK,EAAE;YACLlH,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDN,0BAA0B,EAAE;UAC1BuF,WAAW,EAAE;AACzB,WAAW;UACCjF,IAAI,EAAE;QACR,CAAC;QACDL,2BAA2B,EAAE;UAC3BsF,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA,uBAAuB;UACXjF,IAAI,EAAE;QACR,CAAC;QACDJ,eAAe,EAAE;UACfqF,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;UACKiC,KAAK,EAAE;YACLlH,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDH,0BAA0B,EAAE;UAC1BoF,WAAW,EAAE;AACzB,mDAAmD;UACvCjF,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR,CAAC;EAED;EACA;EACA;EACAsH,UAAU,EAAE;AACd,CAAC,CAAC;AAAAC,MAAA,CAAA7I,OAAA,GAAAA,OAAA,CAAAZ,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
context,
|
|
11
|
+
report,
|
|
12
|
+
settings,
|
|
13
|
+
utils
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
defaultDestructuredRootDescription = 'The root object',
|
|
17
|
+
setDefaultDestructuredRootDescription = false
|
|
18
|
+
} = context.options[0] || {};
|
|
19
|
+
const functionParameterNames = utils.getFunctionParameterNames();
|
|
20
|
+
let rootCount = -1;
|
|
21
|
+
utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {
|
|
22
|
+
rootCount += jsdocParameter.name.includes('.') ? 0 : 1;
|
|
23
|
+
if (!jsdocParameter.description.trim()) {
|
|
24
|
+
if (Array.isArray(functionParameterNames[rootCount])) {
|
|
25
|
+
if (settings.exemptDestructuredRootsFromChecks) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (setDefaultDestructuredRootDescription) {
|
|
29
|
+
utils.reportJSDoc(`Missing root description for @${targetTagName}.`, jsdocParameter, () => {
|
|
30
|
+
utils.changeTag(jsdocParameter, {
|
|
31
|
+
description: defaultDestructuredRootDescription,
|
|
32
|
+
postName: ' '
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
report(`Missing JSDoc @${targetTagName} "${jsdocParameter.name}" description.`, null, jsdocParameter);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, {
|
|
42
|
+
contextDefaults: true,
|
|
43
|
+
meta: {
|
|
44
|
+
docs: {
|
|
45
|
+
description: 'Requires that each `@param` tag has a `description` value.',
|
|
46
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header'
|
|
47
|
+
},
|
|
48
|
+
fixable: 'code',
|
|
49
|
+
schema: [{
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
properties: {
|
|
52
|
+
contexts: {
|
|
53
|
+
description: `Set this to an array of strings representing the AST context (or an object with
|
|
54
|
+
optional \`context\` and \`comment\` properties) where you wish the rule to be applied.
|
|
55
|
+
|
|
56
|
+
\`context\` defaults to \`any\` and \`comment\` defaults to no specific comment context.
|
|
57
|
+
|
|
58
|
+
Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclaration\`,
|
|
59
|
+
\`FunctionExpression\`). Set to \`"any"\` if you want
|
|
60
|
+
the rule to apply to any JSDoc block throughout your files (as is necessary
|
|
61
|
+
for finding function blocks not attached to a function declaration or
|
|
62
|
+
expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
|
|
63
|
+
\`@method\`) (including those associated with an \`@interface\`).
|
|
64
|
+
|
|
65
|
+
See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
66
|
+
section of our Advanced docs for more on the expected format.`,
|
|
67
|
+
items: {
|
|
68
|
+
anyOf: [{
|
|
69
|
+
type: 'string'
|
|
70
|
+
}, {
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
properties: {
|
|
73
|
+
comment: {
|
|
74
|
+
type: 'string'
|
|
75
|
+
},
|
|
76
|
+
context: {
|
|
77
|
+
type: 'string'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
type: 'object'
|
|
81
|
+
}]
|
|
82
|
+
},
|
|
83
|
+
type: 'array'
|
|
84
|
+
},
|
|
85
|
+
defaultDestructuredRootDescription: {
|
|
86
|
+
description: `The description string to set by default for destructured roots. Defaults to
|
|
87
|
+
"The root object".`,
|
|
88
|
+
type: 'string'
|
|
89
|
+
},
|
|
90
|
+
setDefaultDestructuredRootDescription: {
|
|
91
|
+
description: `Whether to set a default destructured root description. For example, you may
|
|
92
|
+
wish to avoid manually having to set the description for a \`@param\`
|
|
93
|
+
corresponding to a destructured root object as it should always be the same
|
|
94
|
+
type of object. Uses \`defaultDestructuredRootDescription\` for the description
|
|
95
|
+
string. Defaults to \`false\`.`,
|
|
96
|
+
type: 'boolean'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
type: 'object'
|
|
100
|
+
}],
|
|
101
|
+
type: 'suggestion'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
module.exports = exports.default;
|
|
105
|
+
//# sourceMappingURL=requireParamDescription.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireParamDescription.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","context","report","settings","utils","defaultDestructuredRootDescription","setDefaultDestructuredRootDescription","options","functionParameterNames","getFunctionParameterNames","rootCount","forEachPreferredTag","jsdocParameter","targetTagName","name","includes","description","trim","Array","isArray","exemptDestructuredRootsFromChecks","reportJSDoc","changeTag","postName","contextDefaults","meta","docs","url","fixable","schema","additionalProperties","properties","contexts","items","anyOf","type","comment","module"],"sources":["../../src/rules/requireParamDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n report,\n settings,\n utils,\n}) => {\n const {\n defaultDestructuredRootDescription = 'The root object',\n setDefaultDestructuredRootDescription = false,\n } = context.options[0] || {};\n\n const functionParameterNames = utils.getFunctionParameterNames();\n\n let rootCount = -1;\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n rootCount += jsdocParameter.name.includes('.') ? 0 : 1;\n if (!jsdocParameter.description.trim()) {\n if (Array.isArray(functionParameterNames[rootCount])) {\n if (settings.exemptDestructuredRootsFromChecks) {\n return;\n }\n\n if (setDefaultDestructuredRootDescription) {\n utils.reportJSDoc(`Missing root description for @${targetTagName}.`, jsdocParameter, () => {\n utils.changeTag(jsdocParameter, {\n description: defaultDestructuredRootDescription,\n postName: ' ',\n });\n });\n return;\n }\n }\n\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" description.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n description: `Set this to an array of strings representing the AST context (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). Set to \\`\"any\"\\` if you want\nthe rule to apply to any JSDoc block throughout your files (as is necessary\nfor finding function blocks not attached to a function declaration or\nexpression, i.e., \\`@callback\\` or \\`@function\\` (or its aliases \\`@func\\` or\n\\`@method\\`) (including those associated with an \\`@interface\\`).\n\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n defaultDestructuredRootDescription: {\n description: `The description string to set by default for destructured roots. Defaults to\n\"The root object\".`,\n type: 'string',\n },\n setDefaultDestructuredRootDescription: {\n description: `Whether to set a default destructured root description. For example, you may\nwish to avoid manually having to set the description for a \\`@param\\`\ncorresponding to a destructured root object as it should always be the same\ntype of object. Uses \\`defaultDestructuredRootDescription\\` for the description\nstring. Defaults to \\`false\\`.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/B,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,MAAM;EACNC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,MAAM;IACJC,kCAAkC,GAAG,iBAAiB;IACtDC,qCAAqC,GAAG;EAC1C,CAAC,GAAGL,OAAO,CAACM,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE5B,MAAMC,sBAAsB,GAAGJ,KAAK,CAACK,yBAAyB,CAAC,CAAC;EAEhE,IAAIC,SAAS,GAAG,CAAC,CAAC;EAClBN,KAAK,CAACO,mBAAmB,CAAC,OAAO,EAAE,CAACC,cAAc,EAAEC,aAAa,KAAK;IACpEH,SA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AAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACD9B,kCAAkC,EAAE;UAClCW,WAAW,EAAE;AACzB,mBAAmB;UACPmB,IAAI,EAAE;QACR,CAAC;QACD7B,qCAAqC,EAAE;UACrCU,WAAW,EAAE;AACzB;AACA;AACA;AACA,+BAA+B;UACnBmB,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAE,MAAA,CAAAtC,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
report,
|
|
11
|
+
utils
|
|
12
|
+
}) => {
|
|
13
|
+
utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {
|
|
14
|
+
if (jsdocParameter.tag && jsdocParameter.name === '') {
|
|
15
|
+
report(`There must be an identifier after @${targetTagName} ${jsdocParameter.type === '' ? 'type' : 'tag'}.`, null, jsdocParameter);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, {
|
|
19
|
+
contextDefaults: true,
|
|
20
|
+
meta: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: 'Requires that all `@param` tags have names.',
|
|
23
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header'
|
|
24
|
+
},
|
|
25
|
+
schema: [{
|
|
26
|
+
additionalProperties: false,
|
|
27
|
+
properties: {
|
|
28
|
+
contexts: {
|
|
29
|
+
description: `Set this to an array of strings representing the AST context (or an object with
|
|
30
|
+
optional \`context\` and \`comment\` properties) where you wish the rule to be applied.
|
|
31
|
+
|
|
32
|
+
\`context\` defaults to \`any\` and \`comment\` defaults to no specific comment context.
|
|
33
|
+
|
|
34
|
+
Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclaration\`,
|
|
35
|
+
\`FunctionExpression\`). Set to \`"any"\` if you want
|
|
36
|
+
the rule to apply to any JSDoc block throughout your files (as is necessary
|
|
37
|
+
for finding function blocks not attached to a function declaration or
|
|
38
|
+
expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
|
|
39
|
+
\`@method\`) (including those associated with an \`@interface\`).
|
|
40
|
+
|
|
41
|
+
See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
42
|
+
section of our Advanced docs for more on the expected format.`,
|
|
43
|
+
items: {
|
|
44
|
+
anyOf: [{
|
|
45
|
+
type: 'string'
|
|
46
|
+
}, {
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
properties: {
|
|
49
|
+
comment: {
|
|
50
|
+
type: 'string'
|
|
51
|
+
},
|
|
52
|
+
context: {
|
|
53
|
+
type: 'string'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
type: 'object'
|
|
57
|
+
}]
|
|
58
|
+
},
|
|
59
|
+
type: 'array'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
type: 'object'
|
|
63
|
+
}],
|
|
64
|
+
type: 'suggestion'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
module.exports = exports.default;
|
|
68
|
+
//# sourceMappingURL=requireParamName.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireParamName.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","tag","name","type","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","module"],"sources":["../../src/rules/requireParamName.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (jsdocParameter.tag && jsdocParameter.name === '') {\n report(\n `There must be an identifier after @${targetTagName} ${jsdocParameter.type === '' ? 'type' : 'tag'}.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all `@param` tags have names.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n description: `Set this to an array of strings representing the AST context (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). Set to \\`\"any\"\\` if you want\nthe rule to apply to any JSDoc block throughout your files (as is necessary\nfor finding function blocks not attached to a function declaration or\nexpression, i.e., \\`@callback\\` or \\`@function\\` (or its aliases \\`@func\\` or\n\\`@method\\`) (including those associated with an \\`@interface\\`).\n\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAA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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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
context,
|
|
11
|
+
report,
|
|
12
|
+
settings,
|
|
13
|
+
utils
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
defaultDestructuredRootType = 'object',
|
|
17
|
+
setDefaultDestructuredRootType = false
|
|
18
|
+
} = context.options[0] || {};
|
|
19
|
+
const functionParameterNames = utils.getFunctionParameterNames();
|
|
20
|
+
let rootCount = -1;
|
|
21
|
+
utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {
|
|
22
|
+
rootCount += jsdocParameter.name.includes('.') ? 0 : 1;
|
|
23
|
+
if (!jsdocParameter.type) {
|
|
24
|
+
if (Array.isArray(functionParameterNames[rootCount])) {
|
|
25
|
+
if (settings.exemptDestructuredRootsFromChecks) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (setDefaultDestructuredRootType) {
|
|
29
|
+
utils.reportJSDoc(`Missing root type for @${targetTagName}.`, jsdocParameter, () => {
|
|
30
|
+
utils.changeTag(jsdocParameter, {
|
|
31
|
+
postType: ' ',
|
|
32
|
+
type: `{${defaultDestructuredRootType}}`
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
report(`Missing JSDoc @${targetTagName} "${jsdocParameter.name}" type.`, null, jsdocParameter);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, {
|
|
42
|
+
contextDefaults: true,
|
|
43
|
+
meta: {
|
|
44
|
+
docs: {
|
|
45
|
+
description: 'Requires that each `@param` tag has a type value (in curly brackets).',
|
|
46
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header'
|
|
47
|
+
},
|
|
48
|
+
fixable: 'code',
|
|
49
|
+
schema: [{
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
properties: {
|
|
52
|
+
contexts: {
|
|
53
|
+
description: `Set this to an array of strings representing the AST context (or an object with
|
|
54
|
+
optional \`context\` and \`comment\` properties) where you wish the rule to be applied.
|
|
55
|
+
|
|
56
|
+
\`context\` defaults to \`any\` and \`comment\` defaults to no specific comment context.
|
|
57
|
+
|
|
58
|
+
Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclaration\`,
|
|
59
|
+
\`FunctionExpression\`). Set to \`"any"\` if you want
|
|
60
|
+
the rule to apply to any JSDoc block throughout your files (as is necessary
|
|
61
|
+
for finding function blocks not attached to a function declaration or
|
|
62
|
+
expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
|
|
63
|
+
\`@method\`) (including those associated with an \`@interface\`).
|
|
64
|
+
|
|
65
|
+
See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
66
|
+
section of our Advanced docs for more on the expected format.`,
|
|
67
|
+
items: {
|
|
68
|
+
anyOf: [{
|
|
69
|
+
type: 'string'
|
|
70
|
+
}, {
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
properties: {
|
|
73
|
+
comment: {
|
|
74
|
+
type: 'string'
|
|
75
|
+
},
|
|
76
|
+
context: {
|
|
77
|
+
type: 'string'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
type: 'object'
|
|
81
|
+
}]
|
|
82
|
+
},
|
|
83
|
+
type: 'array'
|
|
84
|
+
},
|
|
85
|
+
defaultDestructuredRootType: {
|
|
86
|
+
description: 'The type string to set by default for destructured roots. Defaults to "object".',
|
|
87
|
+
type: 'string'
|
|
88
|
+
},
|
|
89
|
+
setDefaultDestructuredRootType: {
|
|
90
|
+
description: `Whether to set a default destructured root type. For example, you may wish
|
|
91
|
+
to avoid manually having to set the type for a \`@param\`
|
|
92
|
+
corresponding to a destructured root object as it is always going to be an
|
|
93
|
+
object. Uses \`defaultDestructuredRootType\` for the type string. Defaults to
|
|
94
|
+
\`false\`.`,
|
|
95
|
+
type: 'boolean'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
type: 'object'
|
|
99
|
+
}],
|
|
100
|
+
type: 'suggestion'
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
module.exports = exports.default;
|
|
104
|
+
//# sourceMappingURL=requireParamType.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireParamType.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","context","report","settings","utils","defaultDestructuredRootType","setDefaultDestructuredRootType","options","functionParameterNames","getFunctionParameterNames","rootCount","forEachPreferredTag","jsdocParameter","targetTagName","name","includes","type","Array","isArray","exemptDestructuredRootsFromChecks","reportJSDoc","changeTag","postType","contextDefaults","meta","docs","description","url","fixable","schema","additionalProperties","properties","contexts","items","anyOf","comment","module"],"sources":["../../src/rules/requireParamType.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n report,\n settings,\n utils,\n}) => {\n const {\n defaultDestructuredRootType = 'object',\n setDefaultDestructuredRootType = false,\n } = context.options[0] || {};\n\n const functionParameterNames = utils.getFunctionParameterNames();\n\n let rootCount = -1;\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n rootCount += jsdocParameter.name.includes('.') ? 0 : 1;\n if (!jsdocParameter.type) {\n if (Array.isArray(functionParameterNames[rootCount])) {\n if (settings.exemptDestructuredRootsFromChecks) {\n return;\n }\n\n if (setDefaultDestructuredRootType) {\n utils.reportJSDoc(`Missing root type for @${targetTagName}.`, jsdocParameter, () => {\n utils.changeTag(jsdocParameter, {\n postType: ' ',\n type: `{${defaultDestructuredRootType}}`,\n });\n });\n return;\n }\n }\n\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" type.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a type value (in curly brackets).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n description: `Set this to an array of strings representing the AST context (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). Set to \\`\"any\"\\` if you want\nthe rule to apply to any JSDoc block throughout your files (as is necessary\nfor finding function blocks not attached to a function declaration or\nexpression, i.e., \\`@callback\\` or \\`@function\\` (or its aliases \\`@func\\` or\n\\`@method\\`) (including those associated with an \\`@interface\\`).\n\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n defaultDestructuredRootType: {\n description: 'The type string to set by default for destructured roots. Defaults to \"object\".',\n type: 'string',\n },\n setDefaultDestructuredRootType: {\n description: `Whether to set a default destructured root type. For example, you may wish\nto avoid manually having to set the type for a \\`@param\\`\ncorresponding to a destructured root object as it is always going to be an\nobject. Uses \\`defaultDestructuredRootType\\` for the type string. Defaults to\n\\`false\\`.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8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e,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,uEAAuE;MACpFC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRN,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;UAClDO,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACElB,IAAI,EAAE;YACR,CAAC,EACD;cACEc,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPnB,IAAI,EAAE;gBACR,CAAC;gBACDf,OAAO,EAAE;kBACPe,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDX,2BAA2B,EAAE;UAC3BqB,WAAW,EAAE,iFAAiF;UAC9FV,IAAI,EAAE;QACR,CAAC;QACDV,8BAA8B,EAAE;UAC9BoB,WAAW,EAAE;AACzB;AACA;AACA;AACA,WAAW;UACCV,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAoB,MAAA,CAAArC,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
context,
|
|
11
|
+
utils
|
|
12
|
+
}) => {
|
|
13
|
+
const propertyAssociatedTags = utils.filterTags(({
|
|
14
|
+
tag
|
|
15
|
+
}) => {
|
|
16
|
+
return ['namespace', 'typedef'].includes(tag);
|
|
17
|
+
});
|
|
18
|
+
if (!propertyAssociatedTags.length) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const targetTagName = /** @type {string} */utils.getPreferredTagName({
|
|
22
|
+
tagName: 'property'
|
|
23
|
+
});
|
|
24
|
+
if (!targetTagName) {
|
|
25
|
+
context.report({
|
|
26
|
+
loc: {
|
|
27
|
+
end: {
|
|
28
|
+
column: 1,
|
|
29
|
+
line: 1
|
|
30
|
+
},
|
|
31
|
+
start: {
|
|
32
|
+
column: 1,
|
|
33
|
+
line: 1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
message: 'Cannot prohibit `@property` in the `tagNamePreference` setting while using the `require-property` rule.'
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (utils.hasATag([targetTagName])) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
for (const propertyAssociatedTag of propertyAssociatedTags) {
|
|
44
|
+
if (!['object', 'Object', 'PlainObject'].includes(propertyAssociatedTag.type)) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {
|
|
48
|
+
utils.addTag(targetTagName);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
iterateAllJsdocs: true,
|
|
53
|
+
meta: {
|
|
54
|
+
docs: {
|
|
55
|
+
description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',
|
|
56
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header'
|
|
57
|
+
},
|
|
58
|
+
fixable: 'code',
|
|
59
|
+
type: 'suggestion'
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
module.exports = exports.default;
|
|
63
|
+
//# sourceMappingURL=requireProperty.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireProperty.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","context","utils","propertyAssociatedTags","filterTags","tag","includes","length","targetTagName","getPreferredTagName","tagName","report","loc","end","column","line","start","message","hasATag","propertyAssociatedTag","type","reportJSDoc","addTag","iterateAllJsdocs","meta","docs","description","url","fixable","module"],"sources":["../../src/rules/requireProperty.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n utils,\n}) => {\n const propertyAssociatedTags = utils.filterTags(({\n tag,\n }) => {\n return [\n 'namespace', 'typedef',\n ].includes(tag);\n });\n if (!propertyAssociatedTags.length) {\n return;\n }\n\n const targetTagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'property',\n }));\n\n if (!targetTagName) {\n context.report({\n loc: {\n end: {\n column: 1,\n line: 1,\n },\n start: {\n column: 1,\n line: 1,\n },\n },\n message: 'Cannot prohibit `@property` in the `tagNamePreference` setting while using the `require-property` rule.',\n });\n return;\n }\n\n if (utils.hasATag([\n targetTagName,\n ])) {\n return;\n }\n\n for (const propertyAssociatedTag of propertyAssociatedTags) {\n if (![\n 'object', 'Object', 'PlainObject',\n ].includes(propertyAssociatedTag.type)) {\n continue;\n }\n\n utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {\n utils.addTag(targetTagName);\n });\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header',\n },\n fixable: 'code',\n type: 'suggestion',\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,KAAK,CAACoB,MAAM,CAACd,aAAa,CAAC;IAC7B,CAAC,CAAC;EACJ;AACF,CAAC,EAAE;EACDe,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,sIAAsI;MACnJC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfR,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAS,MAAA,CAAA9B,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
report,
|
|
11
|
+
utils
|
|
12
|
+
}) => {
|
|
13
|
+
utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {
|
|
14
|
+
if (!jsdoc.description.trim()) {
|
|
15
|
+
report(`Missing JSDoc @${targetTagName} "${jsdoc.name}" description.`, null, jsdoc);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, {
|
|
19
|
+
iterateAllJsdocs: true,
|
|
20
|
+
meta: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: 'Requires that each `@property` tag has a `description` value.',
|
|
23
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header'
|
|
24
|
+
},
|
|
25
|
+
type: 'suggestion'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
module.exports = exports.default;
|
|
29
|
+
//# sourceMappingURL=requirePropertyDescription.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirePropertyDescription.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdoc","targetTagName","description","trim","name","iterateAllJsdocs","meta","docs","url","type","module"],"sources":["../../src/rules/requirePropertyDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {\n if (!jsdoc.description.trim()) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdoc.name}\" description.`,\n null,\n jsdoc,\n );\n }\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that each `@property` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/B,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,UAAU,EAAE,CAACC,KAAK,EAAEC,aAAa,KAAK;IAC9D,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,CAAC,CAAC,EAAE;MAC7BN,MAAM,CACJ,kBAAkBI,aAAa,KAAKD,KAAK,CAACI,IAAI,gBAAgB,EAC9D,IAAI,EACJJ,KACF,CAAC;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDK,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJL,WAAW,EAAE,+DAA+D;MAC5EM,GAAG,EAAE;IACP,CAAC;IACDC,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAC,MAAA,CAAAf,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
report,
|
|
11
|
+
utils
|
|
12
|
+
}) => {
|
|
13
|
+
utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {
|
|
14
|
+
if (jsdoc.tag && jsdoc.name === '') {
|
|
15
|
+
report(`There must be an identifier after @${targetTagName} ${jsdoc.type === '' ? 'type' : 'tag'}.`, null, jsdoc);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, {
|
|
19
|
+
iterateAllJsdocs: true,
|
|
20
|
+
meta: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: 'Requires that all `@property` tags have names.',
|
|
23
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header'
|
|
24
|
+
},
|
|
25
|
+
type: 'suggestion'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
module.exports = exports.default;
|
|
29
|
+
//# sourceMappingURL=requirePropertyName.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirePropertyName.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdoc","targetTagName","tag","name","type","iterateAllJsdocs","meta","docs","description","url","module"],"sources":["../../src/rules/requirePropertyName.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {\n if (jsdoc.tag && jsdoc.name === '') {\n report(\n `There must be an identifier after @${targetTagName} ${jsdoc.type === '' ? 'type' : 'tag'}.`,\n null,\n jsdoc,\n );\n }\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that all `@property` tags have names.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/B,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,UAAU,EAAE,CAACC,KAAK,EAAEC,aAAa,KAAK;IAC9D,IAAID,KAAK,CAACE,GAAG,IAAIF,KAAK,CAACG,IAAI,KAAK,EAAE,EAAE;MAClCN,MAAM,CACJ,sCAAsCI,aAAa,IAAID,KAAK,CAACI,IAAI,KAAK,EAAE,GAAG,MAAM,GAAG,KAAK,GAAG,EAC5F,IAAI,EACJJ,KACF,CAAC;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDK,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,gDAAgD;MAC7DC,GAAG,EAAE;IACP,CAAC;IACDL,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAM,MAAA,CAAAf,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
10
|
+
report,
|
|
11
|
+
utils
|
|
12
|
+
}) => {
|
|
13
|
+
utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {
|
|
14
|
+
if (!jsdoc.type) {
|
|
15
|
+
report(`Missing JSDoc @${targetTagName} "${jsdoc.name}" type.`, null, jsdoc);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, {
|
|
19
|
+
iterateAllJsdocs: true,
|
|
20
|
+
meta: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: 'Requires that each `@property` tag has a type value (in curly brackets).',
|
|
23
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header'
|
|
24
|
+
},
|
|
25
|
+
type: 'suggestion'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
module.exports = exports.default;
|
|
29
|
+
//# sourceMappingURL=requirePropertyType.cjs.map
|