eslint-plugin-jsdoc 38.0.7 → 38.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md 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
 
@@ -4883,11 +4890,12 @@ as a lone type. However, one additional complexity is that TypeScript allows and
4883
4890
  actually [currently requires](https://github.com/microsoft/TypeScript/issues/20555)
4884
4891
  `Object` (with the initial upper-case) if used in the syntax
4885
4892
  `Object.<keyType, valueType>` or `Object<keyType, valueType`, perhaps to
4886
- adhere to what [JSDoc documents](https://jsdoc.app/tags-type.html).
4893
+ adhere to that which [JSDoc documents](https://jsdoc.app/tags-type.html).
4887
4894
 
4888
4895
  So, for optimal compatibility with TypeScript (especially since TypeScript
4889
- tools can be used on plain JavaScript with JSDoc), we are now allowing this
4890
- TypeScript approach by default.
4896
+ tools can be used on plain JavaScript with JSDoc), we are now requiring this
4897
+ TypeScript approach by default (if you set `object` type `preferredTypes` in
4898
+ TypeScript mode, the defaults will not apply).
4891
4899
 
4892
4900
  Basically, for primitives, we want to define the type as a primitive, because
4893
4901
  that's what we use in 99.9% of cases. For everything else, we use the type
@@ -5491,7 +5499,7 @@ function quux (foo) {
5491
5499
  function a () {}
5492
5500
 
5493
5501
  /**
5494
- * @typedef {Object} foo
5502
+ * @typedef {Object<string>} foo
5495
5503
  */
5496
5504
  function b () {}
5497
5505
  // Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"object":"Object"}}}
@@ -5550,6 +5558,24 @@ function quux (foo) {
5550
5558
  }
5551
5559
  // Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"Object":"object","object.<>":"Object<>","Object.<>":"Object<>","object<>":"Object<>"}}}
5552
5560
  // Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
5561
+
5562
+ /**
5563
+ * @param {object.<string>} foo
5564
+ */
5565
+ function quux (foo) {
5566
+
5567
+ }
5568
+ // Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"Object":"object","object.<>":"Object<>","Object.<>":"Object<>","object<>":"Object<>"}}}
5569
+ // Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
5570
+
5571
+ /**
5572
+ * @param {object.<string>} foo
5573
+ */
5574
+ function quux (foo) {
5575
+
5576
+ }
5577
+ // Settings: {"jsdoc":{"mode":"typescript"}}
5578
+ // Message: Invalid JSDoc @param "foo" type "object"; prefer: "Object<>".
5553
5579
  ````
5554
5580
 
5555
5581
  The following patterns are not considered problems:
@@ -5810,7 +5836,7 @@ function b () {}
5810
5836
  function a () {}
5811
5837
 
5812
5838
  /**
5813
- * @typedef {Object} foo
5839
+ * @typedef {Object<string>} foo
5814
5840
  */
5815
5841
  function b () {}
5816
5842
  // Settings: {"jsdoc":{"mode":"typescript"}}
@@ -5839,7 +5865,7 @@ function quux (foo) {
5839
5865
  }
5840
5866
 
5841
5867
  /**
5842
- * @param {Object.<string>} foo
5868
+ * @param {Object<string>} foo
5843
5869
  */
5844
5870
  function quux (foo) {
5845
5871
 
@@ -5857,6 +5883,17 @@ function a () {}
5857
5883
  */
5858
5884
  function a () {}
5859
5885
  // Settings: {"jsdoc":{"mode":"typescript","preferredTypes":{"Object":"object","object.<>":"Object<>","object<>":"Object<>"}}}
5886
+
5887
+ /**
5888
+ * Does something.
5889
+ *
5890
+ * @param {Object<string,string>} spec - Foo.
5891
+ */
5892
+ function foo(spec) {
5893
+ return spec;
5894
+ }
5895
+
5896
+ foo()
5860
5897
  ````
5861
5898
 
5862
5899
 
@@ -20628,7 +20665,7 @@ The following patterns are considered problems:
20628
20665
  * @param a
20629
20666
  */
20630
20667
  function quux () {}
20631
- // 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
20668
+ // 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
20632
20669
 
20633
20670
  /**
20634
20671
  * Some description
@@ -20637,7 +20674,7 @@ function quux () {}
20637
20674
  * @param a
20638
20675
  */
20639
20676
  function quux () {}
20640
- // 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
20677
+ // 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
20641
20678
 
20642
20679
  /**
20643
20680
  * @returns {string}
@@ -20646,7 +20683,7 @@ function quux () {}
20646
20683
  * @param a
20647
20684
  */
20648
20685
  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
20686
+ // 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
20687
 
20651
20688
  /**
20652
20689
  * Some description
@@ -20656,7 +20693,7 @@ function quux () {}
20656
20693
  * @param a
20657
20694
  */
20658
20695
  function quux () {}
20659
- // 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
20696
+ // 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
20660
20697
 
20661
20698
  /**
20662
20699
  * @param b A long
@@ -20665,7 +20702,7 @@ function quux () {}
20665
20702
  * @param a
20666
20703
  */
20667
20704
  function quux () {}
20668
- // 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
20705
+ // 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
20669
20706
 
20670
20707
  /**
20671
20708
  * @def
@@ -20674,7 +20711,7 @@ function quux () {}
20674
20711
  */
20675
20712
  function quux () {}
20676
20713
  // "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
20677
- // 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
20714
+ // 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
20678
20715
 
20679
20716
  /**
20680
20717
  * @xyz
@@ -20694,7 +20731,7 @@ function quux () {}
20694
20731
  * @module
20695
20732
  */
20696
20733
  function quux () {}
20697
- // Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
20734
+ // Message: Tags are not in the prescribed order: summary, typeSummary, module, exports, file, fileoverview, overview, typedef, interface, record, template, name, kind, type, alias, external, host, callback, func, function, method, class, constructor, modifies, mixes, mixin, mixinClass, mixinFunction, namespace, borrows, constructs, lends, implements, requires, desc, description, classdesc, tutorial, copyright, license, internal, const, constant, final, global, readonly, abstract, virtual, var, member, memberof, memberof!, inner, instance, inheritdoc, inheritDoc, override, hideconstructor, param, arg, argument, prop, property, return, returns, async, generator, default, defaultvalue, enum, augments, extends, throws, exception, yield, yields, event, fires, emits, listens, this, static, private, protected, public, access, package, -other, see, example, closurePrimitive, customElement, expose, hidden, idGenerator, meaning, ngInject, owner, wizaction, define, dict, export, externs, implicitCast, noalias, nocollapse, nocompile, noinline, nosideeffects, polymer, polymerBehavior, preserve, struct, suppress, unrestricted, category, ignore, author, version, variation, since, deprecated, todo
20698
20735
 
20699
20736
  /**
20700
20737
  * @xyz
@@ -20705,7 +20742,7 @@ function quux () {}
20705
20742
  */
20706
20743
  function quux () {}
20707
20744
  // "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true}]
20708
- // 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
20745
+ // 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
20709
20746
 
20710
20747
  /**
20711
20748
  * @param b A long
@@ -20713,7 +20750,7 @@ function quux () {}
20713
20750
  * @module
20714
20751
  */
20715
20752
  function quux () {}
20716
- // 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
20753
+ // 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
20717
20754
  ````
20718
20755
 
20719
20756
  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,YAxCs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AmItB,YAnIsB,EAoItB,WApIsB,EAqItB,UArIsB,EAsItB,eAtIsB,EAuItB,SAvIsB,EAwItB,iBAxIsB,EAyItB,UAzIsB,EA0ItB,QA1IsB,EA2ItB,UA3IsB,EA4ItB,cA5IsB,EA8ItB;AACA,UA/IsB,EAiJtB;AACA,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,E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B,UA7IsB,EA8ItB,QA9IsB,EA+ItB,UA/IsB,EAgJtB,cAhJsB,EAkJtB;AACA,UAnJsB,EAqJtB;AACA,QAtJsB,EAuJtB,QAvJsB,EAwJtB,SAxJsB,EAyJtB,WAzJsB,EA0JtB,OA1JsB,EA2JtB,YA3JsB,EA4JtB,MA5JsB,CAAxB;eA+JeA,e","sourcesContent":["const defaultTagOrder = [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n\n // Identifying (name, type)\n 'typedef',\n 'interface',\n 'record',\n 'template',\n 'name',\n 'kind',\n 'type',\n 'alias',\n 'external',\n 'host',\n 'callback',\n 'func',\n 'function',\n 'method',\n 'class',\n 'constructor',\n\n // Relationships\n 'modifies',\n 'mixes',\n 'mixin',\n 'mixinClass',\n 'mixinFunction',\n 'namespace',\n 'borrows',\n 'constructs',\n 'lends',\n 'implements',\n 'requires',\n\n // Long descriptions\n 'desc',\n 'description',\n 'classdesc',\n 'tutorial',\n 'copyright',\n 'license',\n\n // Simple annotations\n\n // TypeScript\n 'internal',\n\n 'const',\n 'constant',\n 'final',\n 'global',\n 'readonly',\n 'abstract',\n 'virtual',\n 'var',\n 'member',\n 'memberof',\n 'memberof!',\n 'inner',\n 'instance',\n 'inheritdoc',\n 'inheritDoc',\n 'override',\n 'hideconstructor',\n\n // Core function/object info\n 'param',\n 'arg',\n 'argument',\n 'prop',\n 'property',\n 'return',\n 'returns',\n\n // Important behavior details\n 'async',\n 'generator',\n 'default',\n 'defaultvalue',\n 'enum',\n 'augments',\n 'extends',\n 'throws',\n 'exception',\n 'yield',\n 'yields',\n 'event',\n 'fires',\n 'emits',\n 'listens',\n 'this',\n\n // Access\n 'static',\n 'private',\n 'protected',\n 'public',\n 'access',\n 'package',\n\n '-other',\n\n // Supplementary descriptions\n 'see',\n 'example',\n\n // METADATA\n\n // Other Closure (undocumented) metadata\n 'closurePrimitive',\n 'customElement',\n 'expose',\n 'hidden',\n 'idGenerator',\n 'meaning',\n 'ngInject',\n 'owner',\n 'wizaction',\n\n // Other Closure (documented) metadata\n 'define',\n 'dict',\n 'export',\n 'externs',\n 'implicitCast',\n 'noalias',\n 'nocollapse',\n 'nocompile',\n 'noinline',\n 'nosideeffects',\n 'polymer',\n 'polymerBehavior',\n 'preserve',\n 'struct',\n 'suppress',\n 'unrestricted',\n\n // @homer0/prettier-plugin-jsdoc metadata\n 'category',\n\n // Non-Closure metadata\n 'ignore',\n 'author',\n 'version',\n 'variation',\n 'since',\n 'deprecated',\n 'todo',\n];\n\nexport default defaultTagOrder;\n"],"file":"defaultTagOrder.js"}
@@ -88,7 +88,9 @@ const getDefaultTagStructureForMode = mode => {
88
88
  ['nameContents', 'namepath-defining'], // See `external`
89
89
  ['nameRequired', true], ['typeAllowed', false]])], ['interface', new Map([// Allows for "name" in signature, but indicates as optional
90
90
  ['nameContents', isJsdocTypescriptOrPermissive ? 'namepath-defining' : false], // Not in use, but should be this value if using to power `empty-tags`
91
- ['nameAllowed', isClosure], ['typeAllowed', false]])], ['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,IAA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ADF,EACwB,IADxB,CAZkB,CAAR,CADd,CArDa,EAwEb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,CAAR,CADd,CAvFa,EAuGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf;AACA,GACE,aADF,EACiB,IADjB,CAPe,EAWf,CACE,aADF,EACiB,IADjB,CAXe,CAAR,CADX,CAvGa,EAyHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAzHa,EAqIb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CArIa,EAiJb,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACrB;AACA,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CAjJa,EA8Jb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA,GACE,cADF,EACkB,mBADlB,CAFoB,EAMpB,CACE,cADF,EACkB,KADlB,CANoB,EAUpB,CACE,aADF,EACiB,KADjB,CAVoB,CAAR,CADhB,CA9Ja,EA+Kb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cADF,EACkBR,SADlB,CADgB,CAAR,CADZ,CA/Ka,EAuLb,CACE,OADF,EACW,IAAIQ,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf,CACE,cADF,EACkB,IADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAvLa,EAwMb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,aADF,EACiB,IADjB,CAFc,CAAR,CADV,CAxMa,EAiNb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,IADlB,CAFe,EAMf;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CATe,CAAR,CADX,CAjNa,EAiOb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,aADF,EACiB,IADjB,CAFmB,CAAR,CADf,CAjOa,EA0Ob;AACA,GACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,aADF,EACiBF,qBADjB,CADgB,CAAR,CADZ,CA3Oa,EAmPb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB,CACE,cADF,EACkB,mBADlB,CADiB,EAKjB,CACE,cADF,EACkBT,OADlB,CALiB,EASjB,CACE,aADF,EACiBO,qBADjB,CATiB,CAAR,CADb,CAnPa,EAmQb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB;AACA,GACE,cADF,EACkB,sBADlB,CAFiB,EAMjB;AACA,GACE,aADF,EACiBH,qBAAqB,IAAIH,YAD1C,CAPiB,EAWjB,CACE,cADF,EACkBH,OADlB,CAXiB,EAejB;AACA,GACE,oBADF,EACwBM,qBAAqB,IAAIH,YADjD,CAhBiB,CAAR,CADb,CAnQa,EA0Rb,CACE,UADF,EACc,IAAIM,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,EAalB,CACE,aADF,EACiB,KADjB,CAbkB,CAAR,CADd,CA1Ra,EA8Sb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf,CACE,cADF,EACkB,IADlB,CAPe,EAWf,CACE,aADF,EACiB,KADjB,CAXe,CAAR,CADX,CA9Sa,EAgUb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,KADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CAhUa,EAgVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,cADF,EACkB,mBADlB,CAFc,CAAR,CADV,CAhVa,EAyVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJc,EAQd;AACA,GACE,cADF,EACkB,IADlB,CATc,EAad,CACE,aADF,EACiB,KADjB,CAbc,CAAR,CADV,CAzVa,EA6Wb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EAEED,6BAA6B,GAAG,mBAAH,GAAyB,KAFxD,CAFmB,EAOnB;AACA,GACE,aADF,EACiBP,SADjB,CARmB,EAYnB,CACE,aADF,EACiB,KADjB,CAZmB,CAAR,CADf,CA7Wa,EAgYb,CACE,YADF,EACgB,IAAIQ,GAAJ,CAAQ,CACpB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CAhYa,EA0Yb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CA1Ya,EAwZb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB,CACE,cADF,EACkB,IADlB,CAPiB,EAWjB,CACE,aADF,EACiB,KADjB,CAXiB,CAAR,CADb,CAxZa,EA0ab,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CA1aa,EAwbb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CAxba,EAscb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAtca,EAqdb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CArda,EA6db,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CA7da,EA4eb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,cADF,EACkB,KADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CA5ea,EA6fb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CA7fa,EAwgBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CAxgBa,EAwhBb,CACE,MADF,EACU,IAAIS,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CAxhBa,EA4iBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CA5iBa,EAyjBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAzjBa,EAmkBb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAnkBa,EAylBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAzlBa,EAmmBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAnmBa,EAsnBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CAtnBa,EA0oBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CA1oBa,EAopBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAppBa,EA6pBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,IADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CA7pBa,EA8qBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CA9qBa,EAsrBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAtrBa,EA+rBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb;AACA;AACA,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CA/rBa,EAysBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAzsBa,EAktBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACR,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CAltBa,EA6tBb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBT,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBM,qBAAqB,IAAIH,YAD1C,CARkB,CAAR,CADd,CA7tBa,EA4uBb,CACE,MADF,EACU,IAAIM,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBM,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBN,OADxB,CAZc,CAAR,CADV,CA5uBa,EA+vBb,CACE,QADF,EACY,IAAIS,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA/vBa,EAwwBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,IADlB,CAFkB,EAMlB,CACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CAxwBa,EAqxBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CArxBa,EA+xBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA;AACA;AACA,GACE,cADF,EACkBL,mBADlB,CAViB,EAcjB;AACA;AAEA;AACA,GACE,aADF,EACiB,IADjB,CAlBiB,EAsBjB;AACA;AACA,GACE,oBADF,EACwB,CAACF,YADzB,CAxBiB,CAAR,CADb,CA/xBa,EA8zBb,CACE,KADF,EACS,IAAIO,GAAJ,CAAQ,CACb;AACA,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CA9zBa,EA40Bb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA50Ba,EAo1Bb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CAp1Ba,CAAR,CAAP;AA61BD,CAv4BD;;eAy4BeX,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrPermissive = isJsdoc || isPermissive;\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'requires', new Map([\n // <someModuleName>\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member;\n // also shown as missing in Closure\n // \"namepath\"\n [\n 'nameRequired', isJsdocOrPermissive,\n ],\n\n // Is not `typeRequired` for TypeScript because it gives an error:\n // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member\n // \"namepath\"\n [\n 'typeOrNameRequired', !isTypescript,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
1
+ {"version":3,"sources":["../src/getDefaultTagStructureForMode.js"],"names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map"],"mappings":";;;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAD,IAAU;AAC9C,QAAMC,OAAO,GAAGD,IAAI,KAAK,OAAzB;AACA,QAAME,SAAS,GAAGF,IAAI,KAAK,SAA3B;AACA,QAAMG,YAAY,GAAGH,IAAI,KAAK,YAA9B;AACA,QAAMI,YAAY,GAAGJ,IAAI,KAAK,YAA9B;AAEA,QAAMK,mBAAmB,GAAGJ,OAAO,IAAIG,YAAvC;AACA,QAAME,mBAAmB,GAAGL,OAAO,IAAIE,YAAvC;AACA,QAAMI,qBAAqB,GAAGJ,YAAY,IAAID,SAA9C;AACA,QAAMM,qBAAqB,GAAGN,SAAS,IAAIE,YAA3C;AACA,QAAMK,6BAA6B,GAAGH,mBAAmB,IAAIF,YAA7D,CAV8C,CAY9C;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAO,IAAIM,GAAJ,CAAQ,CACb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CADa,EAeb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb,CACE,cADF,EACkB,mBADlB,CADa,EAKb;AACA,GACE,cADF,EACkB,IADlB,CANa,EAUb;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZa,CAAR,CADT,CAfa,EAkCb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA,GACE,cADF,EACkB,IADlB,CANkB,EAUlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZkB,CAAR,CADd,CAlCa,EAqDb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB;AACA,GACE,aADF,EACiB,IADjB,CAPkB,EAWlB;AACA,GACE,oBADF,EACwB,IADxB,CAZkB,CAAR,CADd,CArDa,EAwEb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,CAAR,CADd,CAvFa,EAuGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf;AACA,GACE,aADF,EACiB,IADjB,CAPe,EAWf,CACE,aADF,EACiB,IADjB,CAXe,CAAR,CADX,CAvGa,EAyHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAzHa,EAqIb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CArIa,EAiJb,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACrB;AACA,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CAjJa,EA8Jb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA,GACE,cADF,EACkB,mBADlB,CAFoB,EAMpB,CACE,cADF,EACkB,KADlB,CANoB,EAUpB,CACE,aADF,EACiB,KADjB,CAVoB,CAAR,CADhB,CA9Ja,EA+Kb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cADF,EACkBR,SADlB,CADgB,CAAR,CADZ,CA/Ka,EAuLb,CACE,OADF,EACW,IAAIQ,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf,CACE,cADF,EACkB,IADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAvLa,EAwMb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,aADF,EACiB,IADjB,CAFc,CAAR,CADV,CAxMa,EAiNb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,IADlB,CAFe,EAMf;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CATe,CAAR,CADX,CAjNa,EAiOb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,aADF,EACiB,IADjB,CAFmB,CAAR,CADf,CAjOa,EA0Ob;AACA,GACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,aADF,EACiBF,qBADjB,CADgB,CAAR,CADZ,CA3Oa,EAmPb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB,CACE,cADF,EACkB,mBADlB,CADiB,EAKjB,CACE,cADF,EACkBT,OADlB,CALiB,EASjB,CACE,aADF,EACiBO,qBADjB,CATiB,CAAR,CADb,CAnPa,EAmQb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACjB;AACA,GACE,cADF,EACkB,sBADlB,CAFiB,EAMjB;AACA,GACE,aADF,EACiBH,qBAAqB,IAAIH,YAD1C,CAPiB,EAWjB,CACE,cADF,EACkBH,OADlB,CAXiB,EAejB;AACA,GACE,oBADF,EACwBM,qBAAqB,IAAIH,YADjD,CAhBiB,CAAR,CADb,CAnQa,EA0Rb,CACE,UADF,EACc,IAAIM,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJkB,EAQlB;AACA,GACE,cADF,EACkB,IADlB,CATkB,EAalB,CACE,aADF,EACiB,KADjB,CAbkB,CAAR,CADd,CA1Ra,EA8Sb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf,CACE,cADF,EACkB,IADlB,CAPe,EAWf,CACE,aADF,EACiB,KADjB,CAXe,CAAR,CADX,CA9Sa,EAgUb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,KADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CAhUa,EAgVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA,GACE,cADF,EACkB,mBADlB,CAFc,CAAR,CADV,CAhVa,EAyVb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAJc,EAQd;AACA,GACE,cADF,EACkB,IADlB,CATc,EAad,CACE,aADF,EACiB,KADjB,CAbc,CAAR,CADV,CAzVa,EA6Wb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EAEED,6BAA6B,GAAG,mBAAH,GAAyB,KAFxD,CAFmB,EAOnB;AACA,GACE,aADF,EACiBP,SADjB,CARmB,EAYnB,CACE,aADF,EACiB,KADjB,CAZmB,CAAR,CADf,CA7Wa,EAgYb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,KADlB,CAFkB,EAKlB;AACA,GACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CAhYa,EA6Yb,CACE,YADF,EACgB,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CA7Ya,EAuZb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CAvZa,EAqab,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB,CACE,cADF,EACkB,IADlB,CAPiB,EAWjB,CACE,aADF,EACiB,KADjB,CAXiB,CAAR,CADb,CAraa,EAubb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CAvba,EAqcb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CArca,EAmdb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAnda,EAkeb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CAlea,EA0eb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA;AACA,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CA1ea,EAyfb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,cADF,EACkB,KADlB,CANe,EAUf,CACE,aADF,EACiB,KADjB,CAVe,CAAR,CADX,CAzfa,EA0gBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACA,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CA1gBa,EAqhBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CArhBa,EAqiBb,CACE,MADF,EACU,IAAIS,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CAriBa,EAyjBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CAzjBa,EAskBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAtkBa,EAglBb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAhlBa,EAsmBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CAtmBa,EAgnBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAhnBa,EAmoBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CAnoBa,EAupBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACA,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CAvpBa,EAiqBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAjqBa,EA0qBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB,CACE,cADF,EACkB,IADlB,CANkB,EAUlB,CACE,aADF,EACiB,KADjB,CAVkB,CAAR,CADd,CA1qBa,EA2rBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CA3rBa,EAmsBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAnsBa,EA4sBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb;AACA;AACA,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CA5sBa,EAstBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAttBa,EA+tBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACR,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CA/tBa,EA0uBb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBT,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBM,qBAAqB,IAAIH,YAD1C,CARkB,CAAR,CADd,CA1uBa,EAyvBb,CACE,MADF,EACU,IAAIM,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkBT,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBM,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBN,OADxB,CAZc,CAAR,CADV,CAzvBa,EA4wBb,CACE,QADF,EACY,IAAIS,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA5wBa,EAqxBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB;AACA,GACE,cADF,EACkB,IADlB,CAFkB,EAMlB,CACE,aADF,EACiB,KADjB,CANkB,CAAR,CADd,CArxBa,EAkyBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CACd;AACA;AACA,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CAlyBa,EA4yBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACA,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA;AACA;AACA,GACE,cADF,EACkBL,mBADlB,CAViB,EAcjB;AACA;AAEA;AACA,GACE,aADF,EACiB,IADjB,CAlBiB,EAsBjB;AACA;AACA,GACE,oBADF,EACwB,CAACF,YADzB,CAxBiB,CAAR,CADb,CA5yBa,EA20Bb,CACE,KADF,EACS,IAAIO,GAAJ,CAAQ,CACb;AACA,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CA30Ba,EAy1Bb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB;AACA,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAz1Ba,EAi2Bb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACf;AACA,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CAj2Ba,CAAR,CAAP;AA02BD,CAp5BD;;eAs5BeX,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrPermissive = isJsdoc || isPermissive;\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'internal', new Map([\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n [\n 'nameContents', false,\n ],\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'requires', new Map([\n // <someModuleName>\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member;\n // also shown as missing in Closure\n // \"namepath\"\n [\n 'nameRequired', isJsdocOrPermissive,\n ],\n\n // Is not `typeRequired` for TypeScript because it gives an error:\n // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member\n // \"namepath\"\n [\n 'typeOrNameRequired', !isTypescript,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
@@ -76,10 +76,19 @@ var _default = (0, _iterateJsdoc.default)(({
76
76
  return utils.tagMightHaveTypePosition(tag.tag);
77
77
  });
78
78
  const {
79
- preferredTypes,
79
+ preferredTypes: preferredTypesOriginal,
80
80
  structuredTags,
81
81
  mode
82
82
  } = settings;
83
+ const injectObjectPreferredTypes = !('Object' in preferredTypesOriginal || 'object' in preferredTypesOriginal || 'object.<>' in preferredTypesOriginal || 'Object.<>' in preferredTypesOriginal || 'object<>' in preferredTypesOriginal);
84
+ const preferredTypes = { ...(injectObjectPreferredTypes ? {
85
+ Object: 'object',
86
+ 'object.<>': 'Object<>',
87
+ 'Object.<>': 'Object<>',
88
+ 'object<>': 'Object<>'
89
+ } : {}),
90
+ ...preferredTypesOriginal
91
+ };
83
92
  const {
84
93
  noDefaults,
85
94
  unifyParentAndChildTypeChecks,
@@ -100,47 +109,43 @@ var _default = (0, _iterateJsdoc.default)(({
100
109
  let hasMatchingPreferredType = false;
101
110
  let isGenericMatch = false;
102
111
  let typeName = typeNodeName;
112
+ const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';
103
113
 
104
- if (Object.keys(preferredTypes).length) {
105
- const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';
106
-
107
- if (unifyParentAndChildTypeChecks || isNameOfGeneric) {
108
- var _parentNode$meta, _parentNode$meta2;
114
+ if (unifyParentAndChildTypeChecks || isNameOfGeneric) {
115
+ var _parentNode$meta, _parentNode$meta2;
109
116
 
110
- const brackets = parentNode === null || parentNode === void 0 ? void 0 : (_parentNode$meta = parentNode.meta) === null || _parentNode$meta === void 0 ? void 0 : _parentNode$meta.brackets;
111
- const dot = parentNode === null || parentNode === void 0 ? void 0 : (_parentNode$meta2 = parentNode.meta) === null || _parentNode$meta2 === void 0 ? void 0 : _parentNode$meta2.dot;
117
+ const brackets = parentNode === null || parentNode === void 0 ? void 0 : (_parentNode$meta = parentNode.meta) === null || _parentNode$meta === void 0 ? void 0 : _parentNode$meta.brackets;
118
+ const dot = parentNode === null || parentNode === void 0 ? void 0 : (_parentNode$meta2 = parentNode.meta) === null || _parentNode$meta2 === void 0 ? void 0 : _parentNode$meta2.dot;
112
119
 
113
- if (brackets === 'angle') {
114
- const checkPostFixes = dot ? ['.', '.<>'] : ['<>'];
115
- isGenericMatch = checkPostFixes.some(checkPostFix => {
116
- if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName + checkPostFix]) !== undefined) {
117
- typeName += checkPostFix;
118
- return true;
119
- }
120
+ if (brackets === 'angle') {
121
+ const checkPostFixes = dot ? ['.', '.<>'] : ['<>'];
122
+ isGenericMatch = checkPostFixes.some(checkPostFix => {
123
+ if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName + checkPostFix]) !== undefined) {
124
+ typeName += checkPostFix;
125
+ return true;
126
+ }
120
127
 
121
- return false;
122
- });
123
- }
128
+ return false;
129
+ });
130
+ }
124
131
 
125
- if (!isGenericMatch && property) {
126
- const checkPostFixes = dot ? ['.', '.<>'] : [brackets === 'angle' ? '<>' : '[]'];
127
- isGenericMatch = checkPostFixes.some(checkPostFix => {
128
- if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[checkPostFix]) !== undefined) {
129
- typeName = checkPostFix;
130
- return true;
131
- }
132
+ if (!isGenericMatch && property) {
133
+ const checkPostFixes = dot ? ['.', '.<>'] : [brackets === 'angle' ? '<>' : '[]'];
134
+ isGenericMatch = checkPostFixes.some(checkPostFix => {
135
+ if ((preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[checkPostFix]) !== undefined) {
136
+ typeName = checkPostFix;
137
+ return true;
138
+ }
132
139
 
133
- return false;
134
- });
135
- }
140
+ return false;
141
+ });
136
142
  }
137
-
138
- const directNameMatch = (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName]) !== undefined && !Object.values(preferredTypes).includes(typeNodeName);
139
- const unifiedSyntaxParentMatch = property && directNameMatch && unifyParentAndChildTypeChecks;
140
- isGenericMatch = isGenericMatch || unifiedSyntaxParentMatch;
141
- hasMatchingPreferredType = isGenericMatch || directNameMatch && !property;
142
143
  }
143
144
 
145
+ const directNameMatch = (preferredTypes === null || preferredTypes === void 0 ? void 0 : preferredTypes[typeNodeName]) !== undefined && !Object.values(preferredTypes).includes(typeNodeName);
146
+ const unifiedSyntaxParentMatch = property && directNameMatch && unifyParentAndChildTypeChecks;
147
+ isGenericMatch = isGenericMatch || unifiedSyntaxParentMatch;
148
+ hasMatchingPreferredType = isGenericMatch || directNameMatch && !property;
144
149
  return [hasMatchingPreferredType, typeName, isGenericMatch];
145
150
  };
146
151
  /**
@@ -159,8 +164,7 @@ var _default = (0, _iterateJsdoc.default)(({
159
164
  let changedPreferred = preferred;
160
165
 
161
166
  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.,
167
+ if (strictNativeType === 'object' && ( // This is not set to remap with exact type match (e.g.,
164
168
  // `object: 'Object'`), so can ignore (including if circular)
165
169
  !(preferredTypes !== null && preferredTypes !== void 0 && preferredTypes[typeNodeName]) || // Although present on `preferredTypes` for remapping, this is a
166
170
  // parent object without a parent match (and not
@@ -1 +1 @@
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,aAAhB,CAAtB;;AACA,UAAID,aAAJ,EAAmB;AACjBL,QAAAA,UAA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ourcesContent":["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"}
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","preferredTypesOriginal","structuredTags","mode","injectObjectPreferredTypes","Object","noDefaults","unifyParentAndChildTypeChecks","exemptTagContexts","options","getPreferredTypeInfo","_type","property","hasMatchingPreferredType","typeName","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,aAAhB,CAAtB;;AACA,UAAID,aAAJ,EAAmB;AACjBL,QAAAA,UAAU,CAACE,IAAX,CAAgBC,QAAhB,GAA2B,OAA3B;AACAH,QAAAA,U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,SA1BF;AA6BVmC,QAAAA,6BAA6B,EAAE;AAC7BnC,UAAAA,IAAI,EAAE;AADuB;AA7BrB,OAFd;AAmCEA,MAAAA,IAAI,EAAE;AAnCR,KADM,CANJ;AA6CJA,IAAAA,IAAI,EAAE;AA7CF;AAFL,CAnTY,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: preferredTypesOriginal,\n structuredTags,\n mode,\n } = settings;\n\n const injectObjectPreferredTypes = !('Object' in preferredTypesOriginal ||\n 'object' in preferredTypesOriginal ||\n 'object.<>' in preferredTypesOriginal ||\n 'Object.<>' in preferredTypesOriginal ||\n 'object<>' in preferredTypesOriginal);\n\n const preferredTypes = {\n ...injectObjectPreferredTypes ? {\n Object: 'object',\n 'object.<>': 'Object<>',\n 'Object.<>': 'Object<>',\n 'object<>': 'Object<>',\n } : {},\n ...preferredTypesOriginal,\n };\n\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\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 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 strictNativeType === 'object' &&\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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,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 // `@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;AAqBhB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AQ,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
@@ -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.7"
119
+ "version": "38.1.1"
120
120
  }