eslint-plugin-jsdoc 38.0.5 → 38.0.8

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 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 "template".
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
 
@@ -9576,6 +9583,9 @@ function quux (foo) {
9576
9583
  * @callback
9577
9584
  * @param {number} foo
9578
9585
  */
9586
+
9587
+ /*** Oops that's too many asterisks by accident **/
9588
+ function a () {}
9579
9589
  ````
9580
9590
 
9581
9591
 
@@ -18782,6 +18792,13 @@ export const sleep = (ms: number) => {
18782
18792
 
18783
18793
  Requires that throw statements are documented.
18784
18794
 
18795
+ Note that since throw statements within async functions end up as rejected
18796
+ Promises, they are not considered as throw statements for the purposes of this
18797
+ rule. See [issue 755](https://github.com/gajus/eslint-plugin-jsdoc/issues/755)
18798
+ for our desire for a separate tag to document rejection types and see
18799
+ [this discussion](https://stackoverflow.com/questions/50071115/typescript-promise-rejection-type)
18800
+ on why TypeScript doesn't offer such a feature.
18801
+
18785
18802
  <a name="user-content-eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
18786
18803
  <a name="eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
18787
18804
  #### Options
@@ -20618,7 +20635,7 @@ The following patterns are considered problems:
20618
20635
  * @param a
20619
20636
  */
20620
20637
  function quux () {}
20621
- // 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
20638
+ // 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
20622
20639
 
20623
20640
  /**
20624
20641
  * Some description
@@ -20627,7 +20644,7 @@ function quux () {}
20627
20644
  * @param a
20628
20645
  */
20629
20646
  function quux () {}
20630
- // 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
20647
+ // 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
20631
20648
 
20632
20649
  /**
20633
20650
  * @returns {string}
@@ -20636,7 +20653,7 @@ function quux () {}
20636
20653
  * @param a
20637
20654
  */
20638
20655
  function quux () {}
20639
- // 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
20656
+ // 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
20640
20657
 
20641
20658
  /**
20642
20659
  * Some description
@@ -20646,7 +20663,7 @@ function quux () {}
20646
20663
  * @param a
20647
20664
  */
20648
20665
  function quux () {}
20649
- // 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
20650
20667
 
20651
20668
  /**
20652
20669
  * @param b A long
@@ -20655,7 +20672,7 @@ function quux () {}
20655
20672
  * @param a
20656
20673
  */
20657
20674
  function quux () {}
20658
- // 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
20659
20676
 
20660
20677
  /**
20661
20678
  * @def
@@ -20664,7 +20681,7 @@ function quux () {}
20664
20681
  */
20665
20682
  function quux () {}
20666
20683
  // "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
20667
- // 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
20684
+ // 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
20668
20685
 
20669
20686
  /**
20670
20687
  * @xyz
@@ -20684,7 +20701,7 @@ function quux () {}
20684
20701
  * @module
20685
20702
  */
20686
20703
  function quux () {}
20687
- // 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
20704
+ // 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
20688
20705
 
20689
20706
  /**
20690
20707
  * @xyz
@@ -20695,7 +20712,7 @@ function quux () {}
20695
20712
  */
20696
20713
  function quux () {}
20697
20714
  // "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
20698
- // 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
20715
+ // 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
20699
20716
 
20700
20717
  /**
20701
20718
  * @param b A long
@@ -20703,7 +20720,7 @@ function quux () {}
20703
20720
  * @module
20704
20721
  */
20705
20722
  function quux () {}
20706
- // 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
20707
20724
  ````
20708
20725
 
20709
20726
  The following patterns are not considered problems:
@@ -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
- 'const', 'constant', 'final', 'global', 'readonly', 'abstract', 'virtual', 'var', 'member', 'memberof', 'memberof!', 'inner', 'instance', 'inheritdoc', 'inheritDoc', 'override', 'hideconstructor', // Core function/object info
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,OApDsB,EAqDtB,UArDsB,EAsDtB,OAtDsB,EAuDtB,QAvD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,QAlJsB,EAmJtB,QAnJsB,EAoJtB,SApJsB,EAqJtB,WArJsB,EAsJtB,OAtJsB,EAuJtB,YAvJsB,EAwJtB,MAxJsB,CAAxB;eA2JeA,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 '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"}
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,UAjE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4JtB,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]])], ['implements', new Map([// Shows curly brackets in the doc signature and examples
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,SAD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,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"}
@@ -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.includes(commentNode)) {
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.push(commentNode);
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.includes(node);
979
+ return !trackedJsdocs.has(node);
980
980
  });
981
981
  callIterator(context, null, untrackedJSdoc, state, true);
982
982
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/iterateJsdoc.js"],"names":["rewireSpecs","seedTokens","util","globalState","Map","getBasicUtils","context","tagNamePreference","mode","utils","reportSettings","message","report","loc","start","column","line","parseClosureTemplateTag","tag","jsdocUtils","pathDoesNotBeginWith","getPreferredTagNameObject","tagName","ret","getPreferredTagName","isObject","replacement","blocked","getUtils","node","jsdoc","jsdocNode","settings","iteratingAll","ruleConfig","indent","ancestors","getAncestors","sourceCode","getSourceCode","overrideReplacesDocs","ignoreReplacesDocs","implementsReplacesDocs","augmentsExtendsReplacesDocs","maxLines","minLines","isIteratingFunction","includes","type","isVirtualFunction","hasATag","stringify","tagBlock","specRewire","reportJSDoc","msg","handler","data","fixer","replaceText","getRegexFromString","str","requiredFlags","getTagDescription","tg","descriptions","source","some","tokens","end","lineEnd","postDelimiter","postTag","name","description","desc","slice","push","join","getDescription","lastDescriptionLine","idx","length","changeTag","src","entries","setTag","number","delimiter","removeTag","removeTagItem","tagIndex","tagSourceOffset","tagSource","tags","lastIndex","firstNumber","tagIdx","sourceIndex","findIndex","srcNumber","spliceCount","splice","addTag","targetTagName","getFirstLine","firstLine","emptyTokens","prop","addLine","addLines","numLines","makeLine","makeLines","Array","from","lines","makeMultiline","postName","postType","trimEnd","flattenRoots","params","getFunctionParameterNames","useDefaultObjectProperties","hasParams","isGenerator","generator","value","declaration","isConstructor","getJsdocTagsDeep","skipReportingBlockedTag","allowObjectReturn","defaultMessage","hasTag","getTags","isValidTag","definedTags","names","comparePaths","dropPathSegmentQuotes","avoidDocs","classHasTag","exemptSpeciaMethods","meta","schema","exemptedBy","options","getPresentTags","method","otherModeMaps","result","otherResult","otherModeMap","otherMode","every","getTagStructureForMode","mde","structuredTags","hasDefinedTypeTag","hasValueOrExecutorHasNonEmptyResolveValue","anyPromiseAsReturn","hasYieldValue","hasYieldReturnValue","hasThrowValue","isAsync","async","filterTags","item","tagList","filter","getTagsByType","hasOptionTag","Boolean","getClassNode","reverse","find","parent","getClassJsdoc","classNode","classJsdocNode","indnt","repeat","classJsdoc","forEachPreferredTag","arrayHandler","matchingJsdocTags","matchingJsdocTag","getSettings","ignorePrivate","ignoreInternal","Number","preferredTypes","parserPath","setTagStructure","overrideTagStructure","error","makeReport","commentNode","fix","jsdocLoc","lineNumber","colNumber","iterate","info","iterator","state","checkInternal","checkPrivate","getIndentAndJSDoc","sourceLine","charAt","jsdc","iterateAllJsdocs","contexts","additiveContexts","trackedJsdocs","callIterator","jsdocNodes","lastCall","test","getText","comment","selector","lastComment","exit","create","reducedNode","nonComment","allComments","getAllComments","untrackedJSdoc","checkFile","iterateJsdoc","metaType","TypeError","contextDefaults","contextSelected","matchContext","match","enforcedContexts","map","obj","hasPl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yB,QAAAA,OAAO,IAAIA,OAAO,CAAC1B,KAAD,CAAP,KAAmB,KAJhC,EAKE;AACA;AACD;;AAED8K,QAAAA,OAAO,CACLC,IADK,EACC1K,MADD,EACSL,KADT,EACgBI,UADhB,EAC4B5B,OAD5B,EACqC8G,KADrC,EAC4CrF,SAD5C,EACuDF,IADvD,EAC6DG,QAD7D,EACuEM,UADvE,EACmFwK,QADnF,EAC6FC,KAD7F,CAAP;AAGD,OA1BD;;AA4BA,UAAIyC,aAAa,GAAG,EAApB;;AAEA,UAAIjC,QAAQ,KACVrL,UAAU,CAAC2M,eAAX,IAA8B3M,UAAU,CAAC4M,eAAzC,IAA4D5M,UAAU,CAAC6M,YAD7D,CAAZ,EAEG;AACDS,QAAAA,aAAa,GAAGrO,oBAAWsO,gBAAX,CACdlC,QADc,EAEdgC,UAFc,EAGd,kCAAevN,QAAf,CAHc,CAAhB;AAKD,OARD,MAQO;AACL,aAAK,MAAM4E,IAAX,IAAmB,CACjB,yBADiB,EAEjB,qBAFiB,EAGjB,oBAHiB,CAAnB,EAIG;AACD4I,UAAAA,aAAa,CAAC5I,IAAD,CAAb,GAAsB2I,UAAU,CAACG,IAAX,CAAgB,IAAhB,EAAsB;AAC1C1B,YAAAA,QAAQ,EAAEpH;AADgC,WAAtB,EAEnB,IAFmB,CAAtB;AAGD;AACF;;AAED,UAAI1E,UAAU,CAACgM,IAAf,EAAqB;AACnBsB,QAAAA,aAAa,CAAC,cAAD,CAAb,GAAgC,MAAM;AACpCtN,UAAAA,UAAU,CAACgM,IAAX,CAAgB;AACd5N,YAAAA,OADc;AAEdyM,YAAAA;AAFc,WAAhB;AAID,SALD;AAMD;;AAED,aAAOyC,aAAP;AACD,KAjHI;;AAkHLvG,IAAAA,IAAI,EAAE/G,UAAU,CAAC+G;AAlHZ,GAAP;AAoHD","sourcesContent":["import {\n getReducedASTNode,\n getJSDocComment,\n commentHandler,\n parseComment,\n} from '@es-joy/jsdoccomment';\nimport {\n stringify as commentStringify,\n util,\n} from 'comment-parser';\nimport jsdocUtils from './jsdocUtils';\n\nconst {\n rewireSpecs,\n seedTokens,\n} = util;\n\n/*\nconst {\n align as commentAlign,\n flow: commentFlow,\n indent: commentIndent,\n} = transforms;\n*/\n\nconst globalState = new Map();\n\nconst getBasicUtils = (context, {\n tagNamePreference,\n mode,\n}) => {\n const utils = {};\n utils.reportSettings = (message) => {\n context.report({\n loc: {\n start: {\n column: 1,\n line: 1,\n },\n },\n message,\n });\n };\n\n utils.parseClosureTemplateTag = (tag) => {\n return jsdocUtils.parseClosureTemplateTag(tag);\n };\n\n utils.pathDoesNotBeginWith = jsdocUtils.pathDoesNotBeginWith;\n\n utils.getPreferredTagNameObject = ({\n tagName,\n }) => {\n const ret = jsdocUtils.getPreferredTagName(context, mode, tagName, tagNamePreference);\n const isObject = ret && typeof ret === 'object';\n if (ret === false || isObject && !ret.replacement) {\n return {\n blocked: true,\n tagName,\n };\n }\n\n return ret;\n };\n\n return utils;\n};\n\nconst getUtils = (\n node,\n jsdoc,\n jsdocNode,\n settings,\n report,\n context,\n iteratingAll,\n ruleConfig,\n indent,\n) => {\n const ancestors = context.getAncestors();\n const sourceCode = context.getSourceCode();\n\n const utils = getBasicUtils(context, settings);\n\n const {\n tagNamePreference,\n overrideReplacesDocs,\n ignoreReplacesDocs,\n implementsReplacesDocs,\n augmentsExtendsReplacesDocs,\n maxLines,\n minLines,\n mode,\n } = settings;\n\n utils.isIteratingFunction = () => {\n return !iteratingAll || [\n 'MethodDefinition',\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n ].includes(node && node.type);\n };\n\n utils.isVirtualFunction = () => {\n return iteratingAll && utils.hasATag([\n 'callback', 'function', 'func', 'method',\n ]);\n };\n\n utils.stringify = (tagBlock, specRewire) => {\n return commentStringify(specRewire ? rewireSpecs(tagBlock) : tagBlock);\n };\n\n utils.reportJSDoc = (msg, tag, handler, specRewire, data) => {\n report(msg, handler ? (fixer) => {\n handler();\n const replacement = utils.stringify(jsdoc, specRewire);\n\n return fixer.replaceText(jsdocNode, replacement);\n } : null, tag, data);\n };\n\n utils.getRegexFromString = (str, requiredFlags) => {\n return jsdocUtils.getRegexFromString(str, requiredFlags);\n };\n\n utils.getTagDescription = (tg) => {\n const descriptions = [];\n tg.source.some(({\n tokens: {\n end,\n lineEnd,\n postDelimiter,\n tag,\n postTag,\n name,\n type,\n description,\n },\n }) => {\n const desc = (\n tag && postTag ||\n !tag && !name && !type && postDelimiter || ''\n\n // Remove space\n ).slice(1) +\n (description || '') + (lineEnd || '');\n\n if (end) {\n if (desc) {\n descriptions.push(desc);\n }\n\n return true;\n }\n\n descriptions.push(desc);\n\n return false;\n });\n\n return descriptions.join('\\n');\n };\n\n utils.getDescription = () => {\n const descriptions = [];\n let lastDescriptionLine = 0;\n jsdoc.source.some(({\n tokens: {\n description,\n tag,\n end,\n },\n }, idx) => {\n if (idx && (tag || end)) {\n lastDescriptionLine = idx - 1;\n\n return true;\n }\n\n if (idx || description) {\n descriptions.push(description || (descriptions.length ? '' : '\\n'));\n }\n\n return false;\n });\n\n return {\n description: descriptions.join('\\n'),\n lastDescriptionLine,\n };\n };\n\n utils.changeTag = (tag, ...tokens) => {\n for (const [\n idx,\n src,\n ] of tag.source.entries()) {\n src.tokens = {\n ...src.tokens,\n ...tokens[idx],\n };\n }\n };\n\n utils.setTag = (tag, tokens) => {\n tag.source = [\n {\n // Or tag.source[0].number?\n number: tag.line,\n tokens: seedTokens({\n delimiter: '*',\n postDelimiter: ' ',\n start: indent + ' ',\n tag: '@' + tag.tag,\n ...tokens,\n }),\n },\n ];\n };\n\n utils.removeTag = (idx) => {\n return utils.removeTagItem(idx);\n };\n\n utils.removeTagItem = (tagIndex, tagSourceOffset = 0) => {\n const {\n source: tagSource,\n } = jsdoc.tags[tagIndex];\n let lastIndex;\n const firstNumber = jsdoc.source[0].number;\n tagSource.some(({\n number,\n }, tagIdx) => {\n const sourceIndex = jsdoc.source.findIndex(({\n number: srcNumber,\n tokens: {\n end,\n },\n }) => {\n return number === srcNumber && !end;\n });\n // istanbul ignore else\n if (sourceIndex > -1) {\n let spliceCount = 1;\n tagSource.slice(tagIdx + 1).some(({\n tokens: {\n tag,\n end,\n },\n }) => {\n if (!tag && !end) {\n spliceCount++;\n\n return false;\n }\n\n return true;\n });\n jsdoc.source.splice(sourceIndex + tagSourceOffset, spliceCount - tagSourceOffset);\n tagSource.splice(tagIdx + tagSourceOffset, spliceCount - tagSourceOffset);\n lastIndex = sourceIndex;\n\n return true;\n }\n\n // istanbul ignore next\n return false;\n });\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(lastIndex).entries()) {\n src.number = firstNumber + lastIndex + idx;\n }\n\n // Todo: Once rewiring of tags may be fixed in comment-parser to reflect missing tags,\n // this step should be added here (so that, e.g., if accessing `jsdoc.tags`,\n // such as to add a new tag, the correct information will be available)\n };\n\n utils.addTag = (\n targetTagName,\n number = (jsdoc.tags[jsdoc.tags.length - 1]?.source[0]?.number ?? jsdoc.source.findIndex(({\n tokens: {\n tag,\n },\n }) => {\n return tag;\n }) - 1) + 1,\n tokens = {},\n ) => {\n jsdoc.source.splice(number, 0, {\n number,\n source: '',\n tokens: seedTokens({\n delimiter: '*',\n postDelimiter: ' ',\n start: indent + ' ',\n tag: `@${targetTagName}`,\n ...tokens,\n }),\n });\n for (const src of jsdoc.source.slice(number + 1)) {\n src.number++;\n }\n };\n\n utils.getFirstLine = () => {\n let firstLine;\n for (const {\n number,\n tokens: {\n tag,\n },\n } of jsdoc.source) {\n if (tag) {\n firstLine = number;\n break;\n }\n }\n\n return firstLine;\n };\n\n utils.seedTokens = seedTokens;\n\n utils.emptyTokens = (tokens) => {\n for (const prop of [\n 'start',\n 'postDelimiter',\n 'tag',\n 'type',\n 'postType',\n 'postTag',\n 'name',\n 'postName',\n 'description',\n 'end',\n 'lineEnd',\n ]) {\n tokens[prop] = '';\n }\n };\n\n utils.addLine = (sourceIndex, tokens) => {\n const number = (jsdoc.source[sourceIndex - 1]?.number || 0) + 1;\n jsdoc.source.splice(sourceIndex, 0, {\n number,\n source: '',\n tokens: seedTokens(tokens),\n });\n\n for (const src of jsdoc.source.slice(number + 1)) {\n src.number++;\n }\n // If necessary, we can rewire the tags (misnamed method)\n // rewireSource(jsdoc);\n };\n\n utils.addLines = (tagIndex, tagSourceOffset, numLines) => {\n const {\n source: tagSource,\n } = jsdoc.tags[tagIndex];\n let lastIndex;\n const firstNumber = jsdoc.source[0].number;\n tagSource.some(({\n number,\n }) => {\n const makeLine = () => {\n return {\n number,\n source: '',\n tokens: seedTokens({\n delimiter: '*',\n start: indent + ' ',\n }),\n };\n };\n\n const makeLines = () => {\n return Array.from({\n length: numLines,\n }, makeLine);\n };\n\n const sourceIndex = jsdoc.source.findIndex(({\n number: srcNumber,\n tokens: {\n end,\n },\n }) => {\n return number === srcNumber && !end;\n });\n // istanbul ignore else\n if (sourceIndex > -1) {\n const lines = makeLines();\n jsdoc.source.splice(sourceIndex + tagSourceOffset, 0, ...lines);\n\n // tagSource.splice(tagIdx + 1, 0, ...makeLines());\n lastIndex = sourceIndex;\n\n return true;\n }\n\n // istanbul ignore next\n return false;\n });\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(lastIndex).entries()) {\n src.number = firstNumber + lastIndex + idx;\n }\n };\n\n utils.makeMultiline = () => {\n const {\n source: [\n {\n tokens,\n },\n ],\n } = jsdoc;\n const {\n postDelimiter,\n description,\n lineEnd,\n tag,\n name,\n type,\n } = tokens;\n\n let {\n tokens: {\n postName,\n postTag,\n postType,\n },\n } = jsdoc.source[0];\n\n // Strip trailing leftovers from single line ending\n if (!description) {\n if (postName) {\n postName = '';\n } else if (postType) {\n postType = '';\n // eslint-disable-next-line no-inline-comments\n } else /* istanbul ignore else -- `comment-parser` prevents empty blocks currently per https://github.com/syavorsky/comment-parser/issues/128 */ if (postTag) {\n postTag = '';\n }\n }\n\n utils.emptyTokens(tokens);\n\n utils.addLine(1, {\n delimiter: '*',\n\n // If a description were present, it may have whitespace attached\n // due to being at the end of the single line\n description: description.trimEnd(),\n name,\n postDelimiter,\n postName,\n postTag,\n postType,\n start: indent + ' ',\n tag,\n type,\n });\n utils.addLine(2, {\n end: '*/',\n lineEnd,\n start: indent + ' ',\n });\n };\n\n utils.flattenRoots = (params) => {\n return jsdocUtils.flattenRoots(params);\n };\n\n utils.getFunctionParameterNames = (useDefaultObjectProperties) => {\n return jsdocUtils.getFunctionParameterNames(node, useDefaultObjectProperties);\n };\n\n utils.hasParams = () => {\n return jsdocUtils.hasParams(node);\n };\n\n utils.isGenerator = () => {\n return node && (\n node.generator ||\n node.type === 'MethodDefinition' && node.value.generator ||\n [\n 'ExportNamedDeclaration', 'ExportDefaultDeclaration',\n ].includes(node.type) &&\n node.declaration.generator\n );\n };\n\n utils.isConstructor = () => {\n return jsdocUtils.isConstructor(node);\n };\n\n utils.getJsdocTagsDeep = (tagName) => {\n const name = utils.getPreferredTagName({\n tagName,\n });\n if (!name) {\n return false;\n }\n\n return jsdocUtils.getJsdocTagsDeep(jsdoc, name);\n };\n\n utils.getPreferredTagName = ({\n tagName,\n skipReportingBlockedTag = false,\n allowObjectReturn = false,\n defaultMessage = `Unexpected tag \\`@${tagName}\\``,\n }) => {\n const ret = jsdocUtils.getPreferredTagName(context, mode, tagName, tagNamePreference);\n const isObject = ret && typeof ret === 'object';\n if (utils.hasTag(tagName) && (ret === false || isObject && !ret.replacement)) {\n if (skipReportingBlockedTag) {\n return {\n blocked: true,\n tagName,\n };\n }\n\n const message = isObject && ret.message || defaultMessage;\n report(message, null, utils.getTags(tagName)[0]);\n\n return false;\n }\n\n return isObject && !allowObjectReturn ? ret.replacement : ret;\n };\n\n utils.isValidTag = (name, definedTags) => {\n return jsdocUtils.isValidTag(context, mode, name, definedTags);\n };\n\n utils.hasATag = (names) => {\n return jsdocUtils.hasATag(jsdoc, names);\n };\n\n utils.hasTag = (name) => {\n return jsdocUtils.hasTag(jsdoc, name);\n };\n\n utils.comparePaths = (name) => {\n return jsdocUtils.comparePaths(name);\n };\n\n utils.dropPathSegmentQuotes = (name) => {\n return jsdocUtils.dropPathSegmentQuotes(name);\n };\n\n utils.avoidDocs = () => {\n if (\n ignoreReplacesDocs !== false &&\n (utils.hasTag('ignore') || utils.classHasTag('ignore')) ||\n overrideReplacesDocs !== false &&\n (utils.hasTag('override') || utils.classHasTag('override')) ||\n implementsReplacesDocs !== false &&\n (utils.hasTag('implements') || utils.classHasTag('implements')) ||\n\n augmentsExtendsReplacesDocs &&\n (utils.hasATag([\n 'augments', 'extends',\n ]) ||\n utils.classHasTag('augments') ||\n utils.classHasTag('extends'))) {\n return true;\n }\n\n if (jsdocUtils.exemptSpeciaMethods(\n jsdoc, node, context, ruleConfig.meta.schema,\n )) {\n return true;\n }\n\n const exemptedBy = context.options[0]?.exemptedBy ?? [\n 'inheritDoc',\n ...mode === 'closure' ? [] : [\n 'inheritdoc',\n ],\n ];\n if (exemptedBy.length && utils.getPresentTags(exemptedBy).length) {\n return true;\n }\n\n return false;\n };\n\n for (const method of [\n 'tagMightHaveNamePosition',\n 'tagMightHaveTypePosition',\n ]) {\n utils[method] = (tagName, otherModeMaps) => {\n const result = jsdocUtils[method](tagName);\n if (result) {\n return true;\n }\n\n if (!otherModeMaps) {\n return false;\n }\n\n const otherResult = otherModeMaps.some((otherModeMap) => {\n return jsdocUtils[method](tagName, otherModeMap);\n });\n\n return otherResult ? {\n otherMode: true,\n } : false;\n };\n }\n\n for (const method of [\n 'tagMustHaveNamePosition',\n 'tagMustHaveTypePosition',\n 'tagMissingRequiredTypeOrNamepath',\n ]) {\n utils[method] = (tagName, otherModeMaps) => {\n const result = jsdocUtils[method](tagName);\n if (!result) {\n return false;\n }\n\n // if (!otherModeMaps) { return true; }\n\n const otherResult = otherModeMaps.every((otherModeMap) => {\n return jsdocUtils[method](tagName, otherModeMap);\n });\n\n return otherResult ? true : {\n otherMode: false,\n };\n };\n }\n\n for (const method of [\n 'isNamepathDefiningTag',\n 'tagMightHaveNamepath',\n ]) {\n utils[method] = (tagName) => {\n return jsdocUtils[method](tagName);\n };\n }\n\n utils.getTagStructureForMode = (mde) => {\n return jsdocUtils.getTagStructureForMode(mde, settings.structuredTags);\n };\n\n utils.hasDefinedTypeTag = (tag) => {\n return jsdocUtils.hasDefinedTypeTag(tag);\n };\n\n utils.hasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn) => {\n return jsdocUtils.hasValueOrExecutorHasNonEmptyResolveValue(node, anyPromiseAsReturn);\n };\n\n utils.hasYieldValue = () => {\n if ([\n 'ExportNamedDeclaration', 'ExportDefaultDeclaration',\n ].includes(node.type)) {\n return jsdocUtils.hasYieldValue(node.declaration);\n }\n\n return jsdocUtils.hasYieldValue(node);\n };\n\n utils.hasYieldReturnValue = () => {\n return jsdocUtils.hasYieldValue(node, true);\n };\n\n utils.hasThrowValue = () => {\n return jsdocUtils.hasThrowValue(node);\n };\n\n utils.isAsync = () => {\n return node.async;\n };\n\n utils.getTags = (tagName) => {\n return utils.filterTags((item) => {\n return item.tag === tagName;\n });\n };\n\n utils.getPresentTags = (tagList) => {\n return utils.filterTags((tag) => {\n return tagList.includes(tag.tag);\n });\n };\n\n utils.filterTags = (filter) => {\n return jsdocUtils.filterTags(jsdoc.tags, filter);\n };\n\n utils.getTagsByType = (tags) => {\n return jsdocUtils.getTagsByType(context, mode, tags, tagNamePreference);\n };\n\n utils.hasOptionTag = (tagName) => {\n const {\n tags,\n } = context.options[0] ?? {};\n\n return Boolean(tags && tags.includes(tagName));\n };\n\n utils.getClassNode = () => {\n return [\n ...ancestors, node,\n ].reverse().find((parent) => {\n return parent && [\n 'ClassDeclaration', 'ClassExpression',\n ].includes(parent.type);\n }) || null;\n };\n\n utils.getClassJsdoc = () => {\n const classNode = utils.getClassNode();\n\n if (!classNode) {\n return null;\n }\n\n const classJsdocNode = getJSDocComment(sourceCode, classNode, {\n maxLines,\n minLines,\n });\n\n if (classJsdocNode) {\n const indnt = ' '.repeat(classJsdocNode.loc.start.column);\n\n return parseComment(classJsdocNode, indnt);\n }\n\n return null;\n };\n\n utils.classHasTag = (tagName) => {\n const classJsdoc = utils.getClassJsdoc();\n\n return Boolean(classJsdoc) && jsdocUtils.hasTag(classJsdoc, tagName);\n };\n\n utils.forEachPreferredTag = (tagName, arrayHandler, skipReportingBlockedTag = false) => {\n const targetTagName = utils.getPreferredTagName({\n skipReportingBlockedTag,\n tagName,\n });\n if (!targetTagName ||\n skipReportingBlockedTag && targetTagName && typeof targetTagName === 'object'\n ) {\n return;\n }\n\n const matchingJsdocTags = jsdoc.tags.filter(({\n tag,\n }) => {\n return tag === targetTagName;\n });\n\n for (const matchingJsdocTag of matchingJsdocTags) {\n arrayHandler(matchingJsdocTag, targetTagName);\n }\n };\n\n return utils;\n};\n\nconst getSettings = (context) => {\n /* eslint-disable canonical/sort-keys */\n const settings = {\n // All rules\n ignorePrivate: Boolean(context.settings.jsdoc?.ignorePrivate),\n ignoreInternal: Boolean(context.settings.jsdoc?.ignoreInternal),\n maxLines: Number(context.settings.jsdoc?.maxLines ?? 1),\n minLines: Number(context.settings.jsdoc?.minLines ?? 0),\n\n // `check-tag-names` and many returns/param rules\n tagNamePreference: context.settings.jsdoc?.tagNamePreference ?? {},\n\n // `check-types` and `no-undefined-types`\n preferredTypes: context.settings.jsdoc?.preferredTypes ?? {},\n\n // `check-types`, `no-undefined-types`, `valid-types`\n structuredTags: context.settings.jsdoc?.structuredTags ?? {},\n\n // `require-param`, `require-description`, `require-example`,\n // `require-returns`, `require-throw`, `require-yields`\n overrideReplacesDocs: context.settings.jsdoc?.overrideReplacesDocs,\n ignoreReplacesDocs: context.settings.jsdoc?.ignoreReplacesDocs,\n implementsReplacesDocs: context.settings.jsdoc?.implementsReplacesDocs,\n augmentsExtendsReplacesDocs: context.settings.jsdoc?.augmentsExtendsReplacesDocs,\n\n // Many rules, e.g., `check-tag-names`\n mode: context.settings.jsdoc?.mode ??\n (context.parserPath.includes('@typescript-eslint') ? 'typescript' : 'jsdoc'),\n };\n /* eslint-enable canonical/sort-keys */\n\n jsdocUtils.setTagStructure(settings.mode);\n try {\n jsdocUtils.overrideTagStructure(settings.structuredTags);\n } catch (error) {\n context.report({\n loc: {\n start: {\n column: 1,\n line: 1,\n },\n },\n message: error.message,\n });\n\n return false;\n }\n\n return settings;\n};\n\n/**\n * Create the report function\n *\n * @param {object} context\n * @param {object} commentNode\n */\nconst makeReport = (context, commentNode) => {\n const report = (message, fix = null, jsdocLoc = null, data = null) => {\n let loc;\n\n if (jsdocLoc) {\n if (!('line' in jsdocLoc)) {\n jsdocLoc.line = jsdocLoc.source[0].number;\n }\n\n const lineNumber = commentNode.loc.start.line + jsdocLoc.line;\n\n loc = {\n end: {\n line: lineNumber,\n },\n start: {\n line: lineNumber,\n },\n };\n\n // Todo: Remove ignore once `check-examples` can be restored for ESLint 8+\n // istanbul ignore if\n if (jsdocLoc.column) {\n const colNumber = commentNode.loc.start.column + jsdocLoc.column;\n\n loc.end.column = colNumber;\n loc.start.column = colNumber;\n }\n }\n\n context.report({\n data,\n fix,\n loc,\n message,\n node: commentNode,\n });\n };\n\n return report;\n};\n\n/* eslint-disable jsdoc/no-undefined-types -- Need to build this in; see https://www.typescriptlang.org/docs/handbook/utility-types.html */\n/**\n * @typedef {ReturnType<typeof getUtils>} Utils\n * @typedef {ReturnType<typeof getSettings>} Settings\n * @typedef {(\n * arg: {\n * context: object,\n * sourceCode: object,\n * indent: string,\n * jsdoc: object,\n * jsdocNode: object,\n * node: object | null,\n * report: ReturnType<typeof makeReport>,\n * settings: Settings,\n * utils: Utils,\n * }\n * ) => any } JsdocVisitor\n */\n/* eslint-enable jsdoc/no-undefined-types -- Need to build this in */\n\nconst iterate = (\n info,\n indent, jsdoc,\n ruleConfig, context, lines, jsdocNode, node, settings,\n sourceCode, iterator, state, iteratingAll,\n) => {\n const report = makeReport(context, jsdocNode);\n\n const utils = getUtils(\n node,\n jsdoc,\n jsdocNode,\n settings,\n report,\n context,\n iteratingAll,\n ruleConfig,\n indent,\n );\n\n if (\n !ruleConfig.checkInternal && settings.ignoreInternal &&\n utils.hasTag('internal')\n ) {\n return;\n }\n\n if (\n !ruleConfig.checkPrivate && settings.ignorePrivate &&\n (\n utils.hasTag('private') ||\n jsdoc.tags\n .filter(({\n tag,\n }) => {\n return tag === 'access';\n })\n .some(({\n description,\n }) => {\n return description === 'private';\n })\n )\n ) {\n return;\n }\n\n iterator({\n context,\n globalState,\n indent,\n info,\n iteratingAll,\n jsdoc,\n jsdocNode,\n node,\n report,\n settings,\n sourceCode,\n state,\n utils,\n });\n};\n\nconst getIndentAndJSDoc = function (lines, jsdocNode) {\n const sourceLine = lines[jsdocNode.loc.start.line - 1];\n const indnt = sourceLine.charAt(0).repeat(jsdocNode.loc.start.column);\n const jsdc = parseComment(jsdocNode, indnt);\n\n return [\n indnt, jsdc,\n ];\n};\n\n/**\n * Create an eslint rule that iterates over all JSDocs, regardless of whether\n * they are attached to a function-like node.\n *\n * @param {JsdocVisitor} iterator\n * @param {{meta: any}} ruleConfig\n * @param contexts\n * @param {boolean} additiveContexts\n */\nconst iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {\n const trackedJsdocs = [];\n\n let handler;\n let settings;\n const callIterator = (context, node, jsdocNodes, state, lastCall) => {\n const sourceCode = context.getSourceCode();\n const {\n lines,\n } = sourceCode;\n\n const utils = getBasicUtils(context, settings);\n for (const jsdocNode of jsdocNodes) {\n if (!(/^\\/\\*\\*\\s/u).test(sourceCode.getText(jsdocNode))) {\n continue;\n }\n\n const [\n indent,\n jsdoc,\n ] = getIndentAndJSDoc(\n lines, jsdocNode,\n );\n\n if (additiveContexts) {\n for (const [\n idx,\n {\n comment,\n },\n ] of contexts.entries()) {\n if (comment && handler(comment, jsdoc) === false) {\n continue;\n }\n\n iterate(\n {\n comment,\n lastIndex: idx,\n selector: node?.type,\n },\n indent,\n jsdoc,\n ruleConfig,\n context,\n lines,\n jsdocNode,\n node,\n settings,\n sourceCode,\n iterator,\n state,\n true,\n );\n }\n\n continue;\n }\n\n let lastComment;\n let lastIndex;\n // eslint-disable-next-line no-loop-func\n if (contexts && contexts.every(({\n comment,\n }, idx) => {\n lastComment = comment;\n lastIndex = idx;\n\n return comment && handler(comment, jsdoc) === false;\n })) {\n continue;\n }\n\n iterate(\n lastComment ? {\n comment: lastComment,\n lastIndex,\n selector: node?.type,\n } : {\n lastIndex,\n selector: node?.type,\n },\n indent,\n jsdoc,\n ruleConfig,\n context,\n lines,\n jsdocNode,\n node,\n settings,\n sourceCode,\n iterator,\n state,\n true,\n );\n }\n\n if (lastCall && ruleConfig.exit) {\n ruleConfig.exit({\n context,\n state,\n utils,\n });\n }\n };\n\n return {\n create (context) {\n const sourceCode = context.getSourceCode();\n settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n if (contexts) {\n handler = commentHandler(settings);\n }\n\n const state = {};\n\n return {\n '*:not(Program)' (node) {\n const reducedNode = getReducedASTNode(node, sourceCode);\n\n if (node !== reducedNode) {\n return;\n }\n\n const commentNode = getJSDocComment(sourceCode, node, settings);\n if (trackedJsdocs.includes(commentNode)) {\n return;\n }\n\n if (!commentNode) {\n if (ruleConfig.nonComment) {\n ruleConfig.nonComment({\n node,\n state,\n });\n }\n\n return;\n }\n\n trackedJsdocs.push(commentNode);\n callIterator(context, node, [\n commentNode,\n ], state);\n },\n 'Program:exit' () {\n const allComments = sourceCode.getAllComments();\n const untrackedJSdoc = allComments.filter((node) => {\n return !trackedJsdocs.includes(node);\n });\n\n callIterator(context, null, untrackedJSdoc, state, true);\n },\n };\n },\n meta: ruleConfig.meta,\n };\n};\n\n/**\n * Create an eslint rule that iterates over all JSDocs, regardless of whether\n * they are attached to a function-like node.\n *\n * @param {JsdocVisitor} iterator\n * @param {{meta: any}} ruleConfig\n */\nconst checkFile = (iterator, ruleConfig) => {\n return {\n create (context) {\n const sourceCode = context.getSourceCode();\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n return {\n 'Program:exit' () {\n const allComments = sourceCode.getAllComments();\n const {\n lines,\n } = sourceCode;\n const utils = getBasicUtils(context, settings);\n\n iterator({\n allComments,\n context,\n lines,\n makeReport,\n settings,\n sourceCode,\n utils,\n });\n },\n };\n },\n meta: ruleConfig.meta,\n };\n};\n\nexport {\n getSettings,\n // eslint-disable-next-line unicorn/prefer-export-from -- Avoid experimental parser\n parseComment,\n};\n\n/**\n * @param {JsdocVisitor} iterator\n * @param {{\n * meta: any,\n * contextDefaults?: true | string[],\n * contextSelected?: true,\n * iterateAllJsdocs?: true,\n * }} ruleConfig\n */\nexport default function iterateJsdoc (iterator, ruleConfig) {\n const metaType = ruleConfig?.meta?.type;\n if (!metaType || ![\n 'problem', 'suggestion', 'layout',\n ].includes(metaType)) {\n throw new TypeError('Rule must include `meta.type` option (with value \"problem\", \"suggestion\", or \"layout\")');\n }\n\n if (typeof iterator !== 'function') {\n throw new TypeError('The iterator argument must be a function.');\n }\n\n if (ruleConfig.checkFile) {\n return checkFile(iterator, ruleConfig);\n }\n\n if (ruleConfig.iterateAllJsdocs) {\n return iterateAllJsdocs(iterator, ruleConfig);\n }\n\n return {\n /**\n * The entrypoint for the JSDoc rule.\n *\n * @param {*} context\n * a reference to the context which hold all important information\n * like settings and the sourcecode to check.\n * @returns {object}\n * a list with parser callback function.\n */\n create (context) {\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n let contexts;\n if (ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext) {\n contexts = ruleConfig.matchContext && context.options[0]?.match ?\n context.options[0].match :\n jsdocUtils.enforcedContexts(context, ruleConfig.contextDefaults);\n\n if (contexts) {\n contexts = contexts.map((obj) => {\n if (typeof obj === 'object' && !obj.context) {\n return {\n ...obj,\n context: 'any',\n };\n }\n\n return obj;\n });\n }\n\n const hasPlainAny = contexts?.includes('any');\n const hasObjectAny = !hasPlainAny && contexts?.find((ctxt) => {\n return ctxt?.context === 'any';\n });\n if (hasPlainAny || hasObjectAny) {\n return iterateAllJsdocs(\n iterator, ruleConfig, hasObjectAny ? contexts : null, ruleConfig.matchContext,\n ).create(context);\n }\n }\n\n const sourceCode = context.getSourceCode();\n const {\n lines,\n } = sourceCode;\n\n const state = {};\n\n const checkJsdoc = (info, handler, node) => {\n const jsdocNode = getJSDocComment(sourceCode, node, settings);\n\n if (!jsdocNode) {\n return;\n }\n\n const [\n indent,\n jsdoc,\n ] = getIndentAndJSDoc(\n lines, jsdocNode,\n );\n\n if (\n // Note, `handler` should already be bound in its first argument\n // with these only to be called after the value of\n // `comment`\n handler && handler(jsdoc) === false\n ) {\n return;\n }\n\n iterate(\n info, indent, jsdoc, ruleConfig, context, lines, jsdocNode, node, settings, sourceCode, iterator, state,\n );\n };\n\n let contextObject = {};\n\n if (contexts && (\n ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext\n )) {\n contextObject = jsdocUtils.getContextObject(\n contexts,\n checkJsdoc,\n commentHandler(settings),\n );\n } else {\n for (const prop of [\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n ]) {\n contextObject[prop] = checkJsdoc.bind(null, {\n selector: prop,\n }, null);\n }\n }\n\n if (ruleConfig.exit) {\n contextObject['Program:exit'] = () => {\n ruleConfig.exit({\n context,\n state,\n });\n };\n }\n\n return contextObject;\n },\n meta: ruleConfig.meta,\n };\n}\n"],"file":"iterateJsdoc.js"}
1
+ {"version":3,"sources":["../src/iterateJsdoc.js"],"names":["rewireSpecs","seedTokens","util","globalState","Map","getBasicUtils","context","tagNamePreference","mode","utils","reportSettings","message","report","loc","start","column","line","parseClosureTemplateTag","tag","jsdocUtils","pathDoesNotBeginWith","getPreferredTagNameObject","tagName","ret","getPreferredTagName","isObject","replacement","blocked","getUtils","node","jsdoc","jsdocNode","settings","iteratingAll","ruleConfig","indent","ancestors","getAncestors","sourceCode","getSourceCode","overrideReplacesDocs","ignoreReplacesDocs","implementsReplacesDocs","augmentsExtendsReplacesDocs","maxLines","minLines","isIteratingFunction","includes","type","isVirtualFunction","hasATag","stringify","tagBlock","specRewire","reportJSDoc","msg","handler","data","fixer","replaceText","getRegexFromString","str","requiredFlags","getTagDescription","tg","descriptions","source","some","tokens","end","lineEnd","postDelimiter","postTag","name","description","desc","slice","push","join","getDescription","lastDescriptionLine","idx","length","changeTag","src","entries","setTag","number","delimiter","removeTag","removeTagItem","tagIndex","tagSourceOffset","tagSource","tags","lastIndex","firstNumber","tagIdx","sourceIndex","findIndex","srcNumber","spliceCount","splice","addTag","targetTagName","getFirstLine","firstLine","emptyTokens","prop","addLine","addLines","numLines","makeLine","makeLines","Array","from","lines","makeMultiline","postName","postType","trimEnd","flattenRoots","params","getFunctionParameterNames","useDefaultObjectProperties","hasParams","isGenerator","generator","value","declaration","isConstructor","getJsdocTagsDeep","skipReportingBlockedTag","allowObjectReturn","defaultMessage","hasTag","getTags","isValidTag","definedTags","names","comparePaths","dropPathSegmentQuotes","avoidDocs","classHasTag","exemptSpeciaMethods","meta","schema","exemptedBy","options","getPresentTags","method","otherModeMaps","result","otherResult","otherModeMap","otherMode","every","getTagStructureForMode","mde","structuredTags","hasDefinedTypeTag","hasValueOrExecutorHasNonEmptyResolveValue","anyPromiseAsReturn","hasYieldValue","hasYieldReturnValue","hasThrowValue","isAsync","async","filterTags","item","tagList","filter","getTagsByType","hasOptionTag","Boolean","getClassNode","reverse","find","parent","getClassJsdoc","classNode","classJsdocNode","indnt","repeat","classJsdoc","forEachPreferredTag","arrayHandler","matchingJsdocTags","matchingJsdocTag","getSettings","ignorePrivate","ignoreInternal","Number","preferredTypes","parserPath","setTagStructure","overrideTagStructure","error","makeReport","commentNode","fix","jsdocLoc","lineNumber","colNumber","iterate","info","iterator","state","checkInternal","checkPrivate","getIndentAndJSDoc","sourceLine","charAt","jsdc","iterateAllJsdocs","contexts","additiveContexts","trackedJsdocs","Set","callIterator","jsdocNodes","lastCall","test","getText","comment","selector","lastComment","exit","create","reducedNode","has","nonComment","add","allComments","getAllComments","untrackedJSdoc","checkFile","iterateJsdoc","metaType","TypeError","contextDefaults","contextSelected","matchContext","match","enforcedContexts","map","obj","hasPlainAny","hasObjectAny","ctxt","checkJsdoc","contextObject","getContextObject","bind"],"mappings":";;;;;;;;;;;;;;AAAA;;AAMA;;AAIA;;;;AAEA,MAAM;AACJA,EAAAA,WADI;AAEJC,EAAAA;AAFI,IAGFC,mBAHJ;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,WAAW,GAAG,IAAIC,GAAJ,EAApB;;AAEA,MAAMC,aAAa,GAAG,CAACC,OAAD,EAAU;AAC9BC,EAAAA,iBAD8B;AAE9BC,EAAAA;AAF8B,CAAV,KAGhB;AACJ,QAAMC,KAAK,GAAG,EAAd;;AACAA,EAAAA,KAAK,CAACC,cAAN,GAAwBC,OAAD,IAAa;AAClCL,IAAAA,OAAO,CAACM,MAAR,CAAe;AACbC,MAAAA,GAAG,EAAE;AACHC,QAAAA,KAAK,EAAE;AACLC,UAAAA,MAAM,EAAE,CADH;AAELC,UAAAA,IAAI,EAAE;AAFD;AADJ,OADQ;AAObL,MAAAA;AAPa,KAAf;AASD,GAVD;;AAYAF,EAAAA,KAAK,CAACQ,uBAAN,GAAiCC,GAAD,IAAS;AACvC,WAAOC,oBAAWF,uBAAX,CAAmCC,GAAnC,CAAP;AACD,GAFD;;AAIAT,EAAAA,KAAK,CAACW,oBAAN,GAA6BD,oBAAWC,oBAAxC;;AAEAX,EAAAA,KAAK,CAACY,yBAAN,GAAkC,CAAC;AACjCC,IAAAA;AADiC,GAAD,KAE5B;AACJ,UAAMC,GAAG,GAAGJ,oBAAWK,mBAAX,CAA+BlB,OAA/B,EAAwCE,IAAxC,EAA8Cc,OAA9C,EAAuDf,iBAAvD,CAAZ;;AACA,UAAMkB,QAAQ,GAAGF,GAAG,IAAI,OAAOA,GAAP,KAAe,QAAvC;;AACA,QAAIA,GAAG,KAAK,KAAR,IAAiBE,QAAQ,IAAI,CAACF,GAAG,CAACG,WAAtC,EAAmD;AACjD,aAAO;AACLC,QAAAA,OAAO,EAAE,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ADY,CAHrB;;AAOA,aACE;AACA;AACA;AACAyB,QAAAA,OAAO,IAAIA,OAAO,CAAC1B,KAAD,CAAP,KAAmB,KAJhC,EAKE;AACA;AACD;;AAED8K,QAAAA,OAAO,CACLC,IADK,EACC1K,MADD,EACSL,KADT,EACgBI,UADhB,EAC4B5B,OAD5B,EACqC8G,KADrC,EAC4CrF,SAD5C,EACuDF,IADvD,EAC6DG,QAD7D,EACuEM,UADvE,EACmFwK,QADnF,EAC6FC,KAD7F,CAAP;AAGD,OA1BD;;AA4BA,UAAI4C,aAAa,GAAG,EAApB;;AAEA,UAAIpC,QAAQ,KACVrL,UAAU,CAAC8M,eAAX,IAA8B9M,UAAU,CAAC+M,eAAzC,IAA4D/M,UAAU,CAACgN,YAD7D,CAAZ,EAEG;AACDS,QAAAA,aAAa,GAAGxO,oBAAWyO,gBAAX,CACdrC,QADc,EAEdmC,UAFc,EAGd,kCAAe1N,QAAf,CAHc,CAAhB;AAKD,OARD,MAQO;AACL,aAAK,MAAM4E,IAAX,IAAmB,CACjB,yBADiB,EAEjB,qBAFiB,EAGjB,oBAHiB,CAAnB,EAIG;AACD+I,UAAAA,aAAa,CAAC/I,IAAD,CAAb,GAAsB8I,UAAU,CAACG,IAAX,CAAgB,IAAhB,EAAsB;AAC1C5B,YAAAA,QAAQ,EAAErH;AADgC,WAAtB,EAEnB,IAFmB,CAAtB;AAGD;AACF;;AAED,UAAI1E,UAAU,CAACiM,IAAf,EAAqB;AACnBwB,QAAAA,aAAa,CAAC,cAAD,CAAb,GAAgC,MAAM;AACpCzN,UAAAA,UAAU,CAACiM,IAAX,CAAgB;AACd7N,YAAAA,OADc;AAEdyM,YAAAA;AAFc,WAAhB;AAID,SALD;AAMD;;AAED,aAAO4C,aAAP;AACD,KAjHI;;AAkHL1G,IAAAA,IAAI,EAAE/G,UAAU,CAAC+G;AAlHZ,GAAP;AAoHD","sourcesContent":["import {\n getReducedASTNode,\n getJSDocComment,\n commentHandler,\n parseComment,\n} from '@es-joy/jsdoccomment';\nimport {\n stringify as commentStringify,\n util,\n} from 'comment-parser';\nimport jsdocUtils from './jsdocUtils';\n\nconst {\n rewireSpecs,\n seedTokens,\n} = util;\n\n/*\nconst {\n align as commentAlign,\n flow: commentFlow,\n indent: commentIndent,\n} = transforms;\n*/\n\nconst globalState = new Map();\n\nconst getBasicUtils = (context, {\n tagNamePreference,\n mode,\n}) => {\n const utils = {};\n utils.reportSettings = (message) => {\n context.report({\n loc: {\n start: {\n column: 1,\n line: 1,\n },\n },\n message,\n });\n };\n\n utils.parseClosureTemplateTag = (tag) => {\n return jsdocUtils.parseClosureTemplateTag(tag);\n };\n\n utils.pathDoesNotBeginWith = jsdocUtils.pathDoesNotBeginWith;\n\n utils.getPreferredTagNameObject = ({\n tagName,\n }) => {\n const ret = jsdocUtils.getPreferredTagName(context, mode, tagName, tagNamePreference);\n const isObject = ret && typeof ret === 'object';\n if (ret === false || isObject && !ret.replacement) {\n return {\n blocked: true,\n tagName,\n };\n }\n\n return ret;\n };\n\n return utils;\n};\n\nconst getUtils = (\n node,\n jsdoc,\n jsdocNode,\n settings,\n report,\n context,\n iteratingAll,\n ruleConfig,\n indent,\n) => {\n const ancestors = context.getAncestors();\n const sourceCode = context.getSourceCode();\n\n const utils = getBasicUtils(context, settings);\n\n const {\n tagNamePreference,\n overrideReplacesDocs,\n ignoreReplacesDocs,\n implementsReplacesDocs,\n augmentsExtendsReplacesDocs,\n maxLines,\n minLines,\n mode,\n } = settings;\n\n utils.isIteratingFunction = () => {\n return !iteratingAll || [\n 'MethodDefinition',\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n ].includes(node && node.type);\n };\n\n utils.isVirtualFunction = () => {\n return iteratingAll && utils.hasATag([\n 'callback', 'function', 'func', 'method',\n ]);\n };\n\n utils.stringify = (tagBlock, specRewire) => {\n return commentStringify(specRewire ? rewireSpecs(tagBlock) : tagBlock);\n };\n\n utils.reportJSDoc = (msg, tag, handler, specRewire, data) => {\n report(msg, handler ? (fixer) => {\n handler();\n const replacement = utils.stringify(jsdoc, specRewire);\n\n return fixer.replaceText(jsdocNode, replacement);\n } : null, tag, data);\n };\n\n utils.getRegexFromString = (str, requiredFlags) => {\n return jsdocUtils.getRegexFromString(str, requiredFlags);\n };\n\n utils.getTagDescription = (tg) => {\n const descriptions = [];\n tg.source.some(({\n tokens: {\n end,\n lineEnd,\n postDelimiter,\n tag,\n postTag,\n name,\n type,\n description,\n },\n }) => {\n const desc = (\n tag && postTag ||\n !tag && !name && !type && postDelimiter || ''\n\n // Remove space\n ).slice(1) +\n (description || '') + (lineEnd || '');\n\n if (end) {\n if (desc) {\n descriptions.push(desc);\n }\n\n return true;\n }\n\n descriptions.push(desc);\n\n return false;\n });\n\n return descriptions.join('\\n');\n };\n\n utils.getDescription = () => {\n const descriptions = [];\n let lastDescriptionLine = 0;\n jsdoc.source.some(({\n tokens: {\n description,\n tag,\n end,\n },\n }, idx) => {\n if (idx && (tag || end)) {\n lastDescriptionLine = idx - 1;\n\n return true;\n }\n\n if (idx || description) {\n descriptions.push(description || (descriptions.length ? '' : '\\n'));\n }\n\n return false;\n });\n\n return {\n description: descriptions.join('\\n'),\n lastDescriptionLine,\n };\n };\n\n utils.changeTag = (tag, ...tokens) => {\n for (const [\n idx,\n src,\n ] of tag.source.entries()) {\n src.tokens = {\n ...src.tokens,\n ...tokens[idx],\n };\n }\n };\n\n utils.setTag = (tag, tokens) => {\n tag.source = [\n {\n // Or tag.source[0].number?\n number: tag.line,\n tokens: seedTokens({\n delimiter: '*',\n postDelimiter: ' ',\n start: indent + ' ',\n tag: '@' + tag.tag,\n ...tokens,\n }),\n },\n ];\n };\n\n utils.removeTag = (idx) => {\n return utils.removeTagItem(idx);\n };\n\n utils.removeTagItem = (tagIndex, tagSourceOffset = 0) => {\n const {\n source: tagSource,\n } = jsdoc.tags[tagIndex];\n let lastIndex;\n const firstNumber = jsdoc.source[0].number;\n tagSource.some(({\n number,\n }, tagIdx) => {\n const sourceIndex = jsdoc.source.findIndex(({\n number: srcNumber,\n tokens: {\n end,\n },\n }) => {\n return number === srcNumber && !end;\n });\n // istanbul ignore else\n if (sourceIndex > -1) {\n let spliceCount = 1;\n tagSource.slice(tagIdx + 1).some(({\n tokens: {\n tag,\n end,\n },\n }) => {\n if (!tag && !end) {\n spliceCount++;\n\n return false;\n }\n\n return true;\n });\n jsdoc.source.splice(sourceIndex + tagSourceOffset, spliceCount - tagSourceOffset);\n tagSource.splice(tagIdx + tagSourceOffset, spliceCount - tagSourceOffset);\n lastIndex = sourceIndex;\n\n return true;\n }\n\n // istanbul ignore next\n return false;\n });\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(lastIndex).entries()) {\n src.number = firstNumber + lastIndex + idx;\n }\n\n // Todo: Once rewiring of tags may be fixed in comment-parser to reflect missing tags,\n // this step should be added here (so that, e.g., if accessing `jsdoc.tags`,\n // such as to add a new tag, the correct information will be available)\n };\n\n utils.addTag = (\n targetTagName,\n number = (jsdoc.tags[jsdoc.tags.length - 1]?.source[0]?.number ?? jsdoc.source.findIndex(({\n tokens: {\n tag,\n },\n }) => {\n return tag;\n }) - 1) + 1,\n tokens = {},\n ) => {\n jsdoc.source.splice(number, 0, {\n number,\n source: '',\n tokens: seedTokens({\n delimiter: '*',\n postDelimiter: ' ',\n start: indent + ' ',\n tag: `@${targetTagName}`,\n ...tokens,\n }),\n });\n for (const src of jsdoc.source.slice(number + 1)) {\n src.number++;\n }\n };\n\n utils.getFirstLine = () => {\n let firstLine;\n for (const {\n number,\n tokens: {\n tag,\n },\n } of jsdoc.source) {\n if (tag) {\n firstLine = number;\n break;\n }\n }\n\n return firstLine;\n };\n\n utils.seedTokens = seedTokens;\n\n utils.emptyTokens = (tokens) => {\n for (const prop of [\n 'start',\n 'postDelimiter',\n 'tag',\n 'type',\n 'postType',\n 'postTag',\n 'name',\n 'postName',\n 'description',\n 'end',\n 'lineEnd',\n ]) {\n tokens[prop] = '';\n }\n };\n\n utils.addLine = (sourceIndex, tokens) => {\n const number = (jsdoc.source[sourceIndex - 1]?.number || 0) + 1;\n jsdoc.source.splice(sourceIndex, 0, {\n number,\n source: '',\n tokens: seedTokens(tokens),\n });\n\n for (const src of jsdoc.source.slice(number + 1)) {\n src.number++;\n }\n // If necessary, we can rewire the tags (misnamed method)\n // rewireSource(jsdoc);\n };\n\n utils.addLines = (tagIndex, tagSourceOffset, numLines) => {\n const {\n source: tagSource,\n } = jsdoc.tags[tagIndex];\n let lastIndex;\n const firstNumber = jsdoc.source[0].number;\n tagSource.some(({\n number,\n }) => {\n const makeLine = () => {\n return {\n number,\n source: '',\n tokens: seedTokens({\n delimiter: '*',\n start: indent + ' ',\n }),\n };\n };\n\n const makeLines = () => {\n return Array.from({\n length: numLines,\n }, makeLine);\n };\n\n const sourceIndex = jsdoc.source.findIndex(({\n number: srcNumber,\n tokens: {\n end,\n },\n }) => {\n return number === srcNumber && !end;\n });\n // istanbul ignore else\n if (sourceIndex > -1) {\n const lines = makeLines();\n jsdoc.source.splice(sourceIndex + tagSourceOffset, 0, ...lines);\n\n // tagSource.splice(tagIdx + 1, 0, ...makeLines());\n lastIndex = sourceIndex;\n\n return true;\n }\n\n // istanbul ignore next\n return false;\n });\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(lastIndex).entries()) {\n src.number = firstNumber + lastIndex + idx;\n }\n };\n\n utils.makeMultiline = () => {\n const {\n source: [\n {\n tokens,\n },\n ],\n } = jsdoc;\n const {\n postDelimiter,\n description,\n lineEnd,\n tag,\n name,\n type,\n } = tokens;\n\n let {\n tokens: {\n postName,\n postTag,\n postType,\n },\n } = jsdoc.source[0];\n\n // Strip trailing leftovers from single line ending\n if (!description) {\n if (postName) {\n postName = '';\n } else if (postType) {\n postType = '';\n // eslint-disable-next-line no-inline-comments\n } else /* istanbul ignore else -- `comment-parser` prevents empty blocks currently per https://github.com/syavorsky/comment-parser/issues/128 */ if (postTag) {\n postTag = '';\n }\n }\n\n utils.emptyTokens(tokens);\n\n utils.addLine(1, {\n delimiter: '*',\n\n // If a description were present, it may have whitespace attached\n // due to being at the end of the single line\n description: description.trimEnd(),\n name,\n postDelimiter,\n postName,\n postTag,\n postType,\n start: indent + ' ',\n tag,\n type,\n });\n utils.addLine(2, {\n end: '*/',\n lineEnd,\n start: indent + ' ',\n });\n };\n\n utils.flattenRoots = (params) => {\n return jsdocUtils.flattenRoots(params);\n };\n\n utils.getFunctionParameterNames = (useDefaultObjectProperties) => {\n return jsdocUtils.getFunctionParameterNames(node, useDefaultObjectProperties);\n };\n\n utils.hasParams = () => {\n return jsdocUtils.hasParams(node);\n };\n\n utils.isGenerator = () => {\n return node && (\n node.generator ||\n node.type === 'MethodDefinition' && node.value.generator ||\n [\n 'ExportNamedDeclaration', 'ExportDefaultDeclaration',\n ].includes(node.type) &&\n node.declaration.generator\n );\n };\n\n utils.isConstructor = () => {\n return jsdocUtils.isConstructor(node);\n };\n\n utils.getJsdocTagsDeep = (tagName) => {\n const name = utils.getPreferredTagName({\n tagName,\n });\n if (!name) {\n return false;\n }\n\n return jsdocUtils.getJsdocTagsDeep(jsdoc, name);\n };\n\n utils.getPreferredTagName = ({\n tagName,\n skipReportingBlockedTag = false,\n allowObjectReturn = false,\n defaultMessage = `Unexpected tag \\`@${tagName}\\``,\n }) => {\n const ret = jsdocUtils.getPreferredTagName(context, mode, tagName, tagNamePreference);\n const isObject = ret && typeof ret === 'object';\n if (utils.hasTag(tagName) && (ret === false || isObject && !ret.replacement)) {\n if (skipReportingBlockedTag) {\n return {\n blocked: true,\n tagName,\n };\n }\n\n const message = isObject && ret.message || defaultMessage;\n report(message, null, utils.getTags(tagName)[0]);\n\n return false;\n }\n\n return isObject && !allowObjectReturn ? ret.replacement : ret;\n };\n\n utils.isValidTag = (name, definedTags) => {\n return jsdocUtils.isValidTag(context, mode, name, definedTags);\n };\n\n utils.hasATag = (names) => {\n return jsdocUtils.hasATag(jsdoc, names);\n };\n\n utils.hasTag = (name) => {\n return jsdocUtils.hasTag(jsdoc, name);\n };\n\n utils.comparePaths = (name) => {\n return jsdocUtils.comparePaths(name);\n };\n\n utils.dropPathSegmentQuotes = (name) => {\n return jsdocUtils.dropPathSegmentQuotes(name);\n };\n\n utils.avoidDocs = () => {\n if (\n ignoreReplacesDocs !== false &&\n (utils.hasTag('ignore') || utils.classHasTag('ignore')) ||\n overrideReplacesDocs !== false &&\n (utils.hasTag('override') || utils.classHasTag('override')) ||\n implementsReplacesDocs !== false &&\n (utils.hasTag('implements') || utils.classHasTag('implements')) ||\n\n augmentsExtendsReplacesDocs &&\n (utils.hasATag([\n 'augments', 'extends',\n ]) ||\n utils.classHasTag('augments') ||\n utils.classHasTag('extends'))) {\n return true;\n }\n\n if (jsdocUtils.exemptSpeciaMethods(\n jsdoc, node, context, ruleConfig.meta.schema,\n )) {\n return true;\n }\n\n const exemptedBy = context.options[0]?.exemptedBy ?? [\n 'inheritDoc',\n ...mode === 'closure' ? [] : [\n 'inheritdoc',\n ],\n ];\n if (exemptedBy.length && utils.getPresentTags(exemptedBy).length) {\n return true;\n }\n\n return false;\n };\n\n for (const method of [\n 'tagMightHaveNamePosition',\n 'tagMightHaveTypePosition',\n ]) {\n utils[method] = (tagName, otherModeMaps) => {\n const result = jsdocUtils[method](tagName);\n if (result) {\n return true;\n }\n\n if (!otherModeMaps) {\n return false;\n }\n\n const otherResult = otherModeMaps.some((otherModeMap) => {\n return jsdocUtils[method](tagName, otherModeMap);\n });\n\n return otherResult ? {\n otherMode: true,\n } : false;\n };\n }\n\n for (const method of [\n 'tagMustHaveNamePosition',\n 'tagMustHaveTypePosition',\n 'tagMissingRequiredTypeOrNamepath',\n ]) {\n utils[method] = (tagName, otherModeMaps) => {\n const result = jsdocUtils[method](tagName);\n if (!result) {\n return false;\n }\n\n // if (!otherModeMaps) { return true; }\n\n const otherResult = otherModeMaps.every((otherModeMap) => {\n return jsdocUtils[method](tagName, otherModeMap);\n });\n\n return otherResult ? true : {\n otherMode: false,\n };\n };\n }\n\n for (const method of [\n 'isNamepathDefiningTag',\n 'tagMightHaveNamepath',\n ]) {\n utils[method] = (tagName) => {\n return jsdocUtils[method](tagName);\n };\n }\n\n utils.getTagStructureForMode = (mde) => {\n return jsdocUtils.getTagStructureForMode(mde, settings.structuredTags);\n };\n\n utils.hasDefinedTypeTag = (tag) => {\n return jsdocUtils.hasDefinedTypeTag(tag);\n };\n\n utils.hasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn) => {\n return jsdocUtils.hasValueOrExecutorHasNonEmptyResolveValue(node, anyPromiseAsReturn);\n };\n\n utils.hasYieldValue = () => {\n if ([\n 'ExportNamedDeclaration', 'ExportDefaultDeclaration',\n ].includes(node.type)) {\n return jsdocUtils.hasYieldValue(node.declaration);\n }\n\n return jsdocUtils.hasYieldValue(node);\n };\n\n utils.hasYieldReturnValue = () => {\n return jsdocUtils.hasYieldValue(node, true);\n };\n\n utils.hasThrowValue = () => {\n return jsdocUtils.hasThrowValue(node);\n };\n\n utils.isAsync = () => {\n return node.async;\n };\n\n utils.getTags = (tagName) => {\n return utils.filterTags((item) => {\n return item.tag === tagName;\n });\n };\n\n utils.getPresentTags = (tagList) => {\n return utils.filterTags((tag) => {\n return tagList.includes(tag.tag);\n });\n };\n\n utils.filterTags = (filter) => {\n return jsdocUtils.filterTags(jsdoc.tags, filter);\n };\n\n utils.getTagsByType = (tags) => {\n return jsdocUtils.getTagsByType(context, mode, tags, tagNamePreference);\n };\n\n utils.hasOptionTag = (tagName) => {\n const {\n tags,\n } = context.options[0] ?? {};\n\n return Boolean(tags && tags.includes(tagName));\n };\n\n utils.getClassNode = () => {\n return [\n ...ancestors, node,\n ].reverse().find((parent) => {\n return parent && [\n 'ClassDeclaration', 'ClassExpression',\n ].includes(parent.type);\n }) || null;\n };\n\n utils.getClassJsdoc = () => {\n const classNode = utils.getClassNode();\n\n if (!classNode) {\n return null;\n }\n\n const classJsdocNode = getJSDocComment(sourceCode, classNode, {\n maxLines,\n minLines,\n });\n\n if (classJsdocNode) {\n const indnt = ' '.repeat(classJsdocNode.loc.start.column);\n\n return parseComment(classJsdocNode, indnt);\n }\n\n return null;\n };\n\n utils.classHasTag = (tagName) => {\n const classJsdoc = utils.getClassJsdoc();\n\n return Boolean(classJsdoc) && jsdocUtils.hasTag(classJsdoc, tagName);\n };\n\n utils.forEachPreferredTag = (tagName, arrayHandler, skipReportingBlockedTag = false) => {\n const targetTagName = utils.getPreferredTagName({\n skipReportingBlockedTag,\n tagName,\n });\n if (!targetTagName ||\n skipReportingBlockedTag && targetTagName && typeof targetTagName === 'object'\n ) {\n return;\n }\n\n const matchingJsdocTags = jsdoc.tags.filter(({\n tag,\n }) => {\n return tag === targetTagName;\n });\n\n for (const matchingJsdocTag of matchingJsdocTags) {\n arrayHandler(matchingJsdocTag, targetTagName);\n }\n };\n\n return utils;\n};\n\nconst getSettings = (context) => {\n /* eslint-disable canonical/sort-keys */\n const settings = {\n // All rules\n ignorePrivate: Boolean(context.settings.jsdoc?.ignorePrivate),\n ignoreInternal: Boolean(context.settings.jsdoc?.ignoreInternal),\n maxLines: Number(context.settings.jsdoc?.maxLines ?? 1),\n minLines: Number(context.settings.jsdoc?.minLines ?? 0),\n\n // `check-tag-names` and many returns/param rules\n tagNamePreference: context.settings.jsdoc?.tagNamePreference ?? {},\n\n // `check-types` and `no-undefined-types`\n preferredTypes: context.settings.jsdoc?.preferredTypes ?? {},\n\n // `check-types`, `no-undefined-types`, `valid-types`\n structuredTags: context.settings.jsdoc?.structuredTags ?? {},\n\n // `require-param`, `require-description`, `require-example`,\n // `require-returns`, `require-throw`, `require-yields`\n overrideReplacesDocs: context.settings.jsdoc?.overrideReplacesDocs,\n ignoreReplacesDocs: context.settings.jsdoc?.ignoreReplacesDocs,\n implementsReplacesDocs: context.settings.jsdoc?.implementsReplacesDocs,\n augmentsExtendsReplacesDocs: context.settings.jsdoc?.augmentsExtendsReplacesDocs,\n\n // Many rules, e.g., `check-tag-names`\n mode: context.settings.jsdoc?.mode ??\n (context.parserPath.includes('@typescript-eslint') ? 'typescript' : 'jsdoc'),\n };\n /* eslint-enable canonical/sort-keys */\n\n jsdocUtils.setTagStructure(settings.mode);\n try {\n jsdocUtils.overrideTagStructure(settings.structuredTags);\n } catch (error) {\n context.report({\n loc: {\n start: {\n column: 1,\n line: 1,\n },\n },\n message: error.message,\n });\n\n return false;\n }\n\n return settings;\n};\n\n/**\n * Create the report function\n *\n * @param {object} context\n * @param {object} commentNode\n */\nconst makeReport = (context, commentNode) => {\n const report = (message, fix = null, jsdocLoc = null, data = null) => {\n let loc;\n\n if (jsdocLoc) {\n if (!('line' in jsdocLoc)) {\n jsdocLoc.line = jsdocLoc.source[0].number;\n }\n\n const lineNumber = commentNode.loc.start.line + jsdocLoc.line;\n\n loc = {\n end: {\n line: lineNumber,\n },\n start: {\n line: lineNumber,\n },\n };\n\n // Todo: Remove ignore once `check-examples` can be restored for ESLint 8+\n // istanbul ignore if\n if (jsdocLoc.column) {\n const colNumber = commentNode.loc.start.column + jsdocLoc.column;\n\n loc.end.column = colNumber;\n loc.start.column = colNumber;\n }\n }\n\n context.report({\n data,\n fix,\n loc,\n message,\n node: commentNode,\n });\n };\n\n return report;\n};\n\n/* eslint-disable jsdoc/no-undefined-types -- Need to build this in; see https://www.typescriptlang.org/docs/handbook/utility-types.html */\n/**\n * @typedef {ReturnType<typeof getUtils>} Utils\n * @typedef {ReturnType<typeof getSettings>} Settings\n * @typedef {(\n * arg: {\n * context: object,\n * sourceCode: object,\n * indent: string,\n * jsdoc: object,\n * jsdocNode: object,\n * node: object | null,\n * report: ReturnType<typeof makeReport>,\n * settings: Settings,\n * utils: Utils,\n * }\n * ) => any } JsdocVisitor\n */\n/* eslint-enable jsdoc/no-undefined-types -- Need to build this in */\n\nconst iterate = (\n info,\n indent, jsdoc,\n ruleConfig, context, lines, jsdocNode, node, settings,\n sourceCode, iterator, state, iteratingAll,\n) => {\n const report = makeReport(context, jsdocNode);\n\n const utils = getUtils(\n node,\n jsdoc,\n jsdocNode,\n settings,\n report,\n context,\n iteratingAll,\n ruleConfig,\n indent,\n );\n\n if (\n !ruleConfig.checkInternal && settings.ignoreInternal &&\n utils.hasTag('internal')\n ) {\n return;\n }\n\n if (\n !ruleConfig.checkPrivate && settings.ignorePrivate &&\n (\n utils.hasTag('private') ||\n jsdoc.tags\n .filter(({\n tag,\n }) => {\n return tag === 'access';\n })\n .some(({\n description,\n }) => {\n return description === 'private';\n })\n )\n ) {\n return;\n }\n\n iterator({\n context,\n globalState,\n indent,\n info,\n iteratingAll,\n jsdoc,\n jsdocNode,\n node,\n report,\n settings,\n sourceCode,\n state,\n utils,\n });\n};\n\nconst getIndentAndJSDoc = function (lines, jsdocNode) {\n const sourceLine = lines[jsdocNode.loc.start.line - 1];\n const indnt = sourceLine.charAt(0).repeat(jsdocNode.loc.start.column);\n const jsdc = parseComment(jsdocNode, indnt);\n\n return [\n indnt, jsdc,\n ];\n};\n\n/**\n * Create an eslint rule that iterates over all JSDocs, regardless of whether\n * they are attached to a function-like node.\n *\n * @param {JsdocVisitor} iterator\n * @param {{meta: any}} ruleConfig\n * @param contexts\n * @param {boolean} additiveContexts\n */\nconst iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {\n const trackedJsdocs = new Set();\n\n let handler;\n let settings;\n const callIterator = (context, node, jsdocNodes, state, lastCall) => {\n const sourceCode = context.getSourceCode();\n const {\n lines,\n } = sourceCode;\n\n const utils = getBasicUtils(context, settings);\n for (const jsdocNode of jsdocNodes) {\n if (!(/^\\/\\*\\*\\s/u).test(sourceCode.getText(jsdocNode))) {\n continue;\n }\n\n const [\n indent,\n jsdoc,\n ] = getIndentAndJSDoc(\n lines, jsdocNode,\n );\n\n if (additiveContexts) {\n for (const [\n idx,\n {\n comment,\n },\n ] of contexts.entries()) {\n if (comment && handler(comment, jsdoc) === false) {\n continue;\n }\n\n iterate(\n {\n comment,\n lastIndex: idx,\n selector: node?.type,\n },\n indent,\n jsdoc,\n ruleConfig,\n context,\n lines,\n jsdocNode,\n node,\n settings,\n sourceCode,\n iterator,\n state,\n true,\n );\n }\n\n continue;\n }\n\n let lastComment;\n let lastIndex;\n // eslint-disable-next-line no-loop-func\n if (contexts && contexts.every(({\n comment,\n }, idx) => {\n lastComment = comment;\n lastIndex = idx;\n\n return comment && handler(comment, jsdoc) === false;\n })) {\n continue;\n }\n\n iterate(\n lastComment ? {\n comment: lastComment,\n lastIndex,\n selector: node?.type,\n } : {\n lastIndex,\n selector: node?.type,\n },\n indent,\n jsdoc,\n ruleConfig,\n context,\n lines,\n jsdocNode,\n node,\n settings,\n sourceCode,\n iterator,\n state,\n true,\n );\n }\n\n if (lastCall && ruleConfig.exit) {\n ruleConfig.exit({\n context,\n state,\n utils,\n });\n }\n };\n\n return {\n create (context) {\n const sourceCode = context.getSourceCode();\n settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n if (contexts) {\n handler = commentHandler(settings);\n }\n\n const state = {};\n\n return {\n '*:not(Program)' (node) {\n const reducedNode = getReducedASTNode(node, sourceCode);\n\n if (node !== reducedNode) {\n return;\n }\n\n const commentNode = getJSDocComment(sourceCode, node, settings);\n if (trackedJsdocs.has(commentNode)) {\n return;\n }\n\n if (!commentNode) {\n if (ruleConfig.nonComment) {\n ruleConfig.nonComment({\n node,\n state,\n });\n }\n\n return;\n }\n\n trackedJsdocs.add(commentNode);\n callIterator(context, node, [\n commentNode,\n ], state);\n },\n 'Program:exit' () {\n const allComments = sourceCode.getAllComments();\n const untrackedJSdoc = allComments.filter((node) => {\n return !trackedJsdocs.has(node);\n });\n\n callIterator(context, null, untrackedJSdoc, state, true);\n },\n };\n },\n meta: ruleConfig.meta,\n };\n};\n\n/**\n * Create an eslint rule that iterates over all JSDocs, regardless of whether\n * they are attached to a function-like node.\n *\n * @param {JsdocVisitor} iterator\n * @param {{meta: any}} ruleConfig\n */\nconst checkFile = (iterator, ruleConfig) => {\n return {\n create (context) {\n const sourceCode = context.getSourceCode();\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n return {\n 'Program:exit' () {\n const allComments = sourceCode.getAllComments();\n const {\n lines,\n } = sourceCode;\n const utils = getBasicUtils(context, settings);\n\n iterator({\n allComments,\n context,\n lines,\n makeReport,\n settings,\n sourceCode,\n utils,\n });\n },\n };\n },\n meta: ruleConfig.meta,\n };\n};\n\nexport {\n getSettings,\n // eslint-disable-next-line unicorn/prefer-export-from -- Avoid experimental parser\n parseComment,\n};\n\n/**\n * @param {JsdocVisitor} iterator\n * @param {{\n * meta: any,\n * contextDefaults?: true | string[],\n * contextSelected?: true,\n * iterateAllJsdocs?: true,\n * }} ruleConfig\n */\nexport default function iterateJsdoc (iterator, ruleConfig) {\n const metaType = ruleConfig?.meta?.type;\n if (!metaType || ![\n 'problem', 'suggestion', 'layout',\n ].includes(metaType)) {\n throw new TypeError('Rule must include `meta.type` option (with value \"problem\", \"suggestion\", or \"layout\")');\n }\n\n if (typeof iterator !== 'function') {\n throw new TypeError('The iterator argument must be a function.');\n }\n\n if (ruleConfig.checkFile) {\n return checkFile(iterator, ruleConfig);\n }\n\n if (ruleConfig.iterateAllJsdocs) {\n return iterateAllJsdocs(iterator, ruleConfig);\n }\n\n return {\n /**\n * The entrypoint for the JSDoc rule.\n *\n * @param {*} context\n * a reference to the context which hold all important information\n * like settings and the sourcecode to check.\n * @returns {object}\n * a list with parser callback function.\n */\n create (context) {\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n let contexts;\n if (ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext) {\n contexts = ruleConfig.matchContext && context.options[0]?.match ?\n context.options[0].match :\n jsdocUtils.enforcedContexts(context, ruleConfig.contextDefaults);\n\n if (contexts) {\n contexts = contexts.map((obj) => {\n if (typeof obj === 'object' && !obj.context) {\n return {\n ...obj,\n context: 'any',\n };\n }\n\n return obj;\n });\n }\n\n const hasPlainAny = contexts?.includes('any');\n const hasObjectAny = !hasPlainAny && contexts?.find((ctxt) => {\n return ctxt?.context === 'any';\n });\n if (hasPlainAny || hasObjectAny) {\n return iterateAllJsdocs(\n iterator, ruleConfig, hasObjectAny ? contexts : null, ruleConfig.matchContext,\n ).create(context);\n }\n }\n\n const sourceCode = context.getSourceCode();\n const {\n lines,\n } = sourceCode;\n\n const state = {};\n\n const checkJsdoc = (info, handler, node) => {\n const jsdocNode = getJSDocComment(sourceCode, node, settings);\n\n if (!jsdocNode) {\n return;\n }\n\n const [\n indent,\n jsdoc,\n ] = getIndentAndJSDoc(\n lines, jsdocNode,\n );\n\n if (\n // Note, `handler` should already be bound in its first argument\n // with these only to be called after the value of\n // `comment`\n handler && handler(jsdoc) === false\n ) {\n return;\n }\n\n iterate(\n info, indent, jsdoc, ruleConfig, context, lines, jsdocNode, node, settings, sourceCode, iterator, state,\n );\n };\n\n let contextObject = {};\n\n if (contexts && (\n ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext\n )) {\n contextObject = jsdocUtils.getContextObject(\n contexts,\n checkJsdoc,\n commentHandler(settings),\n );\n } else {\n for (const prop of [\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n ]) {\n contextObject[prop] = checkJsdoc.bind(null, {\n selector: prop,\n }, null);\n }\n }\n\n if (ruleConfig.exit) {\n contextObject['Program:exit'] = () => {\n ruleConfig.exit({\n context,\n state,\n });\n };\n }\n\n return contextObject;\n },\n meta: ruleConfig.meta,\n };\n}\n"],"file":"iterateJsdoc.js"}
@@ -12,8 +12,20 @@ var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
14
  const strictNativeTypes = ['undefined', 'null', 'boolean', 'number', 'bigint', 'string', 'symbol', 'object', 'Array', 'Function', 'Date', 'RegExp'];
15
-
16
- const adjustNames = (type, preferred, isGenericMatch, nodeName, node, parentNode) => {
15
+ /**
16
+ * Adjusts the parent type node `meta` for generic matches (or type node
17
+ * `type` for `JsdocTypeAny`) and sets the type node `value`.
18
+ *
19
+ * @param {string} type The actual type
20
+ * @param {string} preferred The preferred type
21
+ * @param {boolean} isGenericMatch
22
+ * @param {string} typeNodeName
23
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} node
24
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode
25
+ * @returns {void}
26
+ */
27
+
28
+ const adjustNames = (type, preferred, isGenericMatch, typeNodeName, node, parentNode) => {
17
29
  let ret = preferred;
18
30
 
19
31
  if (isGenericMatch) {
@@ -35,7 +47,7 @@ const adjustNames = (type, preferred, isGenericMatch, nodeName, node, parentNode
35
47
  parentNode.meta.brackets = 'angle';
36
48
  parentNode.meta.dot = false;
37
49
  ret = preferred.slice(0, -2);
38
- } else if (parentNode.meta.brackets === 'square' && (nodeName === '[]' || nodeName === 'Array')) {
50
+ } else if (parentNode.meta.brackets === 'square' && (typeNodeName === '[]' || typeNodeName === 'Array')) {
39
51
  parentNode.meta.brackets = 'angle';
40
52
  parentNode.meta.dot = false;
41
53
  }
@@ -48,7 +60,7 @@ const adjustNames = (type, preferred, isGenericMatch, nodeName, node, parentNode
48
60
  node.value = ret.replace(/(?:\.|<>|\.<>|\[\])$/u, ''); // For bare pseudo-types like `<>`
49
61
 
50
62
  if (!ret) {
51
- node.value = nodeName;
63
+ node.value = typeNodeName;
52
64
  }
53
65
  };
54
66
 
@@ -73,11 +85,21 @@ var _default = (0, _iterateJsdoc.default)(({
73
85
  unifyParentAndChildTypeChecks,
74
86
  exemptTagContexts = []
75
87
  } = context.options[0] || {};
76
-
77
- const getPreferredTypeInfo = (_type, nodeName, parentNode, property) => {
78
- let hasMatchingPreferredType;
79
- let isGenericMatch;
80
- let typeName = nodeName;
88
+ /**
89
+ * Gets information about the preferred type: whether there is a matching
90
+ * preferred type, what the type is, and whether it is a match to a generic.
91
+ *
92
+ * @param {string} _type Not currently in use
93
+ * @param {string} typeNodeName
94
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode
95
+ * @param {string} property
96
+ * @returns {[hasMatchingPreferredType: boolean, typeName: string, isGenericMatch: boolean]}
97
+ */
98
+
99
+ const getPreferredTypeInfo = (_type, typeNodeName, parentNode, property) => {
100
+ let hasMatchingPreferredType = false;
101
+ let isGenericMatch = false;
102
+ let typeName = typeNodeName;
81
103
 
82
104
  if (Object.keys(preferredTypes).length) {
83
105
  const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';
@@ -91,7 +113,7 @@ var _default = (0, _iterateJsdoc.default)(({
91
113
  if (brackets === 'angle') {
92
114
  const checkPostFixes = dot ? ['.', '.<>'] : ['<>'];
93
115
  isGenericMatch = checkPostFixes.some(checkPostFix => {
94
- if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[nodeName + checkPostFix]) !== undefined) {
116
+ if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName + checkPostFix]) !== undefined) {
95
117
  typeName += checkPostFix;
96
118
  return true;
97
119
  }
@@ -113,7 +135,7 @@ var _default = (0, _iterateJsdoc.default)(({
113
135
  }
114
136
  }
115
137
 
116
- const directNameMatch = (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[nodeName]) !== undefined && !Object.values(preferredTypes).includes(nodeName);
138
+ const directNameMatch = (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName]) !== undefined && !Object.values(preferredTypes).includes(typeNodeName);
117
139
  const unifiedSyntaxParentMatch = property && directNameMatch && unifyParentAndChildTypeChecks;
118
140
  isGenericMatch = isGenericMatch || unifiedSyntaxParentMatch;
119
141
  hasMatchingPreferredType = isGenericMatch || directNameMatch && !property;
@@ -121,6 +143,95 @@ var _default = (0, _iterateJsdoc.default)(({
121
143
 
122
144
  return [hasMatchingPreferredType, typeName, isGenericMatch];
123
145
  };
146
+ /**
147
+ * Iterates strict types to see if any should be added to `invalidTypes` (and
148
+ * the the relevant strict type returned as the new preferred type).
149
+ *
150
+ * @param {string} typeNodeName
151
+ * @param {string} preferred
152
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode
153
+ * @param {string[]} invalidTypes
154
+ * @returns {string} The `preferred` type string, optionally changed
155
+ */
156
+
157
+
158
+ const checkNativeTypes = (typeNodeName, preferred, parentNode, invalidTypes) => {
159
+ let changedPreferred = preferred;
160
+
161
+ for (const strictNativeType of strictNativeTypes) {
162
+ if ( // Todo: Avoid typescript condition if moving to default typescript
163
+ strictNativeType === 'object' && mode === 'typescript' && ( // This is not set to remap with exact type match (e.g.,
164
+ // `object: 'Object'`), so can ignore (including if circular)
165
+ !(preferredTypes !== null && preferredTypes !== void 0 && preferredTypes[typeNodeName]) || // Although present on `preferredTypes` for remapping, this is a
166
+ // parent object without a parent match (and not
167
+ // `unifyParentAndChildTypeChecks`) and we don't want
168
+ // `object<>` given TypeScript issue https://github.com/microsoft/TypeScript/issues/20555
169
+ parentNode !== null && parentNode !== void 0 && parentNode.elements.length && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.left.type) === 'JsdocTypeName' && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.left.value) === 'Object')) {
170
+ continue;
171
+ }
172
+
173
+ if (strictNativeType !== typeNodeName && strictNativeType.toLowerCase() === typeNodeName.toLowerCase() && ( // Don't report if user has own map for a strict native type
174
+ !preferredTypes || (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[strictNativeType]) === undefined)) {
175
+ changedPreferred = strictNativeType;
176
+ invalidTypes.push([typeNodeName, changedPreferred]);
177
+ break;
178
+ }
179
+ }
180
+
181
+ return changedPreferred;
182
+ };
183
+ /**
184
+ * Collect invalid type info.
185
+ *
186
+ * @param {string} type
187
+ * @param {string} value
188
+ * @param {string} tagName
189
+ * @param {string} property
190
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} node
191
+ * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode
192
+ * @param {string[]} invalidTypes
193
+ * @returns {void}
194
+ */
195
+
196
+
197
+ const getInvalidTypes = (type, value, tagName, property, node, parentNode, invalidTypes) => {
198
+ let typeNodeName = type === 'JsdocTypeAny' ? '*' : value;
199
+ const [hasMatchingPreferredType, typeName, isGenericMatch] = getPreferredTypeInfo(type, typeNodeName, parentNode, property);
200
+ let preferred;
201
+ let types;
202
+
203
+ if (hasMatchingPreferredType) {
204
+ const preferredSetting = preferredTypes[typeName];
205
+ typeNodeName = typeName === '[]' ? typeName : typeNodeName;
206
+
207
+ if (!preferredSetting) {
208
+ invalidTypes.push([typeNodeName]);
209
+ } else if (typeof preferredSetting === 'string') {
210
+ preferred = preferredSetting;
211
+ invalidTypes.push([typeNodeName, preferred]);
212
+ } else if (typeof preferredSetting === 'object') {
213
+ preferred = preferredSetting === null || preferredSetting === void 0 ? void 0 : preferredSetting.replacement;
214
+ invalidTypes.push([typeNodeName, preferred, preferredSetting === null || preferredSetting === void 0 ? void 0 : preferredSetting.message]);
215
+ } else {
216
+ utils.reportSettings('Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.');
217
+ return;
218
+ }
219
+ } else if (Object.entries(structuredTags).some(([tag, {
220
+ type: typs
221
+ }]) => {
222
+ types = typs;
223
+ return tag === tagName && Array.isArray(types) && !types.includes(typeNodeName);
224
+ })) {
225
+ invalidTypes.push([typeNodeName, types]);
226
+ } else if (!noDefaults && type === 'JsdocTypeName') {
227
+ preferred = checkNativeTypes(typeNodeName, preferred, parentNode, invalidTypes);
228
+ } // For fixer
229
+
230
+
231
+ if (preferred) {
232
+ adjustNames(type, preferred, isGenericMatch, typeNodeName, node, parentNode);
233
+ }
234
+ };
124
235
 
125
236
  for (const jsdocTag of jsdocTagsWithPossibleType) {
126
237
  const invalidTypes = [];
@@ -132,8 +243,7 @@ var _default = (0, _iterateJsdoc.default)(({
132
243
  continue;
133
244
  }
134
245
 
135
- const tagName = jsdocTag.tag; // eslint-disable-next-line complexity -- To refactor
136
-
246
+ const tagName = jsdocTag.tag;
137
247
  (0, _jsdoccomment.traverse)(typeAst, (node, parentNode, property) => {
138
248
  const {
139
249
  type,
@@ -144,64 +254,15 @@ var _default = (0, _iterateJsdoc.default)(({
144
254
  return;
145
255
  }
146
256
 
147
- let nodeName = type === 'JsdocTypeAny' ? '*' : value;
148
- const [hasMatchingPreferredType, typeName, isGenericMatch] = getPreferredTypeInfo(type, nodeName, parentNode, property);
149
- let preferred;
150
- let types;
151
-
152
- if (hasMatchingPreferredType) {
153
- const preferredSetting = preferredTypes[typeName];
154
- nodeName = typeName === '[]' ? typeName : nodeName;
155
-
156
- if (!preferredSetting) {
157
- invalidTypes.push([nodeName]);
158
- } else if (typeof preferredSetting === 'string') {
159
- preferred = preferredSetting;
160
- invalidTypes.push([nodeName, preferred]);
161
- } else if (typeof preferredSetting === 'object') {
162
- preferred = preferredSetting === null || preferredSetting === void 0 ? void 0 : preferredSetting.replacement;
163
- invalidTypes.push([nodeName, preferred, preferredSetting === null || preferredSetting === void 0 ? void 0 : preferredSetting.message]);
164
- } else {
165
- utils.reportSettings('Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.');
166
- return;
167
- }
168
- } else if (Object.entries(structuredTags).some(([tag, {
169
- type: typs
170
- }]) => {
171
- types = typs;
172
- return tag === tagName && Array.isArray(types) && !types.includes(nodeName);
173
- })) {
174
- invalidTypes.push([nodeName, types]);
175
- } else if (!noDefaults && type === 'JsdocTypeName') {
176
- for (const strictNativeType of strictNativeTypes) {
177
- if ( // Todo: Avoid typescript condition if moving to default typescript
178
- strictNativeType === 'object' && mode === 'typescript' && ( // This is not set to remap with exact type match (e.g.,
179
- // `object: 'Object'`), so can ignore (including if circular)
180
- !(preferredTypes !== null && preferredTypes !== void 0 && preferredTypes[nodeName]) || // Although present on `preferredTypes` for remapping, this is a
181
- // parent object without a parent match (and not
182
- // `unifyParentAndChildTypeChecks`) and we don't want
183
- // `object<>` given TypeScript issue https://github.com/microsoft/TypeScript/issues/20555
184
- parentNode !== null && parentNode !== void 0 && parentNode.elements.length && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.left.type) === 'JsdocTypeName' && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.left.value) === 'Object')) {
185
- continue;
186
- }
187
-
188
- if (strictNativeType !== nodeName && strictNativeType.toLowerCase() === nodeName.toLowerCase() && ( // Don't report if user has own map for a strict native type
189
- !preferredTypes || (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[strictNativeType]) === undefined)) {
190
- preferred = strictNativeType;
191
- invalidTypes.push([nodeName, preferred]);
192
- break;
193
- }
194
- }
195
- } // For fixer
196
-
197
-
198
- if (preferred) {
199
- adjustNames(type, preferred, isGenericMatch, nodeName, node, parentNode);
200
- }
257
+ getInvalidTypes(type, value, tagName, property, node, parentNode, invalidTypes);
201
258
  });
202
259
 
203
260
  if (invalidTypes.length) {
204
261
  const fixedType = (0, _jsdoccomment.stringify)(typeAst);
262
+ /**
263
+ * @param {any} fixer The ESLint fixer
264
+ * @returns {string}
265
+ */
205
266
 
206
267
  const fix = fixer => {
207
268
  return fixer.replaceText(jsdocNode, sourceCode.getText(jsdocNode).replace(`{${jsdocTag.type}}`, `{${fixedType}}`));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/rules/checkTypes.js"],"names":["strictNativeTypes","adjustNames","type","preferred","isGenericMatch","nodeName","node","parentNode","ret","meta","brackets","dot","dotBracketEnd","match","slice","length","bracketEnd","endsWith","value","replace","jsdocNode","sourceCode","report","utils","settings","context","jsdocTagsWithPossibleType","filterTags","tag","tagMightHaveTypePosition","preferredTypes","structuredTags","mode","noDefaults","unifyParentAndChildTypeChecks","exemptTagContexts","options","getPreferredTypeInfo","_type","property","hasMatchingPreferredType","typeName","Object","keys","isNameOfGeneric","undefined","checkPostFixes","some","checkPostFix","directNameMatch","values","includes","unifiedSyntaxParentMatch","jsdocTag","invalidTypes","typeAst","tagName","types","preferredSetting","push","replacement","message","reportSettings","entries","typs","Array","isArray","strictNativeType","elements","left","toLowerCase","fixedType","fix","fixer","replaceText","getText","badType","preferredType","tagValue","name","JSON","stringify","iterateAllJsdocs","docs","description","url","fixable","schema","additionalProperties","properties","items","oneOf"],"mappings":";;;;;;;AAAA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG,CACxB,WADwB,EAExB,MAFwB,EAGxB,SAHwB,EAIxB,QAJwB,EAKxB,QALwB,EAMxB,QANwB,EAOxB,QAPwB,EAQxB,QARwB,EASxB,OATwB,EAUxB,UAVwB,EAWxB,MAXwB,EAYxB,QAZwB,CAA1B;;AAeA,MAAMC,WAAW,GAAG,CAACC,IAAD,EAAOC,SAAP,EAAkBC,cAAlB,EAAkCC,QAAlC,EAA4CC,IAA5C,EAAkDC,UAAlD,KAAiE;AACnF,MAAIC,GAAG,GAAGL,SAAV;;AACA,MAAIC,cAAJ,EAAoB;AAClB,QAAID,SAAS,KAAK,IAAlB,EAAwB;AACtBI,MAAAA,UAAU,CAACE,IAAX,CAAgBC,QAAhB,GAA2B,QAA3B;AACAH,MAAAA,UAAU,CAACE,IAAX,CAAgBE,GAAhB,GAAsB,KAAtB;AACAH,MAAAA,GAAG,GAAG,OAAN;AACD,KAJD,MAIO;AACL,YAAMI,aAAa,GAAGT,SAAS,CAACU,KAAV,CAAgB,aAAhB,CAAtB;;AACA,UAAID,aAAJ,EAAmB;AACjBL,QAAAA,UAAU,CAACE,IAAX,CAAgBC,QAAhB,GAA2B,OAA3B;AACAH,QAAAA,UAAU,CAACE,IAAX,CAAgBE,GAAhB,GAAsB,IAAtB;AACAH,QAAAA,GAAG,GAAGL,SAAS,CAACW,KAAV,CAAgB,CAAhB,EAAmB,CAACF,aAAa,CAAC,CAAD,CAAb,CAAiBG,MAArC,CAAN;AACD,OAJD,MAIO;AACL,cAAMC,UAAU,GAAGb,SAAS,CAACc,QAAV,CAAmB,IAAnB,CAAnB;;AACA,YAAID,UAAJ,EAAgB;AACdT,UAAAA,UAAU,CAACE,I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IAAI,EAAE;AADuB;AA7BrB,OAFd;AAmCEA,MAAAA,IAAI,EAAE;AAnCR,KADM,CANJ;AA6CJA,IAAAA,IAAI,EAAE;AA7CF;AAFL,CAtPY,C","sourcesContent":["import {\n parse,\n stringify,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\nimport iterateJsdoc from '../iterateJsdoc';\n\nconst strictNativeTypes = [\n 'undefined',\n 'null',\n 'boolean',\n 'number',\n 'bigint',\n 'string',\n 'symbol',\n 'object',\n 'Array',\n 'Function',\n 'Date',\n 'RegExp',\n];\n\nconst adjustNames = (type, preferred, isGenericMatch, nodeName, node, parentNode) => {\n let ret = preferred;\n if (isGenericMatch) {\n if (preferred === '[]') {\n parentNode.meta.brackets = 'square';\n parentNode.meta.dot = false;\n ret = 'Array';\n } else {\n const dotBracketEnd = preferred.match(/\\.(?:<>)?$/u);\n if (dotBracketEnd) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = true;\n ret = preferred.slice(0, -dotBracketEnd[0].length);\n } else {\n const bracketEnd = preferred.endsWith('<>');\n if (bracketEnd) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = false;\n ret = preferred.slice(0, -2);\n } else if (\n parentNode.meta.brackets === 'square' &&\n (nodeName === '[]' || nodeName === 'Array')\n ) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = false;\n }\n }\n }\n } else if (type === 'JsdocTypeAny') {\n node.type = 'JsdocTypeName';\n }\n\n node.value = ret.replace(/(?:\\.|<>|\\.<>|\\[\\])$/u, '');\n\n // For bare pseudo-types like `<>`\n if (!ret) {\n node.value = nodeName;\n }\n};\n\nexport default iterateJsdoc(({\n jsdocNode,\n sourceCode,\n report,\n utils,\n settings,\n context,\n}) => {\n const jsdocTagsWithPossibleType = utils.filterTags((tag) => {\n return utils.tagMightHaveTypePosition(tag.tag);\n });\n\n const {\n preferredTypes,\n structuredTags,\n mode,\n } = settings;\n const {\n noDefaults,\n unifyParentAndChildTypeChecks,\n exemptTagContexts = [],\n } = context.options[0] || {};\n\n const getPreferredTypeInfo = (_type, nodeName, parentNode, property) => {\n let hasMatchingPreferredType;\n let isGenericMatch;\n let typeName = nodeName;\n if (Object.keys(preferredTypes).length) {\n const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';\n if (unifyParentAndChildTypeChecks || isNameOfGeneric) {\n const brackets = parentNode?.meta?.brackets;\n const dot = parentNode?.meta?.dot;\n\n if (brackets === 'angle') {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n '<>',\n ];\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n if (preferredTypes?.[nodeName + checkPostFix] !== undefined) {\n typeName += checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n if (!isGenericMatch && property) {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n brackets === 'angle' ? '<>' : '[]',\n ];\n\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n if (preferredTypes?.[checkPostFix] !== undefined) {\n typeName = checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n }\n\n const directNameMatch = preferredTypes?.[nodeName] !== undefined &&\n !Object.values(preferredTypes).includes(nodeName);\n const unifiedSyntaxParentMatch = property && directNameMatch && unifyParentAndChildTypeChecks;\n isGenericMatch = isGenericMatch || unifiedSyntaxParentMatch;\n\n hasMatchingPreferredType = isGenericMatch ||\n directNameMatch && !property;\n }\n\n return [\n hasMatchingPreferredType, typeName, isGenericMatch,\n ];\n };\n\n for (const jsdocTag of jsdocTagsWithPossibleType) {\n const invalidTypes = [];\n let typeAst;\n\n try {\n typeAst = mode === 'permissive' ? tryParse(jsdocTag.type) : parse(jsdocTag.type, mode);\n } catch {\n continue;\n }\n\n const tagName = jsdocTag.tag;\n\n // eslint-disable-next-line complexity -- To refactor\n traverse(typeAst, (node, parentNode, property) => {\n const {\n type,\n value,\n } = node;\n if (![\n 'JsdocTypeName', 'JsdocTypeAny',\n ].includes(type)) {\n return;\n }\n\n let nodeName = type === 'JsdocTypeAny' ? '*' : value;\n\n const [\n hasMatchingPreferredType,\n typeName,\n isGenericMatch,\n ] = getPreferredTypeInfo(type, nodeName, parentNode, property);\n\n let preferred;\n let types;\n if (hasMatchingPreferredType) {\n const preferredSetting = preferredTypes[typeName];\n nodeName = typeName === '[]' ? typeName : nodeName;\n\n if (!preferredSetting) {\n invalidTypes.push([\n nodeName,\n ]);\n } else if (typeof preferredSetting === 'string') {\n preferred = preferredSetting;\n invalidTypes.push([\n nodeName, preferred,\n ]);\n } else if (typeof preferredSetting === 'object') {\n preferred = preferredSetting?.replacement;\n invalidTypes.push([\n nodeName,\n preferred,\n preferredSetting?.message,\n ]);\n } else {\n utils.reportSettings(\n 'Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.',\n );\n\n return;\n }\n } else if (Object.entries(structuredTags).some(([\n tag,\n {\n type: typs,\n },\n ]) => {\n types = typs;\n\n return tag === tagName &&\n Array.isArray(types) &&\n !types.includes(nodeName);\n })) {\n invalidTypes.push([\n nodeName, types,\n ]);\n } else if (!noDefaults && type === 'JsdocTypeName') {\n for (const strictNativeType of strictNativeTypes) {\n if (\n // Todo: Avoid typescript condition if moving to default typescript\n strictNativeType === 'object' && mode === 'typescript' &&\n (\n // This is not set to remap with exact type match (e.g.,\n // `object: 'Object'`), so can ignore (including if circular)\n !preferredTypes?.[nodeName] ||\n // Although present on `preferredTypes` for remapping, this is a\n // parent object without a parent match (and not\n // `unifyParentAndChildTypeChecks`) and we don't want\n // `object<>` given TypeScript issue https://github.com/microsoft/TypeScript/issues/20555\n parentNode?.elements.length && (\n parentNode?.left.type === 'JsdocTypeName' &&\n parentNode?.left.value === 'Object'\n )\n )\n ) {\n continue;\n }\n\n if (strictNativeType !== nodeName &&\n strictNativeType.toLowerCase() === nodeName.toLowerCase() &&\n\n // Don't report if user has own map for a strict native type\n (!preferredTypes || preferredTypes?.[strictNativeType] === undefined)\n ) {\n preferred = strictNativeType;\n invalidTypes.push([\n nodeName, preferred,\n ]);\n break;\n }\n }\n }\n\n // For fixer\n if (preferred) {\n adjustNames(type, preferred, isGenericMatch, nodeName, node, parentNode);\n }\n });\n\n if (invalidTypes.length) {\n const fixedType = stringify(typeAst);\n\n const fix = (fixer) => {\n return fixer.replaceText(\n jsdocNode,\n sourceCode.getText(jsdocNode).replace(\n `{${jsdocTag.type}}`,\n `{${fixedType}}`,\n ),\n );\n };\n\n for (const [\n badType,\n preferredType = '',\n message,\n ] of invalidTypes) {\n const tagValue = jsdocTag.name ? ` \"${jsdocTag.name}\"` : '';\n if (exemptTagContexts.some(({\n tag,\n types,\n }) => {\n return tag === tagName &&\n (types === true || types.includes(jsdocTag.type));\n })) {\n continue;\n }\n\n report(\n message ||\n `Invalid JSDoc @${tagName}${tagValue} type \"${badType}\"` +\n (preferredType ? '; ' : '.') +\n (preferredType ? `prefer: ${JSON.stringify(preferredType)}.` : ''),\n preferredType ? fix : null,\n jsdocTag,\n message ? {\n tagName,\n tagValue,\n } : null,\n );\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports invalid types.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n exemptTagContexts: {\n items: {\n additionalProperties: false,\n properties: {\n tag: {\n type: 'string',\n },\n types: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n ],\n },\n },\n type: 'object',\n },\n type: 'array',\n },\n noDefaults: {\n type: 'boolean',\n },\n unifyParentAndChildTypeChecks: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"file":"checkTypes.js"}
1
+ {"version":3,"sources":["../../src/rules/checkTypes.js"],"names":["strictNativeTypes","adjustNames","type","preferred","isGenericMatch","typeNodeName","node","parentNode","ret","meta","brackets","dot","dotBracketEnd","match","slice","length","bracketEnd","endsWith","value","replace","jsdocNode","sourceCode","report","utils","settings","context","jsdocTagsWithPossibleType","filterTags","tag","tagMightHaveTypePosition","preferredTypes","structuredTags","mode","noDefaults","unifyParentAndChildTypeChecks","exemptTagContexts","options","getPreferredTypeInfo","_type","property","hasMatchingPreferredType","typeName","Object","keys","isNameOfGeneric","undefined","checkPostFixes","some","checkPostFix","directNameMatch","values","includes","unifiedSyntaxParentMatch","checkNativeTypes","invalidTypes","changedPreferred","strictNativeType","elements","left","toLowerCase","push","getInvalidTypes","tagName","types","preferredSetting","replacement","message","reportSettings","entries","typs","Array","isArray","jsdocTag","typeAst","fixedType","fix","fixer","replaceText","getText","badType","preferredType","tagValue","name","JSON","stringify","iterateAllJsdocs","docs","description","url","fixable","schema","additionalProperties","properties","items","oneOf"],"mappings":";;;;;;;AAAA;;AAMA;;;;AAEA,MAAMA,iBAAiB,GAAG,CACxB,WADwB,EAExB,MAFwB,EAGxB,SAHwB,EAIxB,QAJwB,EAKxB,QALwB,EAMxB,QANwB,EAOxB,QAPwB,EAQxB,QARwB,EASxB,OATwB,EAUxB,UAVwB,EAWxB,MAXwB,EAYxB,QAZwB,CAA1B;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,WAAW,GAAG,CAACC,IAAD,EAAOC,SAAP,EAAkBC,cAAlB,EAAkCC,YAAlC,EAAgDC,IAAhD,EAAsDC,UAAtD,KAAqE;AACvF,MAAIC,GAAG,GAAGL,SAAV;;AACA,MAAIC,cAAJ,EAAoB;AAClB,QAAID,SAAS,KAAK,IAAlB,EAAwB;AACtBI,MAAAA,UAAU,CAACE,IAAX,CAAgBC,QAAhB,GAA2B,QAA3B;AACAH,MAAAA,UAAU,CAACE,IAAX,CAAgBE,GAAhB,GAAsB,KAAtB;AACAH,MAAAA,GAAG,GAAG,OAAN;AACD,KAJD,MAIO;AACL,YAAMI,aAAa,GAAGT,SAAS,CAACU,KAAV,CAAgB,aAAh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J;AA6CJA,IAAAA,IAAI,EAAE;AA7CF;AAFL,CApSY,C","sourcesContent":["import {\n parse,\n stringify,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\nimport iterateJsdoc from '../iterateJsdoc';\n\nconst strictNativeTypes = [\n 'undefined',\n 'null',\n 'boolean',\n 'number',\n 'bigint',\n 'string',\n 'symbol',\n 'object',\n 'Array',\n 'Function',\n 'Date',\n 'RegExp',\n];\n\n/**\n * Adjusts the parent type node `meta` for generic matches (or type node\n * `type` for `JsdocTypeAny`) and sets the type node `value`.\n *\n * @param {string} type The actual type\n * @param {string} preferred The preferred type\n * @param {boolean} isGenericMatch\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} node\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode\n * @returns {void}\n */\nconst adjustNames = (type, preferred, isGenericMatch, typeNodeName, node, parentNode) => {\n let ret = preferred;\n if (isGenericMatch) {\n if (preferred === '[]') {\n parentNode.meta.brackets = 'square';\n parentNode.meta.dot = false;\n ret = 'Array';\n } else {\n const dotBracketEnd = preferred.match(/\\.(?:<>)?$/u);\n if (dotBracketEnd) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = true;\n ret = preferred.slice(0, -dotBracketEnd[0].length);\n } else {\n const bracketEnd = preferred.endsWith('<>');\n if (bracketEnd) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = false;\n ret = preferred.slice(0, -2);\n } else if (\n parentNode.meta.brackets === 'square' &&\n (typeNodeName === '[]' || typeNodeName === 'Array')\n ) {\n parentNode.meta.brackets = 'angle';\n parentNode.meta.dot = false;\n }\n }\n }\n } else if (type === 'JsdocTypeAny') {\n node.type = 'JsdocTypeName';\n }\n\n node.value = ret.replace(/(?:\\.|<>|\\.<>|\\[\\])$/u, '');\n\n // For bare pseudo-types like `<>`\n if (!ret) {\n node.value = typeNodeName;\n }\n};\n\nexport default iterateJsdoc(({\n jsdocNode,\n sourceCode,\n report,\n utils,\n settings,\n context,\n}) => {\n const jsdocTagsWithPossibleType = utils.filterTags((tag) => {\n return utils.tagMightHaveTypePosition(tag.tag);\n });\n\n const {\n preferredTypes,\n structuredTags,\n mode,\n } = settings;\n const {\n noDefaults,\n unifyParentAndChildTypeChecks,\n exemptTagContexts = [],\n } = context.options[0] || {};\n\n /**\n * Gets information about the preferred type: whether there is a matching\n * preferred type, what the type is, and whether it is a match to a generic.\n *\n * @param {string} _type Not currently in use\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode\n * @param {string} property\n * @returns {[hasMatchingPreferredType: boolean, typeName: string, isGenericMatch: boolean]}\n */\n const getPreferredTypeInfo = (_type, typeNodeName, parentNode, property) => {\n let hasMatchingPreferredType = false;\n let isGenericMatch = false;\n let typeName = typeNodeName;\n if (Object.keys(preferredTypes).length) {\n const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';\n if (unifyParentAndChildTypeChecks || isNameOfGeneric) {\n const brackets = parentNode?.meta?.brackets;\n const dot = parentNode?.meta?.dot;\n\n if (brackets === 'angle') {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n '<>',\n ];\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n if (preferredTypes?.[typeNodeName + checkPostFix] !== undefined) {\n typeName += checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n if (!isGenericMatch && property) {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n brackets === 'angle' ? '<>' : '[]',\n ];\n\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n if (preferredTypes?.[checkPostFix] !== undefined) {\n typeName = checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n }\n\n const directNameMatch = preferredTypes?.[typeNodeName] !== undefined &&\n !Object.values(preferredTypes).includes(typeNodeName);\n const unifiedSyntaxParentMatch = property && directNameMatch && unifyParentAndChildTypeChecks;\n isGenericMatch = isGenericMatch || unifiedSyntaxParentMatch;\n\n hasMatchingPreferredType = isGenericMatch ||\n directNameMatch && !property;\n }\n\n return [\n hasMatchingPreferredType, typeName, isGenericMatch,\n ];\n };\n\n /**\n * Iterates strict types to see if any should be added to `invalidTypes` (and\n * the the relevant strict type returned as the new preferred type).\n *\n * @param {string} typeNodeName\n * @param {string} preferred\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode\n * @param {string[]} invalidTypes\n * @returns {string} The `preferred` type string, optionally changed\n */\n const checkNativeTypes = (typeNodeName, preferred, parentNode, invalidTypes) => {\n let changedPreferred = preferred;\n for (const strictNativeType of strictNativeTypes) {\n if (\n // Todo: Avoid typescript condition if moving to default typescript\n strictNativeType === 'object' && mode === 'typescript' &&\n (\n // This is not set to remap with exact type match (e.g.,\n // `object: 'Object'`), so can ignore (including if circular)\n !preferredTypes?.[typeNodeName] ||\n // Although present on `preferredTypes` for remapping, this is a\n // parent object without a parent match (and not\n // `unifyParentAndChildTypeChecks`) and we don't want\n // `object<>` given TypeScript issue https://github.com/microsoft/TypeScript/issues/20555\n parentNode?.elements.length && (\n parentNode?.left.type === 'JsdocTypeName' &&\n parentNode?.left.value === 'Object'\n )\n )\n ) {\n continue;\n }\n\n if (strictNativeType !== typeNodeName &&\n strictNativeType.toLowerCase() === typeNodeName.toLowerCase() &&\n\n // Don't report if user has own map for a strict native type\n (!preferredTypes || preferredTypes?.[strictNativeType] === undefined)\n ) {\n changedPreferred = strictNativeType;\n invalidTypes.push([\n typeNodeName, changedPreferred,\n ]);\n break;\n }\n }\n\n return changedPreferred;\n };\n\n /**\n * Collect invalid type info.\n *\n * @param {string} type\n * @param {string} value\n * @param {string} tagName\n * @param {string} property\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} node\n * @param {import('jsdoc-type-pratt-parser/dist/src/index.d.ts').NonTerminalResult} parentNode\n * @param {string[]} invalidTypes\n * @returns {void}\n */\n const getInvalidTypes = (type, value, tagName, property, node, parentNode, invalidTypes) => {\n let typeNodeName = type === 'JsdocTypeAny' ? '*' : value;\n\n const [\n hasMatchingPreferredType,\n typeName,\n isGenericMatch,\n ] = getPreferredTypeInfo(type, typeNodeName, parentNode, property);\n\n let preferred;\n let types;\n if (hasMatchingPreferredType) {\n const preferredSetting = preferredTypes[typeName];\n typeNodeName = typeName === '[]' ? typeName : typeNodeName;\n\n if (!preferredSetting) {\n invalidTypes.push([\n typeNodeName,\n ]);\n } else if (typeof preferredSetting === 'string') {\n preferred = preferredSetting;\n invalidTypes.push([\n typeNodeName, preferred,\n ]);\n } else if (typeof preferredSetting === 'object') {\n preferred = preferredSetting?.replacement;\n invalidTypes.push([\n typeNodeName,\n preferred,\n preferredSetting?.message,\n ]);\n } else {\n utils.reportSettings(\n 'Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.',\n );\n\n return;\n }\n } else if (Object.entries(structuredTags).some(([\n tag,\n {\n type: typs,\n },\n ]) => {\n types = typs;\n\n return tag === tagName &&\n Array.isArray(types) &&\n !types.includes(typeNodeName);\n })) {\n invalidTypes.push([\n typeNodeName, types,\n ]);\n } else if (!noDefaults && type === 'JsdocTypeName') {\n preferred = checkNativeTypes(typeNodeName, preferred, parentNode, invalidTypes);\n }\n\n // For fixer\n if (preferred) {\n adjustNames(type, preferred, isGenericMatch, typeNodeName, node, parentNode);\n }\n };\n\n for (const jsdocTag of jsdocTagsWithPossibleType) {\n const invalidTypes = [];\n let typeAst;\n\n try {\n typeAst = mode === 'permissive' ? tryParse(jsdocTag.type) : parse(jsdocTag.type, mode);\n } catch {\n continue;\n }\n\n const tagName = jsdocTag.tag;\n\n traverse(typeAst, (node, parentNode, property) => {\n const {\n type,\n value,\n } = node;\n if (![\n 'JsdocTypeName', 'JsdocTypeAny',\n ].includes(type)) {\n return;\n }\n\n getInvalidTypes(type, value, tagName, property, node, parentNode, invalidTypes);\n });\n\n if (invalidTypes.length) {\n const fixedType = stringify(typeAst);\n\n /**\n * @param {any} fixer The ESLint fixer\n * @returns {string}\n */\n const fix = (fixer) => {\n return fixer.replaceText(\n jsdocNode,\n sourceCode.getText(jsdocNode).replace(\n `{${jsdocTag.type}}`,\n `{${fixedType}}`,\n ),\n );\n };\n\n for (const [\n badType,\n preferredType = '',\n message,\n ] of invalidTypes) {\n const tagValue = jsdocTag.name ? ` \"${jsdocTag.name}\"` : '';\n if (exemptTagContexts.some(({\n tag,\n types,\n }) => {\n return tag === tagName &&\n (types === true || types.includes(jsdocTag.type));\n })) {\n continue;\n }\n\n report(\n message ||\n `Invalid JSDoc @${tagName}${tagValue} type \"${badType}\"` +\n (preferredType ? '; ' : '.') +\n (preferredType ? `prefer: ${JSON.stringify(preferredType)}.` : ''),\n preferredType ? fix : null,\n jsdocTag,\n message ? {\n tagName,\n tagValue,\n } : null,\n );\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports invalid types.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n exemptTagContexts: {\n items: {\n additionalProperties: false,\n properties: {\n tag: {\n type: 'string',\n },\n types: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n ],\n },\n },\n type: 'object',\n },\n type: 'array',\n },\n noDefaults: {\n type: 'boolean',\n },\n unifyParentAndChildTypeChecks: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"file":"checkTypes.js"}
package/dist/tagNames.js CHANGED
@@ -84,6 +84,8 @@ const jsdocTags = { ...jsdocTagsUndocumented,
84
84
  };
85
85
  exports.jsdocTags = jsdocTags;
86
86
  const typeScriptTags = { ...jsdocTags,
87
+ // https://www.typescriptlang.org/tsconfig/#stripInternal
88
+ internal: [],
87
89
  // `@template` is also in TypeScript per:
88
90
  // https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc
89
91
  template: []
@@ -108,6 +110,7 @@ const undocumentedClosureTags = {
108
110
  const {
109
111
  /* eslint-disable no-unused-vars */
110
112
  inheritdoc,
113
+ internal,
111
114
  // Will be inverted to prefer `return`
112
115
  returns,
113
116
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tagNames.js"],"names":["jsdocTagsUndocumented","modifies","jsdocTags","abstract","access","alias","async","augments","author","borrows","callback","class","classdesc","constant","constructs","copyright","default","deprecated","description","enum","event","example","exports","external","file","fires","function","generator","global","hideconstructor","ignore","implements","inheritdoc","inheritDoc","inner","instance","interface","kind","lends","license","listens","member","memberof","mixes","mixin","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","this","throws","todo","tutorial","type","typedef","variation","version","yields","typeScriptTags","template","undocumentedClosureTags","closurePrimitive","customElement","expose","hidden","idGenerator","meaning","mixinClass","mixinFunction","ngInject","owner","typeSummary","wizaction","typeScriptTagsInClosure","closureTags","define","dict","export","externs","final","implicitCast","noalias","nocollapse","nocompile","noinline","nosideeffects","polymer","polymerBehavior","preserve","record","return","struct","suppress","unrestricted"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB,GAAG;AAC5B;AACA;AACA;AACAC,EAAAA,QAAQ,EAAE;AAJkB,CAA9B;AAOA,MAAMC,SAAS,GAAG,EAChB,GAAGF,qBADa;AAEhBG,EAAAA,QAAQ,EAAE,CACR,SADQ,CAFM;AAKhBC,EAAAA,MAAM,EAAE,EALQ;AAMhBC,EAAAA,KAAK,EAAE,EANS;AAOhBC,EAAAA,KAAK,EAAE,EAPS;AAQhBC,EAAAA,QAAQ,EAAE,CACR,SADQ,CARM;AAWhBC,EAAAA,MAAM,EAAE,EAXQ;AAYhBC,EAAAA,OAAO,EAAE,EAZO;AAahBC,EAAAA,QAAQ,EAAE,EAbM;AAchBC,EAAAA,KAAK,EAAE,CACL,aADK,CAdS;AAiBhB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AnCU;AAoClBC,EAAAA,QAAQ,EAAE,EApCQ;AAsClBC,EAAAA,YAAY,EAAE;AAtCI,CAApB","sourcesContent":["const jsdocTagsUndocumented = {\n // Undocumented but present; see\n // https://github.com/jsdoc/jsdoc/issues/1283#issuecomment-516816802\n // https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594\n modifies: [],\n};\n\nconst jsdocTags = {\n ...jsdocTagsUndocumented,\n abstract: [\n 'virtual',\n ],\n access: [],\n alias: [],\n async: [],\n augments: [\n 'extends',\n ],\n author: [],\n borrows: [],\n callback: [],\n class: [\n 'constructor',\n ],\n classdesc: [],\n constant: [\n 'const',\n ],\n constructs: [],\n copyright: [],\n default: [\n 'defaultvalue',\n ],\n deprecated: [],\n description: [\n 'desc',\n ],\n enum: [],\n event: [],\n example: [],\n exports: [],\n external: [\n 'host',\n ],\n file: [\n 'fileoverview',\n 'overview',\n ],\n fires: [\n 'emits',\n ],\n function: [\n 'func',\n 'method',\n ],\n generator: [],\n global: [],\n hideconstructor: [],\n ignore: [],\n implements: [],\n inheritdoc: [],\n\n // Allowing casing distinct from jsdoc `definitions.js` (required in Closure)\n inheritDoc: [],\n\n inner: [],\n instance: [],\n interface: [],\n kind: [],\n lends: [],\n license: [],\n listens: [],\n member: [\n 'var',\n ],\n memberof: [],\n 'memberof!': [],\n mixes: [],\n mixin: [],\n\n module: [],\n name: [],\n namespace: [],\n override: [],\n package: [],\n param: [\n 'arg',\n 'argument',\n ],\n private: [],\n property: [\n 'prop',\n ],\n protected: [],\n public: [],\n readonly: [],\n requires: [],\n returns: [\n 'return',\n ],\n see: [],\n since: [],\n static: [],\n summary: [],\n\n this: [],\n throws: [\n 'exception',\n ],\n todo: [],\n tutorial: [],\n type: [],\n typedef: [],\n variation: [],\n version: [],\n yields: [\n 'yield',\n ],\n};\n\nconst typeScriptTags = {\n ...jsdocTags,\n\n // `@template` is also in TypeScript per:\n // https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc\n template: [],\n};\n\nconst undocumentedClosureTags = {\n // These are in Closure source but not in jsdoc source nor in the Closure\n // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java\n closurePrimitive: [],\n customElement: [],\n expose: [],\n hidden: [],\n idGenerator: [],\n meaning: [],\n mixinClass: [],\n mixinFunction: [],\n ngInject: [],\n owner: [],\n typeSummary: [],\n wizaction: [],\n};\n\nconst {\n /* eslint-disable no-unused-vars */\n inheritdoc,\n\n // Will be inverted to prefer `return`\n returns,\n /* eslint-enable no-unused-vars */\n ...typeScriptTagsInClosure\n} = typeScriptTags;\n\nconst closureTags = {\n ...typeScriptTagsInClosure,\n ...undocumentedClosureTags,\n\n // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler\n // These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js\n // except for the experimental `noinline` and the casing differences noted below\n\n // Defined as a synonym of `const` in jsdoc `definitions.js`\n define: [],\n\n dict: [],\n export: [],\n externs: [],\n final: [],\n\n // With casing distinct from jsdoc `definitions.js`\n implicitCast: [],\n\n noalias: [],\n nocollapse: [],\n nocompile: [],\n noinline: [],\n nosideeffects: [],\n polymer: [],\n polymerBehavior: [],\n preserve: [],\n\n // Defined as a synonym of `interface` in jsdoc `definitions.js`\n record: [],\n\n return: [\n 'returns',\n ],\n\n struct: [],\n suppress: [],\n\n unrestricted: [],\n};\n\nexport {\n jsdocTags,\n closureTags,\n typeScriptTags,\n};\n"],"file":"tagNames.js"}
1
+ {"version":3,"sources":["../src/tagNames.js"],"names":["jsdocTagsUndocumented","modifies","jsdocTags","abstract","access","alias","async","augments","author","borrows","callback","class","classdesc","constant","constructs","copyright","default","deprecated","description","enum","event","example","exports","external","file","fires","function","generator","global","hideconstructor","ignore","implements","inheritdoc","inheritDoc","inner","instance","interface","kind","lends","license","listens","member","memberof","mixes","mixin","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","this","throws","todo","tutorial","type","typedef","variation","version","yields","typeScriptTags","internal","template","undocumentedClosureTags","closurePrimitive","customElement","expose","hidden","idGenerator","meaning","mixinClass","mixinFunction","ngInject","owner","typeSummary","wizaction","typeScriptTagsInClosure","closureTags","define","dict","export","externs","final","implicitCast","noalias","nocollapse","nocompile","noinline","nosideeffects","polymer","polymerBehavior","preserve","record","return","struct","suppress","unrestricted"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB,GAAG;AAC5B;AACA;AACA;AACAC,EAAAA,QAAQ,EAAE;AAJkB,CAA9B;AAOA,MAAMC,SAAS,GAAG,EAChB,GAAGF,qBADa;AAEhBG,EAAAA,QAAQ,EAAE,CACR,SADQ,CAFM;AAKhBC,EAAAA,MAAM,EAAE,EALQ;AAMhBC,EAAAA,KAAK,EAAE,EANS;AAOhBC,EAAAA,KAAK,EAAE,EAPS;AAQhBC,EAAAA,QAAQ,EAAE,CACR,SADQ,CARM;AAWhBC,EAAAA,MAAM,EAAE,EAXQ;AAYhBC,EAAAA,OAAO,EAAE,EAZO;AAahBC,EAAAA,QAAQ,EAAE,EAbM;AAchBC,EAAAA,KAAK,EAAE,CACL,aADK,CAdS;AAiBhBC,EAAAA,SAAS,EAAE,EAjBK;AAkBhBC,EAAAA,QAAQ,EAAE,CACR,OADQ,CAlBM;AAqBhBC,EAAAA,UAAU,EAAE,EArBI;AAsBhBC,EAAAA,SAAS,EAAE,EAtBK;AAuBhBC,EAAAA,OAAO,EAAE,CACP,cADO,CAvBO;AA0BhBC,EAAAA,UAAU,EAAE,EA1BI;AA2BhBC,EAAAA,WAAW,EAAE,CACX,MADW,CA3BG;AA8BhBC,EAAAA,IAAI,EAAE,EA9BU;AA+BhBC,EAAAA,KAAK,EAAE,EA/BS;AAgChBC,EAAAA,OAAO,EAAE,EAhCO;AAiChBC,EAAAA,OAAO,EAAE,EAjCO;AAkChBC,EAAAA,QAAQ,EAAE,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EAAE;AAdmB,CAAhC;AAiBA,MAAM;AACJ;AACAtD,EAAAA,UAFI;AAGJwC,EAAAA,QAHI;AAKJ;AACAf,EAAAA,OANI;;AAOJ;AACA,KAAG8B;AARC,IASFhB,cATJ;AAWA,MAAMiB,WAAW,GAAG,EAClB,GAAGD,uBADe;AAElB,KAAGb,uBAFe;AAIlB;AACA;AACA;AAEA;AACAe,EAAAA,MAAM,EAAE,EATU;AAWlBC,EAAAA,IAAI,EAAE,EAXY;AAYlBC,EAAAA,MAAM,EAAE,EAZU;AAalBC,EAAAA,OAAO,EAAE,EAbS;AAclBC,EAAAA,KAAK,EAAE,EAdW;AAgBlB;AACAC,EAAAA,YAAY,EAAE,EAjBI;AAmBlBC,EAAAA,OAAO,EAAE,EAnBS;AAoBlBC,EAAAA,UAAU,EAAE,EApBM;AAqBlBC,EAAAA,SAAS,EAAE,EArBO;AAsBlBC,EAAAA,QAAQ,EAAE,EAtBQ;AAuBlBC,EAAAA,aAAa,EAAE,EAvBG;AAwBlBC,EAAAA,OAAO,EAAE,EAxBS;AAyBlBC,EAAAA,eAAe,EAAE,EAzBC;AA0BlBC,EAAAA,QAAQ,EAAE,EA1BQ;AA4BlB;AACAC,EAAAA,MAAM,EAAE,EA7BU;AA+BlBC,EAAAA,MAAM,EAAE,CACN,SADM,CA/BU;AAmClBC,EAAAA,MAAM,EAAE,EAnCU;AAoClBC,EAAAA,QAAQ,EAAE,EApCQ;AAsClBC,EAAAA,YAAY,EAAE;AAtCI,CAApB","sourcesContent":["const jsdocTagsUndocumented = {\n // Undocumented but present; see\n // https://github.com/jsdoc/jsdoc/issues/1283#issuecomment-516816802\n // https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594\n modifies: [],\n};\n\nconst jsdocTags = {\n ...jsdocTagsUndocumented,\n abstract: [\n 'virtual',\n ],\n access: [],\n alias: [],\n async: [],\n augments: [\n 'extends',\n ],\n author: [],\n borrows: [],\n callback: [],\n class: [\n 'constructor',\n ],\n classdesc: [],\n constant: [\n 'const',\n ],\n constructs: [],\n copyright: [],\n default: [\n 'defaultvalue',\n ],\n deprecated: [],\n description: [\n 'desc',\n ],\n enum: [],\n event: [],\n example: [],\n exports: [],\n external: [\n 'host',\n ],\n file: [\n 'fileoverview',\n 'overview',\n ],\n fires: [\n 'emits',\n ],\n function: [\n 'func',\n 'method',\n ],\n generator: [],\n global: [],\n hideconstructor: [],\n ignore: [],\n implements: [],\n inheritdoc: [],\n\n // Allowing casing distinct from jsdoc `definitions.js` (required in Closure)\n inheritDoc: [],\n\n inner: [],\n instance: [],\n interface: [],\n kind: [],\n lends: [],\n license: [],\n listens: [],\n member: [\n 'var',\n ],\n memberof: [],\n 'memberof!': [],\n mixes: [],\n mixin: [],\n\n module: [],\n name: [],\n namespace: [],\n override: [],\n package: [],\n param: [\n 'arg',\n 'argument',\n ],\n private: [],\n property: [\n 'prop',\n ],\n protected: [],\n public: [],\n readonly: [],\n requires: [],\n returns: [\n 'return',\n ],\n see: [],\n since: [],\n static: [],\n summary: [],\n\n this: [],\n throws: [\n 'exception',\n ],\n todo: [],\n tutorial: [],\n type: [],\n typedef: [],\n variation: [],\n version: [],\n yields: [\n 'yield',\n ],\n};\n\nconst typeScriptTags = {\n ...jsdocTags,\n\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n internal: [],\n\n // `@template` is also in TypeScript per:\n // https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc\n template: [],\n};\n\nconst undocumentedClosureTags = {\n // These are in Closure source but not in jsdoc source nor in the Closure\n // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java\n closurePrimitive: [],\n customElement: [],\n expose: [],\n hidden: [],\n idGenerator: [],\n meaning: [],\n mixinClass: [],\n mixinFunction: [],\n ngInject: [],\n owner: [],\n typeSummary: [],\n wizaction: [],\n};\n\nconst {\n /* eslint-disable no-unused-vars */\n inheritdoc,\n internal,\n\n // Will be inverted to prefer `return`\n returns,\n /* eslint-enable no-unused-vars */\n ...typeScriptTagsInClosure\n} = typeScriptTags;\n\nconst closureTags = {\n ...typeScriptTagsInClosure,\n ...undocumentedClosureTags,\n\n // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler\n // These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js\n // except for the experimental `noinline` and the casing differences noted below\n\n // Defined as a synonym of `const` in jsdoc `definitions.js`\n define: [],\n\n dict: [],\n export: [],\n externs: [],\n final: [],\n\n // With casing distinct from jsdoc `definitions.js`\n implicitCast: [],\n\n noalias: [],\n nocollapse: [],\n nocompile: [],\n noinline: [],\n nosideeffects: [],\n polymer: [],\n polymerBehavior: [],\n preserve: [],\n\n // Defined as a synonym of `interface` in jsdoc `definitions.js`\n record: [],\n\n return: [\n 'returns',\n ],\n\n struct: [],\n suppress: [],\n\n unrestricted: [],\n};\n\nexport {\n jsdocTags,\n closureTags,\n typeScriptTags,\n};\n"],"file":"tagNames.js"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "http://gajus.com"
6
6
  },
7
7
  "dependencies": {
8
- "@es-joy/jsdoccomment": "~0.22.0",
8
+ "@es-joy/jsdoccomment": "~0.22.1",
9
9
  "comment-parser": "1.3.1",
10
10
  "debug": "^4.3.4",
11
11
  "escape-string-regexp": "^4.0.0",
@@ -116,5 +116,5 @@
116
116
  "test-cov": "cross-env TIMING=1 nyc --reporter text npm run test-no-cov",
117
117
  "test-index": "npm run test-no-cov -- test/rules/index.js"
118
118
  },
119
- "version": "38.0.5"
119
+ "version": "38.0.8"
120
120
  }