eslint-plugin-jsdoc 45.0.0 → 46.1.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 +6 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +35 -7
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/rules/noMissingSyntax.js +5 -12
- package/dist/rules/noMissingSyntax.js.map +1 -1
- package/dist/rules/noRestrictedSyntax.js +7 -18
- package/dist/rules/noRestrictedSyntax.js.map +1 -1
- package/dist/rules/requireReturns.js +19 -1
- package/dist/rules/requireReturns.js.map +1 -1
- package/docs/rules/check-examples.md +1 -1
- package/docs/rules/check-indentation.md +1 -1
- package/docs/rules/check-line-alignment.md +1 -1
- package/docs/rules/check-param-names.md +1 -1
- package/docs/rules/check-types.md +1 -1
- package/docs/rules/check-values.md +1 -1
- package/docs/rules/match-description.md +1 -1
- package/docs/rules/multiline-blocks.md +1 -1
- package/docs/rules/no-multi-asterisks.md +1 -1
- package/docs/rules/no-undefined-types.md +1 -1
- package/docs/rules/require-asterisk-prefix.md +1 -1
- package/docs/rules/require-description-complete-sentence.md +1 -1
- package/docs/rules/require-description.md +1 -1
- package/docs/rules/require-example.md +1 -1
- package/docs/rules/require-hyphen-before-param-description.md +1 -1
- package/docs/rules/require-param-description.md +1 -1
- package/docs/rules/require-param-type.md +1 -1
- package/docs/rules/require-param.md +1 -1
- package/docs/rules/require-returns-check.md +1 -1
- package/docs/rules/require-returns.md +28 -1
- package/docs/rules/require-throws.md +1 -1
- package/docs/rules/require-yields-check.md +1 -1
- package/docs/rules/require-yields.md +1 -1
- package/docs/rules/sort-tags.md +1 -1
- package/docs/rules/tag-lines.md +1 -1
- package/docs/rules/text-escaping.md +1 -1
- package/package.json +5 -2
- package/dist/bin/generateRule.js +0 -237
- package/dist/bin/generateRule.js.map +0 -1
- package/dist/bin/gitdown.d.ts +0 -12
package/README.md
CHANGED
|
@@ -241,12 +241,12 @@ non-default-recommended fixer).
|
|
|
241
241
|
||:wrench:|[no-bad-blocks](./docs/rules/no-bad-blocks.md#readme)|This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block|
|
|
242
242
|
||:wrench:|[no-blank-block-descriptions](./docs/rules/no-blank-block-descriptions.md#readme)|If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description.|
|
|
243
243
|
||:wrench:|[no-blank-blocks](./docs/rules/no-blank-blocks.md#readme)|Reports and optionally removes blocks with whitespace only|
|
|
244
|
-
|
|
244
|
+
|:heavy_check_mark:|:wrench:|[no-defaults](./docs/rules/no-defaults.md#readme)|This rule reports defaults being used on the relevant portion of `@param` or `@default`|
|
|
245
245
|
|||[no-missing-syntax](./docs/rules/no-missing-syntax.md#readme)|This rule lets you report if certain always expected comment structures are missing.|
|
|
246
246
|
|:heavy_check_mark:|:wrench:|[no-multi-asterisks](./docs/rules/no-multi-asterisks.md#readme)|Prevents use of multiple asterisks at the beginning of lines|
|
|
247
247
|
|||[no-restricted-syntax](./docs/rules/no-restricted-syntax.md#readme)|Reports when certain comment structures are present|
|
|
248
|
-
|
|
249
|
-
|:heavy_check_mark
|
|
248
|
+
|On in TS|:wrench:|[no-types](./docs/rules/no-types.md#readme)|Prohibits types on `@param` or `@returns` (redundant with TypeScript)|
|
|
249
|
+
|:heavy_check_mark: (off in TS and TS flavor)||[no-undefined-types](./docs/rules/no-undefined-types.md#readme)|Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef` |
|
|
250
250
|
||:wrench:|[require-asterisk-prefix](./docs/rules/require-asterisk-prefix.md#readme)|Requires that each JSDoc line starts with an `*`|
|
|
251
251
|
|||[require-description](./docs/rules/require-description.md#readme)|Requires that all functions (and potentially other contexts) have a description.|
|
|
252
252
|
||:wrench:|[require-description-complete-sentence](./docs/rules/require-description-complete-sentence.md#readme)|Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences|
|
|
@@ -257,15 +257,15 @@ non-default-recommended fixer).
|
|
|
257
257
|
|:heavy_check_mark:|:wrench:|[require-param](./docs/rules/require-param.md#readme)|Requires that all function parameters are documented with a `@param` tag.|
|
|
258
258
|
|:heavy_check_mark:||[require-param-description](./docs/rules/require-param-description.md#readme)|Requires that each `@param` tag has a `description` value.|
|
|
259
259
|
|:heavy_check_mark:||[require-param-name](./docs/rules/require-param-name.md#readme)|Requires that all `@param` tags have names.|
|
|
260
|
-
|:heavy_check_mark
|
|
260
|
+
|:heavy_check_mark: (off in TS)||[require-param-type](./docs/rules/require-param-type.md#readme)|Requires that each `@param` tag has a type value (within curly brackets).|
|
|
261
261
|
|:heavy_check_mark:|:wrench:|[require-property](./docs/rules/require-property.md#readme)|Requires that all `@typedef` and `@namespace` tags have `@property` tags when their type is a plain `object`, `Object`, or `PlainObject`.|
|
|
262
262
|
|:heavy_check_mark:||[require-property-description](./docs/rules/require-property-description.md#readme)|Requires that each `@property` tag has a `description` value.|
|
|
263
263
|
|:heavy_check_mark:||[require-property-name](./docs/rules/require-property-name.md#readme)|Requires that all `@property` tags have names.|
|
|
264
|
-
|:heavy_check_mark
|
|
264
|
+
|:heavy_check_mark: (off in TS)||[require-property-type](./docs/rules/require-property-type.md#readme)|Requires that each `@property` tag has a type value (within curly brackets).|
|
|
265
265
|
|:heavy_check_mark:||[require-returns](./docs/rules/require-returns.md#readme)|Requires that return statements are documented.|
|
|
266
266
|
|:heavy_check_mark:||[require-returns-check](./docs/rules/require-returns-check.md#readme)|Requires a return statement be present in a function body if a `@returns` tag is specified in the jsdoc comment block (and reports if multiple `@returns` tags are present).|
|
|
267
267
|
|:heavy_check_mark:||[require-returns-description](./docs/rules/require-returns-description.md#readme)|Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns).|
|
|
268
|
-
|:heavy_check_mark
|
|
268
|
+
|:heavy_check_mark: (off in TS)||[require-returns-type](./docs/rules/require-returns-type.md#readme)|Requires that `@returns` tag has a type value (in curly brackets).|
|
|
269
269
|
|||[require-throws](./docs/rules/require-throws.md#readme)|Requires that throw statements are documented|
|
|
270
270
|
|:heavy_check_mark:||[require-yields](./docs/rules/require-yields.md#readme)|Requires that yields are documented|
|
|
271
271
|
|:heavy_check_mark:||[require-yields-check](./docs/rules/require-yields-check.md#readme)|Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a `yield` with a return value present)|
|
package/dist/index.js
CHANGED
|
@@ -146,7 +146,7 @@ const createRecommendedRuleset = warnOrError => {
|
|
|
146
146
|
'jsdoc/no-bad-blocks': 'off',
|
|
147
147
|
'jsdoc/no-blank-block-descriptions': 'off',
|
|
148
148
|
'jsdoc/no-blank-blocks': 'off',
|
|
149
|
-
'jsdoc/no-defaults':
|
|
149
|
+
'jsdoc/no-defaults': warnOrError,
|
|
150
150
|
'jsdoc/no-missing-syntax': 'off',
|
|
151
151
|
'jsdoc/no-multi-asterisks': warnOrError,
|
|
152
152
|
'jsdoc/no-restricted-syntax': 'off',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTypes","_checkValues","_emptyTags","_implementsOnClasses","_informativeDocs","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_validTypes","obj","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTypes","checkValues","emptyTags","implementsOnClasses","informativeDocs","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","validTypes","createRecommendedRuleset","warnOrError","plugins","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","Error","recommended","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import checkAccess from './rules/checkAccess';\nimport checkAlignment from './rules/checkAlignment';\nimport checkExamples from './rules/checkExamples';\nimport checkIndentation from './rules/checkIndentation';\nimport checkLineAlignment from './rules/checkLineAlignment';\nimport checkParamNames from './rules/checkParamNames';\nimport checkPropertyNames from './rules/checkPropertyNames';\nimport checkSyntax from './rules/checkSyntax';\nimport checkTagNames from './rules/checkTagNames';\nimport checkTypes from './rules/checkTypes';\nimport checkValues from './rules/checkValues';\nimport emptyTags from './rules/emptyTags';\nimport implementsOnClasses from './rules/implementsOnClasses';\nimport informativeDocs from './rules/informativeDocs';\nimport matchDescription from './rules/matchDescription';\nimport matchName from './rules/matchName';\nimport multilineBlocks from './rules/multilineBlocks';\nimport noBadBlocks from './rules/noBadBlocks';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions';\nimport noBlankBlocks from './rules/noBlankBlocks';\nimport noDefaults from './rules/noDefaults';\nimport noMissingSyntax from './rules/noMissingSyntax';\nimport noMultiAsterisks from './rules/noMultiAsterisks';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax';\nimport noTypes from './rules/noTypes';\nimport noUndefinedTypes from './rules/noUndefinedTypes';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix';\nimport requireDescription from './rules/requireDescription';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence';\nimport requireExample from './rules/requireExample';\nimport requireFileOverview from './rules/requireFileOverview';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription';\nimport requireJsdoc from './rules/requireJsdoc';\nimport requireParam from './rules/requireParam';\nimport requireParamDescription from './rules/requireParamDescription';\nimport requireParamName from './rules/requireParamName';\nimport requireParamType from './rules/requireParamType';\nimport requireProperty from './rules/requireProperty';\nimport requirePropertyDescription from './rules/requirePropertyDescription';\nimport requirePropertyName from './rules/requirePropertyName';\nimport requirePropertyType from './rules/requirePropertyType';\nimport requireReturns from './rules/requireReturns';\nimport requireReturnsCheck from './rules/requireReturnsCheck';\nimport requireReturnsDescription from './rules/requireReturnsDescription';\nimport requireReturnsType from './rules/requireReturnsType';\nimport requireThrows from './rules/requireThrows';\nimport requireYields from './rules/requireYields';\nimport requireYieldsCheck from './rules/requireYieldsCheck';\nimport sortTags from './rules/sortTags';\nimport tagLines from './rules/tagLines';\nimport textEscaping from './rules/textEscaping';\nimport validTypes from './rules/validTypes';\n\n/**\n * @type {import('eslint').ESLint.Plugin}\n */\nconst index = {\n configs: {},\n 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-types': checkTypes,\n 'check-values': checkValues,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'informative-docs': informativeDocs,\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 '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-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-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-throws': requireThrows,\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'valid-types': validTypes,\n },\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedRuleset = (warnOrError) => {\n return {\n plugins: [\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-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/informative-docs': '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': 'off',\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/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-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-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError) => {\n const ruleset = createRecommendedRuleset(warnOrError);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable 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 indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError) => {\n const ruleset = createRecommendedRuleset(warnOrError);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable indent */\n },\n };\n};\n\n/* istanbul ignore if -- 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');\n\nexport default index;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,mBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,gBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA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ChB;MACE,0BAA0B,EAAE;MAC9B;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA,IAAI,CAACF,KAAK,CAACC,OAAO,EAAE;EAClB,MAAM,IAAI6D,KAAK,CAAC,kBAAkB,CAAC;AACrC;AAEA9D,KAAK,CAACC,OAAO,CAAC8D,WAAW,GAAGR,wBAAwB,CAAC,MAAM,CAAC;AAC5DvD,KAAK,CAACC,OAAO,CAAC,mBAAmB,CAAC,GAAGsD,wBAAwB,CAAC,OAAO,CAAC;AACtEvD,KAAK,CAACC,OAAO,CAAC,wBAAwB,CAAC,GAAGyD,kCAAkC,CAAC,MAAM,CAAC;AACpF1D,KAAK,CAACC,OAAO,CAAC,8BAA8B,CAAC,GAAGyD,kCAAkC,CAAC,OAAO,CAAC;AAC3F1D,KAAK,CAACC,OAAO,CAAC,+BAA+B,CAAC,GAAG4D,wCAAwC,CAAC,MAAM,CAAC;AACjG7D,KAAK,CAACC,OAAO,CAAC,qCAAqC,CAAC,GAAG4D,wCAAwC,CAAC,OAAO,CAAC;AAAC,IAAAG,QAAA,GAE1FhE,KAAK;AAAAiE,OAAA,CAAAlE,OAAA,GAAAiE,QAAA;AAAAE,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAlE,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTypes","_checkValues","_emptyTags","_implementsOnClasses","_informativeDocs","_matchDescription","_matchName","_multilineBlocks","_noBadBlocks","_noBlankBlockDescriptions","_noBlankBlocks","_noDefaults","_noMissingSyntax","_noMultiAsterisks","_noRestrictedSyntax","_noTypes","_noUndefinedTypes","_requireAsteriskPrefix","_requireDescription","_requireDescriptionCompleteSentence","_requireExample","_requireFileOverview","_requireHyphenBeforeParamDescription","_requireJsdoc","_requireParam","_requireParamDescription","_requireParamName","_requireParamType","_requireProperty","_requirePropertyDescription","_requirePropertyName","_requirePropertyType","_requireReturns","_requireReturnsCheck","_requireReturnsDescription","_requireReturnsType","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_validTypes","obj","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTypes","checkValues","emptyTags","implementsOnClasses","informativeDocs","matchDescription","matchName","multilineBlocks","noBadBlocks","noBlankBlockDescriptions","noBlankBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","validTypes","createRecommendedRuleset","warnOrError","plugins","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","Error","recommended","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import checkAccess from './rules/checkAccess';\nimport checkAlignment from './rules/checkAlignment';\nimport checkExamples from './rules/checkExamples';\nimport checkIndentation from './rules/checkIndentation';\nimport checkLineAlignment from './rules/checkLineAlignment';\nimport checkParamNames from './rules/checkParamNames';\nimport checkPropertyNames from './rules/checkPropertyNames';\nimport checkSyntax from './rules/checkSyntax';\nimport checkTagNames from './rules/checkTagNames';\nimport checkTypes from './rules/checkTypes';\nimport checkValues from './rules/checkValues';\nimport emptyTags from './rules/emptyTags';\nimport implementsOnClasses from './rules/implementsOnClasses';\nimport informativeDocs from './rules/informativeDocs';\nimport matchDescription from './rules/matchDescription';\nimport matchName from './rules/matchName';\nimport multilineBlocks from './rules/multilineBlocks';\nimport noBadBlocks from './rules/noBadBlocks';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions';\nimport noBlankBlocks from './rules/noBlankBlocks';\nimport noDefaults from './rules/noDefaults';\nimport noMissingSyntax from './rules/noMissingSyntax';\nimport noMultiAsterisks from './rules/noMultiAsterisks';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax';\nimport noTypes from './rules/noTypes';\nimport noUndefinedTypes from './rules/noUndefinedTypes';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix';\nimport requireDescription from './rules/requireDescription';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence';\nimport requireExample from './rules/requireExample';\nimport requireFileOverview from './rules/requireFileOverview';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription';\nimport requireJsdoc from './rules/requireJsdoc';\nimport requireParam from './rules/requireParam';\nimport requireParamDescription from './rules/requireParamDescription';\nimport requireParamName from './rules/requireParamName';\nimport requireParamType from './rules/requireParamType';\nimport requireProperty from './rules/requireProperty';\nimport requirePropertyDescription from './rules/requirePropertyDescription';\nimport requirePropertyName from './rules/requirePropertyName';\nimport requirePropertyType from './rules/requirePropertyType';\nimport requireReturns from './rules/requireReturns';\nimport requireReturnsCheck from './rules/requireReturnsCheck';\nimport requireReturnsDescription from './rules/requireReturnsDescription';\nimport requireReturnsType from './rules/requireReturnsType';\nimport requireThrows from './rules/requireThrows';\nimport requireYields from './rules/requireYields';\nimport requireYieldsCheck from './rules/requireYieldsCheck';\nimport sortTags from './rules/sortTags';\nimport tagLines from './rules/tagLines';\nimport textEscaping from './rules/textEscaping';\nimport validTypes from './rules/validTypes';\n\n/**\n * @type {import('eslint').ESLint.Plugin}\n */\nconst index = {\n configs: {},\n 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-types': checkTypes,\n 'check-values': checkValues,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'informative-docs': informativeDocs,\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 '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-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-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-throws': requireThrows,\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'text-escaping': textEscaping,\n 'valid-types': validTypes,\n },\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedRuleset = (warnOrError) => {\n return {\n plugins: [\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-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/informative-docs': '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/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-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-returns': warnOrError,\n 'jsdoc/require-returns-check': warnOrError,\n 'jsdoc/require-returns-description': warnOrError,\n 'jsdoc/require-returns-type': warnOrError,\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-yields': warnOrError,\n 'jsdoc/require-yields-check': warnOrError,\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': warnOrError,\n 'jsdoc/text-escaping': 'off',\n 'jsdoc/valid-types': warnOrError,\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError) => {\n const ruleset = createRecommendedRuleset(warnOrError);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable 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 indent */\n },\n };\n};\n\n/**\n * @param {\"warn\"|\"error\"} warnOrError\n * @returns {import('eslint').ESLint.ConfigData}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError) => {\n const ruleset = createRecommendedRuleset(warnOrError);\n\n return {\n ...ruleset,\n rules: {\n ...ruleset.rules,\n /* eslint-disable indent -- Extra indent to avoid use by auto-rule-editing */\n 'jsdoc/no-undefined-types': 'off',\n /* eslint-enable indent */\n },\n };\n};\n\n/* istanbul ignore if -- 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');\n\nexport default index;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,s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AGJ,wBAAwB,CAACC,WAAW,CAAC;EAErD,OAAO;IACL,GAAGG,OAAO;IACVzD,KAAK,EAAE;MACL,GAAGyD,OAAO,CAACzD,KAAK;MAChB;MACE,0BAA0B,EAAE;MAC9B;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA,IAAI,CAACF,KAAK,CAACC,OAAO,EAAE;EAClB,MAAM,IAAI6D,KAAK,CAAC,kBAAkB,CAAC;AACrC;AAEA9D,KAAK,CAACC,OAAO,CAAC8D,WAAW,GAAGR,wBAAwB,CAAC,MAAM,CAAC;AAC5DvD,KAAK,CAACC,OAAO,CAAC,mBAAmB,CAAC,GAAGsD,wBAAwB,CAAC,OAAO,CAAC;AACtEvD,KAAK,CAACC,OAAO,CAAC,wBAAwB,CAAC,GAAGyD,kCAAkC,CAAC,MAAM,CAAC;AACpF1D,KAAK,CAACC,OAAO,CAAC,8BAA8B,CAAC,GAAGyD,kCAAkC,CAAC,OAAO,CAAC;AAC3F1D,KAAK,CAACC,OAAO,CAAC,+BAA+B,CAAC,GAAG4D,wCAAwC,CAAC,MAAM,CAAC;AACjG7D,KAAK,CAACC,OAAO,CAAC,qCAAqC,CAAC,GAAG4D,wCAAwC,CAAC,OAAO,CAAC;AAAC,IAAAG,QAAA,GAE1FhE,KAAK;AAAAiE,OAAA,CAAAlE,OAAA,GAAAiE,QAAA;AAAAE,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAlE,OAAA"}
|
package/dist/iterateJsdoc.js
CHANGED
|
@@ -14,6 +14,7 @@ Object.defineProperty(exports, "parseComment", {
|
|
|
14
14
|
var _jsdocUtils = _interopRequireDefault(require("./jsdocUtils"));
|
|
15
15
|
var _jsdoccomment = require("@es-joy/jsdoccomment");
|
|
16
16
|
var _commentParser = require("comment-parser");
|
|
17
|
+
var _esquery = _interopRequireDefault(require("esquery"));
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
19
|
/**
|
|
19
20
|
* @typedef {number} Integer
|
|
@@ -32,7 +33,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
32
33
|
* tags?: string[],
|
|
33
34
|
* replacement?: string,
|
|
34
35
|
* minimum?: Integer,
|
|
35
|
-
* message?: string
|
|
36
|
+
* message?: string,
|
|
37
|
+
* forceRequireReturn?: boolean
|
|
36
38
|
* }} ContextObject
|
|
37
39
|
*/
|
|
38
40
|
/**
|
|
@@ -472,6 +474,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
472
474
|
* @param {string} tagName
|
|
473
475
|
* @returns {boolean}
|
|
474
476
|
*/
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @callback FindContext
|
|
480
|
+
* @param {Context[]} contexts
|
|
481
|
+
* @param {string|undefined} comment
|
|
482
|
+
* @returns {{
|
|
483
|
+
* foundContext: Context|undefined,
|
|
484
|
+
* contextStr: string
|
|
485
|
+
* }}
|
|
486
|
+
*/
|
|
475
487
|
/**
|
|
476
488
|
* @typedef {BasicUtils & {
|
|
477
489
|
* isIteratingFunction: IsIteratingFunction,
|
|
@@ -531,7 +543,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
531
543
|
* hasOptionTag: HasOptionTag,
|
|
532
544
|
* getClassNode: GetClassNode,
|
|
533
545
|
* getClassJsdoc: GetClassJsdoc,
|
|
534
|
-
* classHasTag: ClassHasTag
|
|
546
|
+
* classHasTag: ClassHasTag,
|
|
547
|
+
* findContext: FindContext
|
|
535
548
|
* }} Utils
|
|
536
549
|
*/
|
|
537
550
|
const {
|
|
@@ -1488,6 +1501,22 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
|
|
|
1488
1501
|
matchingJsdocTag, targetTagName);
|
|
1489
1502
|
}
|
|
1490
1503
|
};
|
|
1504
|
+
|
|
1505
|
+
/** @type {FindContext} */
|
|
1506
|
+
utils.findContext = (contexts, comment) => {
|
|
1507
|
+
const foundContext = contexts.find(cntxt => {
|
|
1508
|
+
return typeof cntxt === 'string' ? _esquery.default.matches( /** @type {Node} */node, _esquery.default.parse(cntxt), undefined, {
|
|
1509
|
+
visitorKeys: sourceCode.visitorKeys
|
|
1510
|
+
}) : (!cntxt.context || cntxt.context === 'any' || _esquery.default.matches( /** @type {Node} */node, _esquery.default.parse(cntxt.context), undefined, {
|
|
1511
|
+
visitorKeys: sourceCode.visitorKeys
|
|
1512
|
+
})) && comment === cntxt.comment;
|
|
1513
|
+
});
|
|
1514
|
+
const contextStr = typeof foundContext === 'object' ? foundContext.context ?? 'any' : String(foundContext);
|
|
1515
|
+
return {
|
|
1516
|
+
contextStr,
|
|
1517
|
+
foundContext
|
|
1518
|
+
};
|
|
1519
|
+
};
|
|
1491
1520
|
return utils;
|
|
1492
1521
|
};
|
|
1493
1522
|
|
|
@@ -1694,7 +1723,6 @@ const makeReport = (context, commentNode) => {
|
|
|
1694
1723
|
* @param {JsdocBlockWithInline} jsdoc
|
|
1695
1724
|
* @param {RuleConfig} ruleConfig
|
|
1696
1725
|
* @param {import('eslint').Rule.RuleContext} context
|
|
1697
|
-
* @param {string[]} lines
|
|
1698
1726
|
* @param {import('@es-joy/jsdoccomment').Token} jsdocNode
|
|
1699
1727
|
* @param {Node|null} node
|
|
1700
1728
|
* @param {Settings} settings
|
|
@@ -1704,7 +1732,7 @@ const makeReport = (context, commentNode) => {
|
|
|
1704
1732
|
* @param {boolean} [iteratingAll]
|
|
1705
1733
|
* @returns {void}
|
|
1706
1734
|
*/
|
|
1707
|
-
const iterate = (info, indent, jsdoc, ruleConfig, context,
|
|
1735
|
+
const iterate = (info, indent, jsdoc, ruleConfig, context, jsdocNode, node, settings, sourceCode, iterator, state, iteratingAll) => {
|
|
1708
1736
|
const jsdocNde = /** @type {unknown} */jsdocNode;
|
|
1709
1737
|
const report = makeReport(context, /** @type {import('estree').Node} */
|
|
1710
1738
|
jsdocNde);
|
|
@@ -1842,7 +1870,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
|
|
|
1842
1870
|
comment,
|
|
1843
1871
|
lastIndex: idx,
|
|
1844
1872
|
selector: node === null || node === void 0 ? void 0 : node.type
|
|
1845
|
-
}, indent, jsdoc, ruleConfig, context,
|
|
1873
|
+
}, indent, jsdoc, ruleConfig, context, jsdocNode, /** @type {Node} */
|
|
1846
1874
|
node, /** @type {Settings} */
|
|
1847
1875
|
settings, sourceCode, iterator, state, true);
|
|
1848
1876
|
}
|
|
@@ -1867,7 +1895,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
|
|
|
1867
1895
|
} : {
|
|
1868
1896
|
lastIndex,
|
|
1869
1897
|
selector: node === null || node === void 0 ? void 0 : node.type
|
|
1870
|
-
}, indent, jsdoc, ruleConfig, context,
|
|
1898
|
+
}, indent, jsdoc, ruleConfig, context, jsdocNode, node, /** @type {Settings} */
|
|
1871
1899
|
settings, sourceCode, iterator, state, true);
|
|
1872
1900
|
}
|
|
1873
1901
|
const settngs = /** @type {Settings} */settings;
|
|
@@ -2056,7 +2084,7 @@ function iterateJsdoc(iterator, ruleConfig) {
|
|
|
2056
2084
|
handler && handler(jsdoc) === false) {
|
|
2057
2085
|
return;
|
|
2058
2086
|
}
|
|
2059
|
-
iterate(info, indent, jsdoc, ruleConfig, context,
|
|
2087
|
+
iterate(info, indent, jsdoc, ruleConfig, context, jsdocNode, node, settings, sourceCode, iterator, /** @type {StateObject} */
|
|
2060
2088
|
state);
|
|
2061
2089
|
};
|
|
2062
2090
|
|