eslint-plugin-jsdoc 48.7.0 → 48.8.1
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 +3 -0
- package/dist/defaultTagOrder.cjs +1 -1
- package/dist/defaultTagOrder.cjs.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/checkTemplateNames.cjs +108 -0
- package/dist/rules/checkTemplateNames.cjs.map +1 -0
- package/package.json +15 -15
- package/src/defaultTagOrder.js +1 -1
- package/src/index.js +3 -0
- package/src/rules/checkTemplateNames.js +101 -0
package/README.md
CHANGED
|
@@ -93,6 +93,7 @@ Finally, enable all of the rules that you would like to use.
|
|
|
93
93
|
"jsdoc/check-indentation": 1,
|
|
94
94
|
"jsdoc/check-line-alignment": 1,
|
|
95
95
|
"jsdoc/check-param-names": 1, // Recommended
|
|
96
|
+
"jsdoc/check-template-names": 1,
|
|
96
97
|
"jsdoc/check-property-names": 1, // Recommended
|
|
97
98
|
"jsdoc/check-syntax": 1,
|
|
98
99
|
"jsdoc/check-tag-names": 1, // Recommended
|
|
@@ -130,6 +131,7 @@ Finally, enable all of the rules that you would like to use.
|
|
|
130
131
|
"jsdoc/require-returns-check": 1, // Recommended
|
|
131
132
|
"jsdoc/require-returns-description": 1, // Recommended
|
|
132
133
|
"jsdoc/require-returns-type": 1, // Recommended
|
|
134
|
+
"jsdoc/require-template": 1,
|
|
133
135
|
"jsdoc/require-throws": 1,
|
|
134
136
|
"jsdoc/require-yields": 1, // Recommended
|
|
135
137
|
"jsdoc/require-yields-check": 1, // Recommended
|
|
@@ -261,6 +263,7 @@ non-default-recommended fixer).
|
|
|
261
263
|
|:heavy_check_mark:|:wrench:|[check-property-names](./docs/rules/check-property-names.md#readme)|Checks for dupe `@property` names, that nested property names have roots|
|
|
262
264
|
|||[check-syntax](./docs/rules/check-syntax.md#readme)|Reports use against current mode (currently only prohibits Closure-specific syntax)|
|
|
263
265
|
|:heavy_check_mark:|:wrench:|[check-tag-names](./docs/rules/check-tag-names.md#readme)|Reports invalid jsdoc (block) tag names|
|
|
266
|
+
| || [check-template-names](./docs/rules/check-template-names.md#readme)|Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
264
267
|
|:heavy_check_mark:|:wrench:|[check-types](./docs/rules/check-types.md#readme)|Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements)|
|
|
265
268
|
|:heavy_check_mark:||[check-values](./docs/rules/check-values.md#readme)|Checks for expected content within some miscellaneous tags (`@version`, `@since`, `@license`, `@author`)|
|
|
266
269
|
| || [convert-to-jsdoc-comments](./docs/rules/convert-to-jsdoc-comments.md#readme) | Converts line and block comments preceding or following specified nodes into JSDoc comments|
|
package/dist/defaultTagOrder.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const defaultTagOrder = [{
|
|
|
11
11
|
// Module/file-level
|
|
12
12
|
'module', 'exports', 'file', 'fileoverview', 'overview', 'import',
|
|
13
13
|
// Identifying (name, type)
|
|
14
|
-
'
|
|
14
|
+
'template', 'typedef', 'interface', 'record', 'name', 'kind', 'type', 'alias', 'external', 'host', 'callback', 'func', 'function', 'method', 'class', 'constructor',
|
|
15
15
|
// Relationships
|
|
16
16
|
'modifies', 'mixes', 'mixin', 'mixinClass', 'mixinFunction', 'namespace', 'borrows', 'constructs', 'lends', 'implements', 'requires',
|
|
17
17
|
// Long descriptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTagOrder.cjs","names":["defaultTagOrder","tags","_default","exports","default","module"],"sources":["../src/defaultTagOrder.js"],"sourcesContent":["const defaultTagOrder = [\n {\n tags: [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n 'import',\n\n // Identifying (name, type)\n '
|
|
1
|
+
{"version":3,"file":"defaultTagOrder.cjs","names":["defaultTagOrder","tags","_default","exports","default","module"],"sources":["../src/defaultTagOrder.js"],"sourcesContent":["const defaultTagOrder = [\n {\n tags: [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n 'import',\n\n // Identifying (name, type)\n 'template',\n 'typedef',\n 'interface',\n 'record',\n 'name',\n 'kind',\n 'type',\n 'alias',\n 'external',\n 'host',\n 'callback',\n 'func',\n 'function',\n 'method',\n 'class',\n 'constructor',\n\n // Relationships\n 'modifies',\n 'mixes',\n 'mixin',\n 'mixinClass',\n 'mixinFunction',\n 'namespace',\n 'borrows',\n 'constructs',\n 'lends',\n 'implements',\n 'requires',\n\n // Long descriptions\n 'desc',\n 'description',\n 'classdesc',\n 'tutorial',\n 'copyright',\n 'license',\n\n // Simple annotations\n\n // TypeScript\n 'internal',\n 'overload',\n\n 'const',\n 'constant',\n 'final',\n 'global',\n 'readonly',\n 'abstract',\n 'virtual',\n 'var',\n 'member',\n 'memberof',\n 'memberof!',\n 'inner',\n 'instance',\n 'inheritdoc',\n 'inheritDoc',\n 'override',\n 'hideconstructor',\n\n // Core function/object info\n 'param',\n 'arg',\n 'argument',\n 'prop',\n 'property',\n 'return',\n 'returns',\n\n // Important behavior details\n 'async',\n 'generator',\n 'default',\n 'defaultvalue',\n 'enum',\n 'augments',\n 'extends',\n 'throws',\n 'exception',\n 'yield',\n 'yields',\n 'event',\n 'fires',\n 'emits',\n 'listens',\n 'this',\n\n // TypeScript\n 'satisfies',\n\n // Access\n 'static',\n 'private',\n 'protected',\n 'public',\n 'access',\n 'package',\n\n '-other',\n\n // Supplementary descriptions\n 'see',\n 'example',\n\n // METADATA\n\n // Other Closure (undocumented) metadata\n 'closurePrimitive',\n 'customElement',\n 'expose',\n 'hidden',\n 'idGenerator',\n 'meaning',\n 'ngInject',\n 'owner',\n 'wizaction',\n\n // Other Closure (documented) metadata\n 'define',\n 'dict',\n 'export',\n 'externs',\n 'implicitCast',\n 'noalias',\n 'nocollapse',\n 'nocompile',\n 'noinline',\n 'nosideeffects',\n 'polymer',\n 'polymerBehavior',\n 'preserve',\n 'struct',\n 'suppress',\n 'unrestricted',\n\n // @homer0/prettier-plugin-jsdoc metadata\n 'category',\n\n // Non-Closure metadata\n 'ignore',\n 'author',\n 'version',\n 'variation',\n 'since',\n 'deprecated',\n 'todo',\n ],\n },\n];\n\nexport default defaultTagOrder;\n"],"mappings":";;;;;;AAAA,MAAMA,eAAe,GAAG,CACtB;EACEC,IAAI,EAAE;EACJ;EACA,SAAS,EACT,aAAa;EAEb;EACA,QAAQ,EACR,SAAS,EACT,MAAM,EACN,cAAc,EACd,UAAU,EACV,QAAQ;EAER;EACA,UAAU,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,aAAa;EAEb;EACA,UAAU,EACV,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,WAAW,EACX,SAAS,EACT,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU;EAEV;EACA,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS;EAET;;EAEA;EACA,UAAU,EACV,UAAU,EAEV,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB;EAEjB;EACA,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS;EAET;EACA,OAAO,EACP,WAAW,EACX,SAAS,EACT,cAAc,EACd,MAAM,EACN,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,MAAM;EAEN;EACA,WAAW;EAEX;EACA,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EAET,QAAQ;EAER;EACA,KAAK,EACL,SAAS;EAET;;EAEA;EACA,kBAAkB,EAClB,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,SAAS,EACT,UAAU,EACV,OAAO,EACP,WAAW;EAEX;EACA,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc;EAEd;EACA,UAAU;EAEV;EACA,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,YAAY,EACZ,MAAM;AAEV,CAAC,CACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaJ,eAAe;AAAAK,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var _checkParamNames = _interopRequireDefault(require("./rules/checkParamNames.c
|
|
|
13
13
|
var _checkPropertyNames = _interopRequireDefault(require("./rules/checkPropertyNames.cjs"));
|
|
14
14
|
var _checkSyntax = _interopRequireDefault(require("./rules/checkSyntax.cjs"));
|
|
15
15
|
var _checkTagNames = _interopRequireDefault(require("./rules/checkTagNames.cjs"));
|
|
16
|
+
var _checkTemplateNames = _interopRequireDefault(require("./rules/checkTemplateNames.cjs"));
|
|
16
17
|
var _checkTypes = _interopRequireDefault(require("./rules/checkTypes.cjs"));
|
|
17
18
|
var _checkValues = _interopRequireDefault(require("./rules/checkValues.cjs"));
|
|
18
19
|
var _convertToJsdocComments = _interopRequireDefault(require("./rules/convertToJsdocComments.cjs"));
|
|
@@ -87,6 +88,7 @@ const index = {
|
|
|
87
88
|
'check-property-names': _checkPropertyNames.default,
|
|
88
89
|
'check-syntax': _checkSyntax.default,
|
|
89
90
|
'check-tag-names': _checkTagNames.default,
|
|
91
|
+
'check-template-names': _checkTemplateNames.default,
|
|
90
92
|
'check-types': _checkTypes.default,
|
|
91
93
|
'check-values': _checkValues.default,
|
|
92
94
|
'convert-to-jsdoc-comments': _convertToJsdocComments.default,
|
|
@@ -160,6 +162,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
160
162
|
'jsdoc/check-property-names': warnOrError,
|
|
161
163
|
'jsdoc/check-syntax': 'off',
|
|
162
164
|
'jsdoc/check-tag-names': warnOrError,
|
|
165
|
+
'jsdoc/check-template-names': 'off',
|
|
163
166
|
'jsdoc/check-types': warnOrError,
|
|
164
167
|
'jsdoc/check-values': warnOrError,
|
|
165
168
|
'jsdoc/convert-to-jsdoc-comments': 'off',
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_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","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","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","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","Error","recommended","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport validTypes from './rules/validTypes.js';\n\n/**\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * \"recommended\"|\"recommended-error\"|\"recommended-typescript\"|\n * \"recommended-typescript-error\"|\"recommended-typescript-flavor\"|\n * \"recommended-typescript-flavor-error\"|\"flat/recommended\"|\n * \"flat/recommended-error\"|\"flat/recommended-typescript\"|\n * \"flat/recommended-typescript-error\"|\n * \"flat/recommended-typescript-flavor\"|\n * \"flat/recommended-typescript-flavor-error\",\n * import('eslint').Linter.FlatConfig\n * >\n * }}\n */\nconst index = {\n // @ts-expect-error Ok\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 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\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-template': requireTemplate,\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {name: 'jsdoc/' + flatName} : {}),\n // @ts-expect-error Ok\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\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-template': 'off',\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\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/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', 'flat/recommended-typescript-flavor-error');\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,C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wC,CAAC,MAAM,CAAC;AACjGnE,KAAK,CAACC,OAAO,CAAC,qCAAqC,CAAC,GAAGkE,wCAAwC,CAAC,OAAO,CAAC;AAExGnE,KAAK,CAACC,OAAO,CAAC,kBAAkB,CAAC,GAAGyD,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,CAAC;AACxF1D,KAAK,CAACC,OAAO,CAAC,wBAAwB,CAAC,GAAGyD,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,CAAC;AACrG1D,KAAK,CAACC,OAAO,CAAC,6BAA6B,CAAC,GAAG+D,kCAAkC,CAAC,MAAM,EAAE,6BAA6B,CAAC;AACxHhE,KAAK,CAACC,OAAO,CAAC,mCAAmC,CAAC,GAAG+D,kCAAkC,CAAC,OAAO,EAAE,mCAAmC,CAAC;AACrIhE,KAAK,CAACC,OAAO,CAAC,oCAAoC,CAAC,GAAGkE,wCAAwC,CAAC,MAAM,EAAE,oCAAoC,CAAC;AAC5InE,KAAK,CAACC,OAAO,CAAC,0CAA0C,CAAC,GAAGkE,wCAAwC,CAAC,OAAO,EAAE,0CAA0C,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAxE,OAAA,GAE3IC,KAAK;AAAAwE,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAxE,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_checkAccess","_interopRequireDefault","require","_checkAlignment","_checkExamples","_checkIndentation","_checkLineAlignment","_checkParamNames","_checkPropertyNames","_checkSyntax","_checkTagNames","_checkTemplateNames","_checkTypes","_checkValues","_convertToJsdocComments","_emptyTags","_implementsOnClasses","_importsAsDependencies","_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","_requireTemplate","_requireThrows","_requireYields","_requireYieldsCheck","_sortTags","_tagLines","_textEscaping","_validTypes","e","__esModule","default","index","configs","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTemplateNames","checkTypes","checkValues","convertToJsdocComments","emptyTags","implementsOnClasses","importsAsDependencies","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","requireTemplate","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","textEscaping","validTypes","createRecommendedRuleset","warnOrError","flatName","name","plugins","jsdoc","createRecommendedTypeScriptRuleset","ruleset","typed","createRecommendedTypeScriptFlavorRuleset","Error","recommended","_default","exports","module"],"sources":["../src/index.js"],"sourcesContent":["import checkAccess from './rules/checkAccess.js';\nimport checkAlignment from './rules/checkAlignment.js';\nimport checkExamples from './rules/checkExamples.js';\nimport checkIndentation from './rules/checkIndentation.js';\nimport checkLineAlignment from './rules/checkLineAlignment.js';\nimport checkParamNames from './rules/checkParamNames.js';\nimport checkPropertyNames from './rules/checkPropertyNames.js';\nimport checkSyntax from './rules/checkSyntax.js';\nimport checkTagNames from './rules/checkTagNames.js';\nimport checkTemplateNames from './rules/checkTemplateNames.js';\nimport checkTypes from './rules/checkTypes.js';\nimport checkValues from './rules/checkValues.js';\nimport convertToJsdocComments from './rules/convertToJsdocComments.js';\nimport emptyTags from './rules/emptyTags.js';\nimport implementsOnClasses from './rules/implementsOnClasses.js';\nimport importsAsDependencies from './rules/importsAsDependencies.js';\nimport informativeDocs from './rules/informativeDocs.js';\nimport matchDescription from './rules/matchDescription.js';\nimport matchName from './rules/matchName.js';\nimport multilineBlocks from './rules/multilineBlocks.js';\nimport noBadBlocks from './rules/noBadBlocks.js';\nimport noBlankBlockDescriptions from './rules/noBlankBlockDescriptions.js';\nimport noBlankBlocks from './rules/noBlankBlocks.js';\nimport noDefaults from './rules/noDefaults.js';\nimport noMissingSyntax from './rules/noMissingSyntax.js';\nimport noMultiAsterisks from './rules/noMultiAsterisks.js';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax.js';\nimport noTypes from './rules/noTypes.js';\nimport noUndefinedTypes from './rules/noUndefinedTypes.js';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix.js';\nimport requireDescription from './rules/requireDescription.js';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence.js';\nimport requireExample from './rules/requireExample.js';\nimport requireFileOverview from './rules/requireFileOverview.js';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription.js';\nimport requireJsdoc from './rules/requireJsdoc.js';\nimport requireParam from './rules/requireParam.js';\nimport requireParamDescription from './rules/requireParamDescription.js';\nimport requireParamName from './rules/requireParamName.js';\nimport requireParamType from './rules/requireParamType.js';\nimport requireProperty from './rules/requireProperty.js';\nimport requirePropertyDescription from './rules/requirePropertyDescription.js';\nimport requirePropertyName from './rules/requirePropertyName.js';\nimport requirePropertyType from './rules/requirePropertyType.js';\nimport requireReturns from './rules/requireReturns.js';\nimport requireReturnsCheck from './rules/requireReturnsCheck.js';\nimport requireReturnsDescription from './rules/requireReturnsDescription.js';\nimport requireReturnsType from './rules/requireReturnsType.js';\nimport requireTemplate from './rules/requireTemplate.js';\nimport requireThrows from './rules/requireThrows.js';\nimport requireYields from './rules/requireYields.js';\nimport requireYieldsCheck from './rules/requireYieldsCheck.js';\nimport sortTags from './rules/sortTags.js';\nimport tagLines from './rules/tagLines.js';\nimport textEscaping from './rules/textEscaping.js';\nimport validTypes from './rules/validTypes.js';\n\n/**\n * @type {import('eslint').ESLint.Plugin & {\n * configs: Record<\n * \"recommended\"|\"recommended-error\"|\"recommended-typescript\"|\n * \"recommended-typescript-error\"|\"recommended-typescript-flavor\"|\n * \"recommended-typescript-flavor-error\"|\"flat/recommended\"|\n * \"flat/recommended-error\"|\"flat/recommended-typescript\"|\n * \"flat/recommended-typescript-error\"|\n * \"flat/recommended-typescript-flavor\"|\n * \"flat/recommended-typescript-flavor-error\",\n * import('eslint').Linter.FlatConfig\n * >\n * }}\n */\nconst index = {\n // @ts-expect-error Ok\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-template-names': checkTemplateNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'convert-to-jsdoc-comments': convertToJsdocComments,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'imports-as-dependencies': importsAsDependencies,\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-template': requireTemplate,\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedRuleset = (warnOrError, flatName) => {\n return {\n ...(flatName ? {name: 'jsdoc/' + flatName} : {}),\n // @ts-expect-error Ok\n plugins:\n flatName ? {\n jsdoc: index,\n } : [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': warnOrError,\n 'jsdoc/check-alignment': warnOrError,\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': warnOrError,\n 'jsdoc/check-property-names': warnOrError,\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': warnOrError,\n 'jsdoc/check-template-names': 'off',\n 'jsdoc/check-types': warnOrError,\n 'jsdoc/check-values': warnOrError,\n 'jsdoc/convert-to-jsdoc-comments': 'off',\n 'jsdoc/empty-tags': warnOrError,\n 'jsdoc/implements-on-classes': warnOrError,\n 'jsdoc/imports-as-dependencies': 'off',\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-template': 'off',\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedTypeScriptRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\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 * @param {string} [flatName]\n * @returns {import('eslint').Linter.FlatConfig}\n */\nconst createRecommendedTypeScriptFlavorRuleset = (warnOrError, flatName) => {\n const ruleset = createRecommendedRuleset(warnOrError, flatName);\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/* c8 ignore next 3 -- TS */\nif (!index.configs) {\n throw new Error('TypeScript guard');\n}\n\nindex.configs.recommended = createRecommendedRuleset('warn');\nindex.configs['recommended-error'] = createRecommendedRuleset('error');\nindex.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');\nindex.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');\nindex.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');\nindex.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');\n\nindex.configs['flat/recommended'] = createRecommendedRuleset('warn', 'flat/recommended');\nindex.configs['flat/recommended-error'] = createRecommendedRuleset('error', 'flat/recommended-error');\nindex.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRuleset('warn', 'flat/recommended-typescript');\nindex.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', 'flat/recommended-typescript-error');\nindex.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', 'flat/recommended-typescript-flavor');\nindex.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('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 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AAyDA;;;;;;;;;;;;;GAaG;AACH,qBAbU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG;IAC1C,OAAW,EAAE,MAAM,CACnB,aAAmB,GAAC,mBAAmB,GAAC,wBAAwB,GAChE,8BAAsC,GAAC,+BAA+B,GACtE,qCAA6C,GAAC,kBAAkB,GAChE,wBAAgC,GAAC,6BAA6B,GAC9D,mCAA2C,GAC3C,oCAA4C,GAC5C,0CAAkD,EAClD,OAAa,QAAQ,EAAE,MAAM,CAAC,UAAU,CACnC,CAAA;CACF,CA+DF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _jsdoccomment = require("@es-joy/jsdoccomment");
|
|
8
|
+
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.cjs"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
var _default = exports.default = (0, _iterateJsdoc.default)(({
|
|
11
|
+
context,
|
|
12
|
+
utils,
|
|
13
|
+
node,
|
|
14
|
+
settings,
|
|
15
|
+
report
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
mode
|
|
19
|
+
} = settings;
|
|
20
|
+
const templateTags = utils.getTags('template');
|
|
21
|
+
const usedNames = new Set();
|
|
22
|
+
/**
|
|
23
|
+
* @param {import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration
|
|
24
|
+
*/
|
|
25
|
+
const checkParameters = aliasDeclaration => {
|
|
26
|
+
/* c8 ignore next -- Guard */
|
|
27
|
+
const {
|
|
28
|
+
params
|
|
29
|
+
} = aliasDeclaration.typeParameters ?? {
|
|
30
|
+
params: []
|
|
31
|
+
};
|
|
32
|
+
for (const {
|
|
33
|
+
name: {
|
|
34
|
+
name
|
|
35
|
+
}
|
|
36
|
+
} of params) {
|
|
37
|
+
usedNames.add(name);
|
|
38
|
+
}
|
|
39
|
+
for (const tag of templateTags) {
|
|
40
|
+
const {
|
|
41
|
+
name
|
|
42
|
+
} = tag;
|
|
43
|
+
const names = name.split(/,\s*/);
|
|
44
|
+
for (const name of names) {
|
|
45
|
+
if (!usedNames.has(name)) {
|
|
46
|
+
report(`@template ${name} not in use`, null, tag);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const handleTypeAliases = () => {
|
|
52
|
+
var _nde$declaration;
|
|
53
|
+
const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */
|
|
54
|
+
node;
|
|
55
|
+
if (!nde) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
switch (nde.type) {
|
|
59
|
+
case 'ExportNamedDeclaration':
|
|
60
|
+
if (((_nde$declaration = nde.declaration) === null || _nde$declaration === void 0 ? void 0 : _nde$declaration.type) === 'TSTypeAliasDeclaration') {
|
|
61
|
+
checkParameters(nde.declaration);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case 'TSTypeAliasDeclaration':
|
|
65
|
+
checkParameters(nde);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const typedefTags = utils.getTags('typedef');
|
|
70
|
+
if (!typedefTags.length || typedefTags.length >= 2) {
|
|
71
|
+
handleTypeAliases();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const potentialType = typedefTags[0].type;
|
|
75
|
+
const parsedType = mode === 'permissive' ? (0, _jsdoccomment.tryParse)( /** @type {string} */potentialType) : (0, _jsdoccomment.parse)( /** @type {string} */potentialType, mode);
|
|
76
|
+
(0, _jsdoccomment.traverse)(parsedType, nde => {
|
|
77
|
+
const {
|
|
78
|
+
type,
|
|
79
|
+
value
|
|
80
|
+
} = /** @type {import('jsdoc-type-pratt-parser').NameResult} */nde;
|
|
81
|
+
if (type === 'JsdocTypeName' && /^[A-Z]$/.test(value)) {
|
|
82
|
+
usedNames.add(value);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
for (const tag of templateTags) {
|
|
86
|
+
const {
|
|
87
|
+
name
|
|
88
|
+
} = tag;
|
|
89
|
+
const names = name.split(/,\s*/);
|
|
90
|
+
for (const name of names) {
|
|
91
|
+
if (!usedNames.has(name)) {
|
|
92
|
+
report(`@template ${name} not in use`, null, tag);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
iterateAllJsdocs: true,
|
|
98
|
+
meta: {
|
|
99
|
+
docs: {
|
|
100
|
+
description: 'Checks that any `@template` names are actually used in the connected `@typedef` or type alias.',
|
|
101
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header'
|
|
102
|
+
},
|
|
103
|
+
schema: [],
|
|
104
|
+
type: 'suggestion'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
module.exports = exports.default;
|
|
108
|
+
//# sourceMappingURL=checkTemplateNames.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkTemplateNames.cjs","names":["_jsdoccomment","require","_iterateJsdoc","_interopRequireDefault","e","__esModule","default","_default","exports","iterateJsdoc","context","utils","node","settings","report","mode","templateTags","getTags","usedNames","Set","checkParameters","aliasDeclaration","params","typeParameters","name","add","tag","names","split","has","handleTypeAliases","_nde$declaration","nde","type","declaration","typedefTags","length","potentialType","parsedType","tryParseType","parseType","traverse","value","test","iterateAllJsdocs","meta","docs","description","url","schema","module"],"sources":["../../src/rules/checkTemplateNames.js"],"sourcesContent":["import {\n parse as parseType,\n traverse,\n tryParse as tryParseType,\n} from '@es-joy/jsdoccomment';\nimport iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n utils,\n node,\n settings,\n report,\n}) => {\n const {\n mode\n } = settings;\n\n const templateTags = utils.getTags('template');\n\n const usedNames = new Set();\n /**\n * @param {import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration\n */\n const checkParameters = (aliasDeclaration) => {\n /* c8 ignore next -- Guard */\n const {params} = aliasDeclaration.typeParameters ?? {params: []};\n for (const {name: {name}} of params) {\n usedNames.add(name);\n }\n for (const tag of templateTags) {\n const {name} = tag;\n const names = name.split(/,\\s*/);\n for (const name of names) {\n if (!usedNames.has(name)) {\n report(`@template ${name} not in use`, null, tag);\n }\n }\n }\n };\n\n const handleTypeAliases = () => {\n const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node\n );\n if (!nde) {\n return;\n }\n switch (nde.type) {\n case 'ExportNamedDeclaration':\n if (nde.declaration?.type === 'TSTypeAliasDeclaration') {\n checkParameters(nde.declaration);\n }\n break;\n case 'TSTypeAliasDeclaration':\n checkParameters(nde);\n break;\n }\n };\n\n const typedefTags = utils.getTags('typedef');\n if (!typedefTags.length || typedefTags.length >= 2) {\n handleTypeAliases();\n return;\n }\n\n const potentialType = typedefTags[0].type;\n const parsedType = mode === 'permissive' ?\n tryParseType(/** @type {string} */ (potentialType)) :\n parseType(/** @type {string} */ (potentialType), mode)\n\n traverse(parsedType, (nde) => {\n const {\n type,\n value,\n } = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);\n if (type === 'JsdocTypeName' && (/^[A-Z]$/).test(value)) {\n usedNames.add(value);\n }\n });\n\n for (const tag of templateTags) {\n const {name} = tag;\n const names = name.split(/,\\s*/);\n for (const name of names) {\n if (!usedNames.has(name)) {\n report(`@template ${name} not in use`, null, tag);\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Checks that any `@template` names are actually used in the connected `@typedef` or type alias.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header',\n },\n schema: [],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8C,SAAAE,uBAAAC,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,KAAK;EACLC,IAAI;EACJC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,MAAM;IACJC;EACF,CAAC,GAAGF,QAAQ;EAEZ,MAAMG,YAAY,GAAGL,KAAK,CAACM,OAAO,CAAC,UAAU,CAAC;EAE9C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC3B;AACF;AACA;EACE,MAAMC,eAAe,GAAIC,gBAAgB,IAAK;IAC5C;IACA,MAAM;MAACC;IAAM,CAAC,GAAGD,gBAAgB,CAACE,cAAc,IAAI;MAACD,MAAM,EAAE;IAAE,CAAC;IAChE,KAAK,MAAM;MAACE,IAAI,EAAE;QAACA;MAAI;IAAC,CAAC,IAAIF,MAAM,EAAE;MACnCJ,SAAS,CAACO,GAAG,CAACD,IAAI,CAAC;IACrB;IACA,KAAK,MAAME,GAAG,IAAIV,YAAY,EAAE;MAC9B,MAAM;QAACQ;MAAI,CAAC,GAAGE,GAAG;MAClB,MAAMC,KAAK,GAAGH,IAAI,CAACI,KAAK,CAAC,MAAM,CAAC;MAChC,KAAK,MAAMJ,IAAI,IAAIG,KAAK,EAAE;QACxB,IAAI,CAACT,SAAS,CAACW,GAAG,CAACL,IAAI,CAAC,EAAE;UACxBV,MAAM,CAAC,aAAaU,IAAI,aAAa,EAAE,IAAI,E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E,GAAG;IAClB,MAAMC,KAAK,GAAGH,IAAI,CAACI,KAAK,CAAC,MAAM,CAAC;IAChC,KAAK,MAAMJ,IAAI,IAAIG,KAAK,EAAE;MACxB,IAAI,CAACT,SAAS,CAACW,GAAG,CAACL,IAAI,CAAC,EAAE;QACxBV,MAAM,CAAC,aAAaU,IAAI,aAAa,EAAE,IAAI,EAAEE,GAAG,CAAC;MACnD;IACF;EACF;AACF,CAAC,EAAE;EACDkB,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,gGAAgG;MAC7GC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,EAAE;IACVhB,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAiB,MAAA,CAAA1C,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
"escape-string-regexp": "^4.0.0",
|
|
13
13
|
"esquery": "^1.6.0",
|
|
14
14
|
"parse-imports": "^2.1.1",
|
|
15
|
-
"semver": "^7.6.
|
|
15
|
+
"semver": "^7.6.3",
|
|
16
16
|
"spdx-expression-parse": "^4.0.0",
|
|
17
|
-
"synckit": "^0.9.
|
|
17
|
+
"synckit": "^0.9.1"
|
|
18
18
|
},
|
|
19
19
|
"description": "JSDoc linting rules for ESLint.",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@babel/cli": "^7.24.
|
|
22
|
-
"@babel/core": "^7.24.
|
|
23
|
-
"@babel/eslint-parser": "^7.24.
|
|
24
|
-
"@babel/node": "^7.24.
|
|
21
|
+
"@babel/cli": "^7.24.8",
|
|
22
|
+
"@babel/core": "^7.24.9",
|
|
23
|
+
"@babel/eslint-parser": "^7.24.8",
|
|
24
|
+
"@babel/node": "^7.24.8",
|
|
25
25
|
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
|
26
26
|
"@babel/plugin-transform-flow-strip-types": "^7.24.7",
|
|
27
|
-
"@babel/preset-env": "^7.24.
|
|
27
|
+
"@babel/preset-env": "^7.24.8",
|
|
28
28
|
"@es-joy/escodegen": "^3.5.1",
|
|
29
29
|
"@es-joy/jsdoc-eslint-parser": "^0.21.1",
|
|
30
30
|
"@hkdobrev/run-if-changed": "^0.3.1",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@types/json-schema": "^7.0.15",
|
|
40
40
|
"@types/lodash.defaultsdeep": "^4.6.9",
|
|
41
41
|
"@types/mocha": "^10.0.7",
|
|
42
|
-
"@types/node": "^20.14.
|
|
42
|
+
"@types/node": "^20.14.11",
|
|
43
43
|
"@types/semver": "^7.5.8",
|
|
44
44
|
"@types/spdx-expression-parse": "^3.0.5",
|
|
45
|
-
"@typescript-eslint/types": "^7.16.
|
|
45
|
+
"@typescript-eslint/types": "^7.16.1",
|
|
46
46
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
47
47
|
"babel-plugin-istanbul": "^7.0.0",
|
|
48
48
|
"babel-plugin-transform-import-meta": "^2.2.1",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"chai": "^5.1.1",
|
|
52
52
|
"cross-env": "^7.0.3",
|
|
53
53
|
"decamelize": "^6.0.0",
|
|
54
|
-
"eslint": "9.
|
|
55
|
-
"eslint-config-canonical": "~43.0.
|
|
54
|
+
"eslint": "9.7.0",
|
|
55
|
+
"eslint-config-canonical": "~43.0.14",
|
|
56
56
|
"espree": "^10.1.0",
|
|
57
|
-
"gitdown": "^4.
|
|
57
|
+
"gitdown": "^4.1.1",
|
|
58
58
|
"glob": "^10.4.2",
|
|
59
59
|
"globals": "^15.8.0",
|
|
60
|
-
"husky": "^9.
|
|
60
|
+
"husky": "^9.1.1",
|
|
61
61
|
"jsdoc-type-pratt-parser": "^4.0.0",
|
|
62
62
|
"json-schema": "^0.4.0",
|
|
63
63
|
"lint-staged": "^15.2.7",
|
|
64
64
|
"lodash.defaultsdeep": "^4.6.1",
|
|
65
65
|
"mocha": "^10.6.0",
|
|
66
|
-
"open-editor": "^
|
|
66
|
+
"open-editor": "^5.0.0",
|
|
67
67
|
"replace": "^1.2.2",
|
|
68
68
|
"rimraf": "^5.0.7",
|
|
69
69
|
"semantic-release": "^24.0.0",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"test-cov": "cross-env TIMING=1 c8 --reporter text npm run test-no-cov",
|
|
145
145
|
"test-index": "npm run test-no-cov -- test/rules/index.js"
|
|
146
146
|
},
|
|
147
|
-
"version": "48.
|
|
147
|
+
"version": "48.8.1"
|
|
148
148
|
}
|
package/src/defaultTagOrder.js
CHANGED
package/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import checkParamNames from './rules/checkParamNames.js';
|
|
|
7
7
|
import checkPropertyNames from './rules/checkPropertyNames.js';
|
|
8
8
|
import checkSyntax from './rules/checkSyntax.js';
|
|
9
9
|
import checkTagNames from './rules/checkTagNames.js';
|
|
10
|
+
import checkTemplateNames from './rules/checkTemplateNames.js';
|
|
10
11
|
import checkTypes from './rules/checkTypes.js';
|
|
11
12
|
import checkValues from './rules/checkValues.js';
|
|
12
13
|
import convertToJsdocComments from './rules/convertToJsdocComments.js';
|
|
@@ -81,6 +82,7 @@ const index = {
|
|
|
81
82
|
'check-property-names': checkPropertyNames,
|
|
82
83
|
'check-syntax': checkSyntax,
|
|
83
84
|
'check-tag-names': checkTagNames,
|
|
85
|
+
'check-template-names': checkTemplateNames,
|
|
84
86
|
'check-types': checkTypes,
|
|
85
87
|
'check-values': checkValues,
|
|
86
88
|
'convert-to-jsdoc-comments': convertToJsdocComments,
|
|
@@ -155,6 +157,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
155
157
|
'jsdoc/check-property-names': warnOrError,
|
|
156
158
|
'jsdoc/check-syntax': 'off',
|
|
157
159
|
'jsdoc/check-tag-names': warnOrError,
|
|
160
|
+
'jsdoc/check-template-names': 'off',
|
|
158
161
|
'jsdoc/check-types': warnOrError,
|
|
159
162
|
'jsdoc/check-values': warnOrError,
|
|
160
163
|
'jsdoc/convert-to-jsdoc-comments': 'off',
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parse as parseType,
|
|
3
|
+
traverse,
|
|
4
|
+
tryParse as tryParseType,
|
|
5
|
+
} from '@es-joy/jsdoccomment';
|
|
6
|
+
import iterateJsdoc from '../iterateJsdoc.js';
|
|
7
|
+
|
|
8
|
+
export default iterateJsdoc(({
|
|
9
|
+
context,
|
|
10
|
+
utils,
|
|
11
|
+
node,
|
|
12
|
+
settings,
|
|
13
|
+
report,
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
mode
|
|
17
|
+
} = settings;
|
|
18
|
+
|
|
19
|
+
const templateTags = utils.getTags('template');
|
|
20
|
+
|
|
21
|
+
const usedNames = new Set();
|
|
22
|
+
/**
|
|
23
|
+
* @param {import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration
|
|
24
|
+
*/
|
|
25
|
+
const checkParameters = (aliasDeclaration) => {
|
|
26
|
+
/* c8 ignore next -- Guard */
|
|
27
|
+
const {params} = aliasDeclaration.typeParameters ?? {params: []};
|
|
28
|
+
for (const {name: {name}} of params) {
|
|
29
|
+
usedNames.add(name);
|
|
30
|
+
}
|
|
31
|
+
for (const tag of templateTags) {
|
|
32
|
+
const {name} = tag;
|
|
33
|
+
const names = name.split(/,\s*/);
|
|
34
|
+
for (const name of names) {
|
|
35
|
+
if (!usedNames.has(name)) {
|
|
36
|
+
report(`@template ${name} not in use`, null, tag);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const handleTypeAliases = () => {
|
|
43
|
+
const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (
|
|
44
|
+
node
|
|
45
|
+
);
|
|
46
|
+
if (!nde) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
switch (nde.type) {
|
|
50
|
+
case 'ExportNamedDeclaration':
|
|
51
|
+
if (nde.declaration?.type === 'TSTypeAliasDeclaration') {
|
|
52
|
+
checkParameters(nde.declaration);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
case 'TSTypeAliasDeclaration':
|
|
56
|
+
checkParameters(nde);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const typedefTags = utils.getTags('typedef');
|
|
62
|
+
if (!typedefTags.length || typedefTags.length >= 2) {
|
|
63
|
+
handleTypeAliases();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const potentialType = typedefTags[0].type;
|
|
68
|
+
const parsedType = mode === 'permissive' ?
|
|
69
|
+
tryParseType(/** @type {string} */ (potentialType)) :
|
|
70
|
+
parseType(/** @type {string} */ (potentialType), mode)
|
|
71
|
+
|
|
72
|
+
traverse(parsedType, (nde) => {
|
|
73
|
+
const {
|
|
74
|
+
type,
|
|
75
|
+
value,
|
|
76
|
+
} = /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (nde);
|
|
77
|
+
if (type === 'JsdocTypeName' && (/^[A-Z]$/).test(value)) {
|
|
78
|
+
usedNames.add(value);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
for (const tag of templateTags) {
|
|
83
|
+
const {name} = tag;
|
|
84
|
+
const names = name.split(/,\s*/);
|
|
85
|
+
for (const name of names) {
|
|
86
|
+
if (!usedNames.has(name)) {
|
|
87
|
+
report(`@template ${name} not in use`, null, tag);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
iterateAllJsdocs: true,
|
|
93
|
+
meta: {
|
|
94
|
+
docs: {
|
|
95
|
+
description: 'Checks that any `@template` names are actually used in the connected `@typedef` or type alias.',
|
|
96
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header',
|
|
97
|
+
},
|
|
98
|
+
schema: [],
|
|
99
|
+
type: 'suggestion',
|
|
100
|
+
},
|
|
101
|
+
});
|