eslint-plugin-jsdoc 38.0.6 → 38.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 +49 -16
- package/dist/defaultTagOrder.js +2 -1
- package/dist/defaultTagOrder.js.map +1 -1
- package/dist/getDefaultTagStructureForMode.js +3 -1
- package/dist/getDefaultTagStructureForMode.js.map +1 -1
- package/dist/iterateJsdoc.js +4 -4
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/rules/checkTypes.js +166 -100
- package/dist/rules/checkTypes.js.map +1 -1
- package/dist/tagNames.js +3 -0
- package/dist/tagNames.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4471,10 +4471,11 @@ function quux (foo) {}
|
|
|
4471
4471
|
* @variation
|
|
4472
4472
|
* @version
|
|
4473
4473
|
* @yields
|
|
4474
|
+
* @internal
|
|
4474
4475
|
* @template
|
|
4475
4476
|
*/
|
|
4476
4477
|
function quux (foo) {}
|
|
4477
|
-
// Message: Invalid JSDoc tag name "
|
|
4478
|
+
// Message: Invalid JSDoc tag name "internal".
|
|
4478
4479
|
|
|
4479
4480
|
/**
|
|
4480
4481
|
* @externs
|
|
@@ -4702,6 +4703,7 @@ function quux (foo) {}
|
|
|
4702
4703
|
* @variation
|
|
4703
4704
|
* @version
|
|
4704
4705
|
* @yields
|
|
4706
|
+
* @internal
|
|
4705
4707
|
* @template
|
|
4706
4708
|
*/
|
|
4707
4709
|
function quux (foo) {}
|
|
@@ -4765,6 +4767,11 @@ export function transient<T>(target?: T): T {
|
|
|
4765
4767
|
/** @jsxImportSource preact */
|
|
4766
4768
|
/** @jsxRuntime automatic */
|
|
4767
4769
|
// "jsdoc/check-tag-names": ["error"|"warn", {"jsxTags":true}]
|
|
4770
|
+
|
|
4771
|
+
/**
|
|
4772
|
+
* @internal
|
|
4773
|
+
*/
|
|
4774
|
+
// Settings: {"jsdoc":{"mode":"typescript"}}
|
|
4768
4775
|
````
|
|
4769
4776
|
|
|
4770
4777
|
|
|
@@ -4883,11 +4890,12 @@ as a lone type. However, one additional complexity is that TypeScript allows and
|
|
|
4883
4890
|
actually [currently requires](https://github.com/microsoft/TypeScript/issues/20555)
|
|
4884
4891
|
`Object` (with the initial upper-case) if used in the syntax
|
|
4885
4892
|
`Object.<keyType, valueType>` or `Object<keyType, valueType`, perhaps to
|
|
4886
|
-
adhere to
|
|
4893
|
+
adhere to that which [JSDoc documents](https://jsdoc.app/tags-type.html).
|
|
4887
4894
|
|
|
4888
4895
|
So, for optimal compatibility with TypeScript (especially since TypeScript
|
|
4889
|
-
tools can be used on plain JavaScript with JSDoc), we are now
|
|
4890
|
-
TypeScript approach by default
|
|
4896
|
+
tools can be used on plain JavaScript with JSDoc), we are now requiring this
|
|
4897
|
+
TypeScript approach by default (if you set `object` type `preferredTypes` in
|
|
4898
|
+
TypeScript mode, the defaults will not apply).
|
|
4891
4899
|
|
|
4892
4900
|
Basically, for primitives, we want to define the type as a primitive, because
|
|
4893
4901
|
that's what we use in 99.9% of cases. For everything else, we use the type
|
|
@@ -5491,7 +5499,7 @@ function quux (foo) {
|
|
|
5491
5499
|
function a () {}
|
|
5492
5500
|
|
|
5493
5501
|
/**
|
|
5494
|
-
* @typedef {Object} foo
|
|
5502
|
+
* @typedef {Object<string>} foo
|
|
5495
5503
|
*/
|
|
5496
5504
|
function b () {}
|
|
5497
5505
|
// Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"object":"Object"}}}
|
|
@@ -5550,6 +5558,24 @@ function quux (foo) {
|
|
|
5550
5558
|
}
|
|
5551
5559
|
// Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"Object":"object","object.<>":"Object<>","Object.<>":"Object<>","object<>":"Object<>"}}}
|
|
5552
5560
|
// Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
|
|
5561
|
+
|
|
5562
|
+
/**
|
|
5563
|
+
* @param {object.<string>} foo
|
|
5564
|
+
*/
|
|
5565
|
+
function quux (foo) {
|
|
5566
|
+
|
|
5567
|
+
}
|
|
5568
|
+
// Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"Object":"object","object.<>":"Object<>","Object.<>":"Object<>","object<>":"Object<>"}}}
|
|
5569
|
+
// Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
|
|
5570
|
+
|
|
5571
|
+
/**
|
|
5572
|
+
* @param {object.<string>} foo
|
|
5573
|
+
*/
|
|
5574
|
+
function quux (foo) {
|
|
5575
|
+
|
|
5576
|
+
}
|
|
5577
|
+
// Settings: {"jsdoc":{"mode":"typescript"}}
|
|
5578
|
+
// Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
|
|
5553
5579
|
````
|
|
5554
5580
|
|
|
5555
5581
|
The following patterns are not considered problems:
|
|
@@ -5810,7 +5836,7 @@ function b () {}
|
|
|
5810
5836
|
function a () {}
|
|
5811
5837
|
|
|
5812
5838
|
/**
|
|
5813
|
-
* @typedef {Object} foo
|
|
5839
|
+
* @typedef {Object<string>} foo
|
|
5814
5840
|
*/
|
|
5815
5841
|
function b () {}
|
|
5816
5842
|
// Settings: {"jsdoc":{"mode":"typescript"}}
|
|
@@ -5839,7 +5865,7 @@ function quux (foo) {
|
|
|
5839
5865
|
}
|
|
5840
5866
|
|
|
5841
5867
|
/**
|
|
5842
|
-
* @param {Object
|
|
5868
|
+
* @param {Object<string>} foo
|
|
5843
5869
|
*/
|
|
5844
5870
|
function quux (foo) {
|
|
5845
5871
|
|
|
@@ -18785,6 +18811,13 @@ export const sleep = (ms: number) => {
|
|
|
18785
18811
|
|
|
18786
18812
|
Requires that throw statements are documented.
|
|
18787
18813
|
|
|
18814
|
+
Note that since throw statements within async functions end up as rejected
|
|
18815
|
+
Promises, they are not considered as throw statements for the purposes of this
|
|
18816
|
+
rule. See [issue 755](https://github.com/gajus/eslint-plugin-jsdoc/issues/755)
|
|
18817
|
+
for our desire for a separate tag to document rejection types and see
|
|
18818
|
+
[this discussion](https://stackoverflow.com/questions/50071115/typescript-promise-rejection-type)
|
|
18819
|
+
on why TypeScript doesn't offer such a feature.
|
|
18820
|
+
|
|
18788
18821
|
<a name="user-content-eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
|
|
18789
18822
|
<a name="eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
|
|
18790
18823
|
#### Options
|
|
@@ -20621,7 +20654,7 @@ The following patterns are considered problems:
|
|
|
20621
20654
|
* @param a
|
|
20622
20655
|
*/
|
|
20623
20656
|
function quux () {}
|
|
20624
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20657
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20625
20658
|
|
|
20626
20659
|
/**
|
|
20627
20660
|
* Some description
|
|
@@ -20630,7 +20663,7 @@ function quux () {}
|
|
|
20630
20663
|
* @param a
|
|
20631
20664
|
*/
|
|
20632
20665
|
function quux () {}
|
|
20633
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20666
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20634
20667
|
|
|
20635
20668
|
/**
|
|
20636
20669
|
* @returns {string}
|
|
@@ -20639,7 +20672,7 @@ function quux () {}
|
|
|
20639
20672
|
* @param a
|
|
20640
20673
|
*/
|
|
20641
20674
|
function quux () {}
|
|
20642
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20675
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20643
20676
|
|
|
20644
20677
|
/**
|
|
20645
20678
|
* Some description
|
|
@@ -20649,7 +20682,7 @@ function quux () {}
|
|
|
20649
20682
|
* @param a
|
|
20650
20683
|
*/
|
|
20651
20684
|
function quux () {}
|
|
20652
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20685
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20653
20686
|
|
|
20654
20687
|
/**
|
|
20655
20688
|
* @param b A long
|
|
@@ -20658,7 +20691,7 @@ function quux () {}
|
|
|
20658
20691
|
* @param a
|
|
20659
20692
|
*/
|
|
20660
20693
|
function quux () {}
|
|
20661
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20694
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20662
20695
|
|
|
20663
20696
|
/**
|
|
20664
20697
|
* @def
|
|
@@ -20667,7 +20700,7 @@ function quux () {}
|
|
|
20667
20700
|
*/
|
|
20668
20701
|
function quux () {}
|
|
20669
20702
|
// "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
|
|
20670
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20703
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20671
20704
|
|
|
20672
20705
|
/**
|
|
20673
20706
|
* @xyz
|
|
@@ -20687,7 +20720,7 @@ function quux () {}
|
|
|
20687
20720
|
* @module
|
|
20688
20721
|
*/
|
|
20689
20722
|
function quux () {}
|
|
20690
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20723
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20691
20724
|
|
|
20692
20725
|
/**
|
|
20693
20726
|
* @xyz
|
|
@@ -20698,7 +20731,7 @@ function quux () {}
|
|
|
20698
20731
|
*/
|
|
20699
20732
|
function quux () {}
|
|
20700
20733
|
// "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
|
|
20701
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20734
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20702
20735
|
|
|
20703
20736
|
/**
|
|
20704
20737
|
* @param b A long
|
|
@@ -20706,7 +20739,7 @@ function quux () {}
|
|
|
20706
20739
|
* @module
|
|
20707
20740
|
*/
|
|
20708
20741
|
function quux () {}
|
|
20709
|
-
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20742
|
+
// Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
|
|
20710
20743
|
````
|
|
20711
20744
|
|
|
20712
20745
|
The following patterns are not considered problems:
|
package/dist/defaultTagOrder.js
CHANGED
|
@@ -10,7 +10,8 @@ const defaultTagOrder = [// Brief descriptions
|
|
|
10
10
|
'typedef', 'interface', 'record', 'template', 'name', 'kind', 'type', 'alias', 'external', 'host', 'callback', 'func', 'function', 'method', 'class', 'constructor', // Relationships
|
|
11
11
|
'modifies', 'mixes', 'mixin', 'mixinClass', 'mixinFunction', 'namespace', 'borrows', 'constructs', 'lends', 'implements', 'requires', // Long descriptions
|
|
12
12
|
'desc', 'description', 'classdesc', 'tutorial', 'copyright', 'license', // Simple annotations
|
|
13
|
-
|
|
13
|
+
// TypeScript
|
|
14
|
+
'internal', 'const', 'constant', 'final', 'global', 'readonly', 'abstract', 'virtual', 'var', 'member', 'memberof', 'memberof!', 'inner', 'instance', 'inheritdoc', 'inheritDoc', 'override', 'hideconstructor', // Core function/object info
|
|
14
15
|
'param', 'arg', 'argument', 'prop', 'property', 'return', 'returns', // Important behavior details
|
|
15
16
|
'async', 'generator', 'default', 'defaultvalue', 'enum', 'augments', 'extends', 'throws', 'exception', 'yield', 'yields', 'event', 'fires', 'emits', 'listens', 'this', // Access
|
|
16
17
|
'static', 'private', 'protected', 'public', 'access', 'package', '-other', // Supplementary descriptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaultTagOrder.js"],"names":["defaultTagOrder"],"mappings":";;;;;;AAAA,MAAMA,eAAe,GAAG,CACtB;AACA,SAFsB,EAGtB,aAHsB,EAKtB;AACA,QANsB,EAOtB,SAPsB,EAQtB,MARsB,EAStB,cATsB,EAUtB,UAVsB,EAYtB;AACA,SAbsB,EActB,WAdsB,EAetB,QAfsB,EAgBtB,UAhBsB,EAiBtB,MAjBsB,EAkBtB,MAlBsB,EAmBtB,MAnBsB,EAoBtB,OApBsB,EAqBtB,UArBsB,EAsBtB,MAtBsB,EAuBtB,UAvBsB,EAwBtB,MAxBsB,EAyBtB,UAzBsB,EA0BtB,QA1BsB,EA2BtB,OA3BsB,EA4BtB,aA5BsB,EA8BtB;AACA,UA/BsB,EAgCtB,OAhCsB,EAiCtB,OAjCsB,EAkCtB,YAlCsB,EAmCtB,eAnCsB,EAoCtB,WApCsB,EAqCtB,SArCsB,EAsCtB,YAtCsB,EAuCtB,OAvCsB,EAwCtB,YAxCsB,EAyCtB,UAzCsB,EA2CtB;AACA,MA5CsB,EA6CtB,aA7CsB,EA8CtB,WA9CsB,EA+CtB,UA/CsB,EAgDtB,WAhDsB,EAiDtB,SAjDsB,EAmDtB;AACA,
|
|
1
|
+
{"version":3,"sources":["../src/defaultTagOrder.js"],"names":["defaultTagOrder"],"mappings":";;;;;;AAAA,MAAMA,eAAe,GAAG,CACtB;AACA,SAFsB,EAGtB,aAHsB,EAKtB;AACA,QANsB,EAOtB,SAPsB,EAQtB,MARsB,EAStB,cATsB,EAUtB,UAVsB,EAYtB;AACA,SAbsB,EActB,WAdsB,EAetB,QAfsB,EAgBtB,UAhBsB,EAiBtB,MAjBsB,EAkBtB,MAlBsB,EAmBtB,MAnBsB,EAoBtB,OApBsB,EAqBtB,UArBsB,EAsBtB,MAtBsB,EAuBtB,UAvBsB,EAwBtB,MAxBsB,EAyBtB,UAzBsB,EA0BtB,QA1BsB,EA2BtB,OA3BsB,EA4BtB,aA5BsB,EA8BtB;AACA,UA/BsB,EAgCtB,OAhCsB,EAiCtB,OAjCsB,EAkCtB,YAlCsB,EAmCtB,eAnCsB,EAoCtB,WApCsB,EAqCtB,SArCsB,EAsCtB,YAtCsB,EAuCtB,OAvCsB,EAwCtB,YAxCsB,EAyCtB,UAzCsB,EA2CtB;AACA,MA5CsB,EA6CtB,aA7CsB,EA8CtB,WA9CsB,EA+CtB,UA/CsB,EAgDtB,WAhDsB,EAiDtB,SAjDsB,EAmDtB;AAEA;AACA,UAtDsB,EAwDtB,OAxDsB,EAyDtB,UAzDsB,EA0DtB,OA1DsB,EA2DtB,QA3DsB,EA4DtB,UA5DsB,EA6DtB,UA7DsB,EA8DtB,SA9DsB,EA+DtB,KA/DsB,EAgEtB,QAhEsB,EAiEtB,UAjEsB,EAkEtB,WAlEsB,EAmEtB,OAnEsB,EAoEtB,UApEsB,EAqEtB,YArEsB,EAsEtB,YAtEsB,EAuEtB,UAvEsB,EAwEtB,iBAxEsB,EA0EtB;AACA,OA3EsB,EA4EtB,KA5EsB,EA6EtB,UA7EsB,EA8EtB,MA9EsB,EA+EtB,UA/EsB,EAgFtB,QAhFsB,EAiFtB,SAjFsB,EAmFtB;AACA,OApFsB,EAqFtB,WArFsB,EAsFtB,SAtFsB,EAuFtB,cAvFsB,EAwFtB,MAxFsB,EAyFtB,UAzFsB,EA0FtB,SA1FsB,EA2FtB,QA3FsB,EA4FtB,WA5FsB,EA6FtB,OA7FsB,EA8FtB,QA9FsB,EA+FtB,OA/FsB,EAgGtB,OAhGsB,EAiGtB,OAjGsB,EAkGtB,SAlGsB,EAmGtB,MAnGsB,EAqGtB;AACA,QAtGsB,EAuGtB,SAvGsB,EAwGtB,WAxGsB,EAyGtB,QAzGsB,EA0GtB,QA1GsB,EA2GtB,SA3GsB,EA6GtB,QA7GsB,EA+GtB;AACA,KAhHsB,EAiHtB,SAjHsB,EAmHtB;AAEA;AACA,kBAtHsB,EAuHtB,eAvHsB,EAwHtB,QAxHsB,EAyHtB,QAzHsB,EA0HtB,aA1HsB,EA2HtB,SA3HsB,EA4HtB,UA5HsB,EA6HtB,OA7HsB,EA8HtB,WA9HsB,EAgItB;AACA,QAjIsB,EAkItB,MAlIsB,EAmItB,QAnIsB,EAoItB,SApIsB,EAqItB,cArIsB,EAsItB,SAtIsB,EAuItB,YAvIsB,EAwItB,WAxIsB,EAyItB,UAzIsB,EA0ItB,eA1IsB,EA2ItB,SA3IsB,EA4ItB,iBA5IsB,EA6ItB,UA7IsB,EA8ItB,QA9IsB,EA+ItB,UA/IsB,EAgJtB,cAhJsB,EAkJtB;AACA,UAnJsB,EAqJtB;AACA,QAtJsB,EAuJtB,QAvJsB,EAwJtB,SAxJsB,EAyJtB,WAzJsB,EA0JtB,OA1JsB,EA2JtB,YA3JsB,EA4JtB,MA5JsB,CAAxB;eA+JeA,e","sourcesContent":["const defaultTagOrder = [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n\n // Identifying (name, type)\n 'typedef',\n 'interface',\n 'record',\n 'template',\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\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 // 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\nexport default defaultTagOrder;\n"],"file":"defaultTagOrder.js"}
|
|
@@ -88,7 +88,9 @@ const getDefaultTagStructureForMode = mode => {
|
|
|
88
88
|
['nameContents', 'namepath-defining'], // See `external`
|
|
89
89
|
['nameRequired', true], ['typeAllowed', false]])], ['interface', new Map([// Allows for "name" in signature, but indicates as optional
|
|
90
90
|
['nameContents', isJsdocTypescriptOrPermissive ? 'namepath-defining' : false], // Not in use, but should be this value if using to power `empty-tags`
|
|
91
|
-
['nameAllowed', isClosure], ['typeAllowed', false]])], ['
|
|
91
|
+
['nameAllowed', isClosure], ['typeAllowed', false]])], ['internal', new Map([// https://www.typescriptlang.org/tsconfig/#stripInternal
|
|
92
|
+
['nameContents', false], // Not in use, but should be this value if using to power `empty-tags`
|
|
93
|
+
['nameAllowed', false]])], ['implements', new Map([// Shows curly brackets in the doc signature and examples
|
|
92
94
|
// "typeExpression"
|
|
93
95
|
['typeRequired', true]])], ['lends', new Map([// Signature seems to require a "namepath" (and no counter-examples)
|
|
94
96
|
['nameContents', 'namepath-referencing'], // "namepath"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/getDefaultTagStructureForMode.js"],"names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map"],"mappings":";;;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAD,IAAU;AAC9C,QAAMC,OAAO,GAAGD,IAAI,KAAK,OAAzB;AACA,QAAME,SAAS,GAAGF,IAAI,KAAK,SAA3B;AACA,QAAMG,YAAY,GAAGH,IAAI,KAAK,YAA9B;AACA,QAAMI,YAAY,GAAGJ,IAAI,KAAK,YAA9B;AAEA,QAAMK,mBAAmB,GAAGJ,OAAO,IAAIG,YAAvC;AACA,QAAME,mBAAmB,GAAGL,OAAO,IAAIE,YAAvC;AACA,QAAMI,qBAAqB,GAAGJ,YAAY,IAAID,SAA9C;AACA,QAAMM,qBAAqB,GAAGN,SAAS,IAAIE,YAA3C;AACA,QAAMK,6BAA6B,GAAGH,mBAAmB,IAAIF,YAA7D,CAV8C,CAY9C;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAO,IAAIM,GAAJ,CAAQ,CACb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CADa,EAeb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb,CACE,cADF,EACkB,mBADlB,CADa,EAKb;AACA,GACE,cADF,EACkB,IADlB,CANa,EAUb;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZa,CAAR,CADT,CAfa,EAkCb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA,GACE,cADF,EACkB,IADlB,CANkB,EAUlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZkB,CAAR,CADd,CAlCa,EAqDb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB;AACA,GACE,aADF,EACiB,IADjB,CAPkB,EAWlB;AACA,GACE,oBADF,EACwB,IADxB,CAZkB,CAAR,CADd,CArDa,EAwEb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,CAAR,CADd,CAvFa,EAuGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf;AACA,GACE,aADF,EACiB,IADjB,CAPe,EAWf,CACE,aADF,EACiB,IADjB,CAXe,CAAR,CADX,CAvGa,EAyHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAzHa,EAqIb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CArIa,EAiJb,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACrB;AACA,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CAjJa,EA8Jb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA,GACE,cADF,EACkB,mBADlB,CAFoB,EAMpB,CACE,cADF,EACkB,KADlB,CANoB,EAUpB,CACE,aADF,EACiB,KADjB,CAVoB,CAAR,CADhB,CA9Ja,EA+Kb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cADF,EACkBR,SADlB,CADgB,CAAR,CADZ,CA/Ka,EAuLb,CACE,OADF,EACW,IAAIQ,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf,CACE,cADF,EACkB,IADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAvLa,EAwMb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,aADF,EACiB,IADjB,CAFc,CAAR,CADV,CAxMa,EAiNb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,IADlB,CAFe,EAMf;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CATe,CAAR,CADX,CAjNa,EAiOb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,aADF,EACiB,IADjB,CAFmB,CAAR,CADf,CAjOa,EA0Ob;AACA,GACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,aADF,EACiBF,qBADjB,CADgB,CAAR,CADZ,CA3Oa,EAmPb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB,CACE,cADF,EACkB,mBADlB,CADiB,EAKjB,CACE,cADF,EACkBT,OADlB,CALiB,EASjB,CACE,aADF,EACiBO,qBADjB,CATiB,CAAR,CADb,CAnPa,EAmQb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB;AACA,GACE,cADF,EACkB,sBADlB,CAFiB,EAMjB;AACA,GACE,aADF,EACiBH,qBAAqB,IAAIH,YAD1C,CAPiB,EAWjB,CACE,cADF,EACkBH,OADlB,CAXiB,EAejB;AACA,GACE,oBADF,EACwBM,qBAAqB,IAAIH,YADjD,CAhBiB,CAAR,CADb,CAnQa,EA0Rb,CACE,UADF,EACc,IAAIM,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,EAalB,CACE,aADF,EACiB,KADjB,CAbkB,CAAR,CADd,CA1Ra,EA8Sb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf,CACE,cADF,EACkB,IADlB,CAPe,EAWf,CACE,aADF,EACiB,KADjB,CAXe,CAAR,CADX,CA9Sa,EAgUb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,KADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CAhUa,EAgVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,cADF,EACkB,mBADlB,CAFc,CAAR,CADV,CAhVa,EAyVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJc,EAQd;AACA,GACE,cADF,EACkB,IADlB,CATc,EAad,CACE,aADF,EACiB,KADjB,CAbc,CAAR,CADV,CAzVa,EA6Wb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EAEED,6BAA6B,GAAG,mBAAH,GAAyB,KAFxD,CAFmB,EAOnB;AACA,GACE,aADF,EACiBP,SADjB,CARmB,EAYnB,CACE,aADF,EACiB,KADjB,CAZmB,CAAR,CADf,CA7Wa,EAgYb,CACE,YADF,EACgB,IAAIQ,GAAJ,CAAQ,CACpB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CAhYa,EA0Yb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CA1Ya,EAwZb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB,CACE,cADF,EACkB,IADlB,CAPiB,EAWjB,CACE,aADF,EACiB,KADjB,CAXiB,CAAR,CADb,CAxZa,EA0ab,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CA1aa,EAwbb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CAxba,EAscb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAtca,EAqdb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CArda,EA6db,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CA7da,EA4eb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,cADF,EACkB,KADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CA5ea,EA6fb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CA7fa,EAwgBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CAxgBa,EAwhBb,CACE,MADF,EACU,IAAIS,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CAxhBa,EA4iBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CA5iBa,EAyjBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAzjBa,EAmkBb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAnkBa,EAylBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAzlBa,EAmmBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAnmBa,EAsnBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CAtnBa,EA0oBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CA1oBa,EAopBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAppBa,EA6pBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,IADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CA7pBa,EA8qBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CA9qBa,EAsrBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAtrBa,EA+rBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb;AACA;AACA,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CA/rBa,EAysBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAzsBa,EAktBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACR,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CAltBa,EA6tBb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBT,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBM,qBAAqB,IAAIH,YAD1C,CARkB,CAAR,CADd,CA7tBa,EA4uBb,CACE,MADF,EACU,IAAIM,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBM,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBN,OADxB,CAZc,CAAR,CADV,CA5uBa,EA+vBb,CACE,QADF,EACY,IAAIS,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA/vBa,EAwwBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,IADlB,CAFkB,EAMlB,CACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CAxwBa,EAqxBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CArxBa,EA+xBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA;AACA;AACA,GACE,cADF,EACkBL,mBADlB,CAViB,EAcjB;AACA;AAEA;AACA,GACE,aADF,EACiB,IADjB,CAlBiB,EAsBjB;AACA;AACA,GACE,oBADF,EACwB,CAACF,YADzB,CAxBiB,CAAR,CADb,CA/xBa,EA8zBb,CACE,KADF,EACS,IAAIO,GAAJ,CAAQ,CACb;AACA,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CA9zBa,EA40Bb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA50Ba,EAo1Bb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CAp1Ba,CAAR,CAAP;AA61BD,CAv4BD;;eAy4BeX,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrPermissive = isJsdoc || isPermissive;\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'requires', new Map([\n // <someModuleName>\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member;\n // also shown as missing in Closure\n // \"namepath\"\n [\n 'nameRequired', isJsdocOrPermissive,\n ],\n\n // Is not `typeRequired` for TypeScript because it gives an error:\n // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member\n // \"namepath\"\n [\n 'typeOrNameRequired', !isTypescript,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
|
|
1
|
+
{"version":3,"sources":["../src/getDefaultTagStructureForMode.js"],"names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map"],"mappings":";;;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAD,IAAU;AAC9C,QAAMC,OAAO,GAAGD,IAAI,KAAK,OAAzB;AACA,QAAME,SAAS,GAAGF,IAAI,KAAK,SAA3B;AACA,QAAMG,YAAY,GAAGH,IAAI,KAAK,YAA9B;AACA,QAAMI,YAAY,GAAGJ,IAAI,KAAK,YAA9B;AAEA,QAAMK,mBAAmB,GAAGJ,OAAO,IAAIG,YAAvC;AACA,QAAME,mBAAmB,GAAGL,OAAO,IAAIE,YAAvC;AACA,QAAMI,qBAAqB,GAAGJ,YAAY,IAAID,SAA9C;AACA,QAAMM,qBAAqB,GAAGN,SAAS,IAAIE,YAA3C;AACA,QAAMK,6BAA6B,GAAGH,mBAAmB,IAAIF,YAA7D,CAV8C,CAY9C;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAO,IAAIM,GAAJ,CAAQ,CACb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CADa,EAeb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb,CACE,cADF,EACkB,mBADlB,CADa,EAKb;AACA,GACE,cADF,EACkB,IADlB,CANa,EAUb;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZa,CAAR,CADT,CAfa,EAkCb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA,GACE,cADF,EACkB,IADlB,CANkB,EAUlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZkB,CAAR,CADd,CAlCa,EAqDb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB;AACA,GACE,aADF,EACiB,IADjB,CAPkB,EAWlB;AACA,GACE,oBADF,EACwB,IADxB,CAZkB,CAAR,CADd,CArDa,EAwEb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,CAAR,CADd,CAvFa,EAuGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf;AACA,GACE,aADF,EACiB,IADjB,CAPe,EAWf,CACE,aADF,EACiB,IADjB,CAXe,CAAR,CADX,CAvGa,EAyHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAzHa,EAqIb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CArIa,EAiJb,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACrB;AACA,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CAjJa,EA8Jb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA,GACE,cADF,EACkB,mBADlB,CAFoB,EAMpB,CACE,cADF,EACkB,KADlB,CANoB,EAUpB,CACE,aADF,EACiB,KADjB,CAVoB,CAAR,CADhB,CA9Ja,EA+Kb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cADF,EACkBR,SADlB,CADgB,CAAR,CADZ,CA/Ka,EAuLb,CACE,OADF,EACW,IAAIQ,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf,CACE,cADF,EACkB,IADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAvLa,EAwMb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,aADF,EACiB,IADjB,CAFc,CAAR,CADV,CAxMa,EAiNb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,IADlB,CAFe,EAMf;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CATe,CAAR,CADX,CAjNa,EAiOb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,aADF,EACiB,IADjB,CAFmB,CAAR,CADf,CAjOa,EA0Ob;AACA,GACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,aADF,EACiBF,qBADjB,CADgB,CAAR,CADZ,CA3Oa,EAmPb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB,CACE,cADF,EACkB,mBADlB,CADiB,EAKjB,CACE,cADF,EACkBT,OADlB,CALiB,EASjB,CACE,aADF,EACiBO,qBADjB,CATiB,CAAR,CADb,CAnPa,EAmQb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB;AACA,GACE,cADF,EACkB,sBADlB,CAFiB,EAMjB;AACA,GACE,aADF,EACiBH,qBAAqB,IAAIH,YAD1C,CAPiB,EAWjB,CACE,cADF,EACkBH,OADlB,CAXiB,EAejB;AACA,GACE,oBADF,EACwBM,qBAAqB,IAAIH,YADjD,CAhBiB,CAAR,CADb,CAnQa,EA0Rb,CACE,UADF,EACc,IAAIM,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,EAalB,CACE,aADF,EACiB,KADjB,CAbkB,CAAR,CADd,CA1Ra,EA8Sb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf,CACE,cADF,EACkB,IADlB,CAPe,EAWf,CACE,aADF,EACiB,KADjB,CAXe,CAAR,CADX,CA9Sa,EAgUb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,KADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CAhUa,EAgVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,cADF,EACkB,mBADlB,CAFc,CAAR,CADV,CAhVa,EAyVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJc,EAQd;AACA,GACE,cADF,EACkB,IADlB,CATc,EAad,CACE,aADF,EACiB,KADjB,CAbc,CAAR,CADV,CAzVa,EA6Wb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EAEED,6BAA6B,GAAG,mBAAH,GAAyB,KAFxD,CAFmB,EAOnB;AACA,GACE,aADF,EACiBP,SADjB,CARmB,EAYnB,CACE,aADF,EACiB,KADjB,CAZmB,CAAR,CADf,CA7Wa,EAgYb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,KADlB,CAFkB,EAKlB;AACA,GACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CAhYa,EA6Yb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CA7Ya,EAuZb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CAvZa,EAqab,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB,CACE,cADF,EACkB,IADlB,CAPiB,EAWjB,CACE,aADF,EACiB,KADjB,CAXiB,CAAR,CADb,CAraa,EAubb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CAvba,EAqcb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CArca,EAmdb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAnda,EAkeb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CAlea,EA0eb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CA1ea,EAyfb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,cADF,EACkB,KADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAzfa,EA0gBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CA1gBa,EAqhBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CArhBa,EAqiBb,CACE,MADF,EACU,IAAIS,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CAriBa,EAyjBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CAzjBa,EAskBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAtkBa,EAglBb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAhlBa,EAsmBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAtmBa,EAgnBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAhnBa,EAmoBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CAnoBa,EAupBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CAvpBa,EAiqBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAjqBa,EA0qBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,IADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CA1qBa,EA2rBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CA3rBa,EAmsBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAnsBa,EA4sBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb;AACA;AACA,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CA5sBa,EAstBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAttBa,EA+tBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACR,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CA/tBa,EA0uBb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBT,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBM,qBAAqB,IAAIH,YAD1C,CARkB,CAAR,CADd,CA1uBa,EAyvBb,CACE,MADF,EACU,IAAIM,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBM,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBN,OADxB,CAZc,CAAR,CADV,CAzvBa,EA4wBb,CACE,QADF,EACY,IAAIS,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA5wBa,EAqxBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,IADlB,CAFkB,EAMlB,CACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CArxBa,EAkyBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CAlyBa,EA4yBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA;AACA;AACA,GACE,cADF,EACkBL,mBADlB,CAViB,EAcjB;AACA;AAEA;AACA,GACE,aADF,EACiB,IADjB,CAlBiB,EAsBjB;AACA;AACA,GACE,oBADF,EACwB,CAACF,YADzB,CAxBiB,CAAR,CADb,CA5yBa,EA20Bb,CACE,KADF,EACS,IAAIO,GAAJ,CAAQ,CACb;AACA,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CA30Ba,EAy1Bb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAz1Ba,EAi2Bb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CAj2Ba,CAAR,CAAP;AA02BD,CAp5BD;;eAs5BeX,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrPermissive = isJsdoc || isPermissive;\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'internal', new Map([\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n [\n 'nameContents', false,\n ],\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'requires', new Map([\n // <someModuleName>\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member;\n // also shown as missing in Closure\n // \"namepath\"\n [\n 'nameRequired', isJsdocOrPermissive,\n ],\n\n // Is not `typeRequired` for TypeScript because it gives an error:\n // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member\n // \"namepath\"\n [\n 'typeOrNameRequired', !isTypescript,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
|
package/dist/iterateJsdoc.js
CHANGED
|
@@ -862,7 +862,7 @@ const getIndentAndJSDoc = function (lines, jsdocNode) {
|
|
|
862
862
|
|
|
863
863
|
|
|
864
864
|
const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
|
|
865
|
-
const trackedJsdocs =
|
|
865
|
+
const trackedJsdocs = new Set();
|
|
866
866
|
let handler;
|
|
867
867
|
let settings;
|
|
868
868
|
|
|
@@ -954,7 +954,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
|
|
|
954
954
|
|
|
955
955
|
const commentNode = (0, _jsdoccomment.getJSDocComment)(sourceCode, node, settings);
|
|
956
956
|
|
|
957
|
-
if (trackedJsdocs.
|
|
957
|
+
if (trackedJsdocs.has(commentNode)) {
|
|
958
958
|
return;
|
|
959
959
|
}
|
|
960
960
|
|
|
@@ -969,14 +969,14 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
|
|
|
969
969
|
return;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
trackedJsdocs.
|
|
972
|
+
trackedJsdocs.add(commentNode);
|
|
973
973
|
callIterator(context, node, [commentNode], state);
|
|
974
974
|
},
|
|
975
975
|
|
|
976
976
|
'Program:exit'() {
|
|
977
977
|
const allComments = sourceCode.getAllComments();
|
|
978
978
|
const untrackedJSdoc = allComments.filter(node => {
|
|
979
|
-
return !trackedJsdocs.
|
|
979
|
+
return !trackedJsdocs.has(node);
|
|
980
980
|
});
|
|
981
981
|
callIterator(context, null, untrackedJSdoc, state, true);
|
|
982
982
|
}
|