eslint-plugin-jsdoc 42.0.0 → 43.0.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 +290 -12
- package/dist/defaultTagOrder.js +33 -31
- package/dist/defaultTagOrder.js.map +1 -1
- package/dist/iterateJsdoc.js +5 -1
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/rules/sortTags.js +249 -8
- package/dist/rules/sortTags.js.map +1 -1
- package/dist/rules/tagLines.js +3 -0
- package/dist/rules/tagLines.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22385,6 +22385,18 @@ Sorts tags by a specified sequence according to tag name.
|
|
|
22385
22385
|
|
|
22386
22386
|
(Default order originally inspired by [`@homer0/prettier-plugin-jsdoc`](https://github.com/homer0/packages/tree/main/packages/public/prettier-plugin-jsdoc).)
|
|
22387
22387
|
|
|
22388
|
+
Optionally allows adding line breaks between tag groups and/or between tags
|
|
22389
|
+
within a tag group.
|
|
22390
|
+
|
|
22391
|
+
Please note: unless you are disabling reporting of line breaks, this rule
|
|
22392
|
+
should not be used with the default "never" or "always" options of
|
|
22393
|
+
`tag-lines` (a rule enabled by default with the recommended config) as
|
|
22394
|
+
that rule adds its own line breaks after tags and may interfere with any
|
|
22395
|
+
line break setting this rule will attempt to do when not disabled.
|
|
22396
|
+
|
|
22397
|
+
You may, however, safely set the "any" option in that rule along with
|
|
22398
|
+
`startLines` and/or `endLines`.
|
|
22399
|
+
|
|
22388
22400
|
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40"></a>
|
|
22389
22401
|
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40"></a>
|
|
22390
22402
|
#### Options
|
|
@@ -22393,24 +22405,32 @@ Sorts tags by a specified sequence according to tag name.
|
|
|
22393
22405
|
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-tagsequence"></a>
|
|
22394
22406
|
##### <code>tagSequence</code>
|
|
22395
22407
|
|
|
22396
|
-
An array of tag
|
|
22408
|
+
An array of tag group objects indicating the preferred sequence for sorting tags.
|
|
22409
|
+
|
|
22410
|
+
Each item in the array should be an object with a `tags` property set to an array
|
|
22411
|
+
of tag names.
|
|
22397
22412
|
|
|
22398
22413
|
Tag names earlier in the list will be arranged first. The relative position of
|
|
22399
22414
|
tags of the same name will not be changed.
|
|
22400
22415
|
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22416
|
+
Earlier groups will also be arranged before later groups, but with the added
|
|
22417
|
+
feature that additional line breaks may be added between (or before or after)
|
|
22418
|
+
such groups (depending on the setting of `linesBetween`).
|
|
22419
|
+
|
|
22420
|
+
Tag names not in the list will be grouped together at the end. The pseudo-tag
|
|
22421
|
+
`-other` can be used to place them anywhere else if desired. The tags will be
|
|
22422
|
+
placed in their order of appearance, or alphabetized if `alphabetizeExtras`
|
|
22423
|
+
is enabled, see more below about that option.
|
|
22405
22424
|
|
|
22406
|
-
Defaults to the array below
|
|
22425
|
+
Defaults to the array below (noting that it is just a single tag group with
|
|
22426
|
+
no lines between groups by default).
|
|
22407
22427
|
|
|
22408
22428
|
Please note that this order is still experimental, so if you want to retain
|
|
22409
22429
|
a fixed order that doesn't change into the future, supply your own
|
|
22410
22430
|
`tagSequence`.
|
|
22411
22431
|
|
|
22412
22432
|
```js
|
|
22413
|
-
[
|
|
22433
|
+
[{tags: [
|
|
22414
22434
|
// Brief descriptions
|
|
22415
22435
|
'summary',
|
|
22416
22436
|
'typeSummary',
|
|
@@ -22563,7 +22583,7 @@ a fixed order that doesn't change into the future, supply your own
|
|
|
22563
22583
|
'since',
|
|
22564
22584
|
'deprecated',
|
|
22565
22585
|
'todo',
|
|
22566
|
-
];
|
|
22586
|
+
]}];
|
|
22567
22587
|
```
|
|
22568
22588
|
|
|
22569
22589
|
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-alphabetizeextras"></a>
|
|
@@ -22574,13 +22594,41 @@ Defaults to `false`. Alphabetizes any items not within `tagSequence` after any
|
|
|
22574
22594
|
items within `tagSequence` (or in place of the special `-other` pseudo-tag)
|
|
22575
22595
|
are sorted.
|
|
22576
22596
|
|
|
22597
|
+
If you want all your tags alphabetized, you can supply an empty array for
|
|
22598
|
+
`tagSequence` along with setting this option to `true`.
|
|
22599
|
+
|
|
22600
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-linesbetween"></a>
|
|
22601
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-linesbetween"></a>
|
|
22602
|
+
##### <code>linesBetween</code>
|
|
22603
|
+
|
|
22604
|
+
Indicates the number of lines to be added between tag groups. Defaults to 1.
|
|
22605
|
+
Do not set to 0 or 2+ if you are using `tag-lines` and `"always"` and do not
|
|
22606
|
+
set to 1+ if you are using `tag-lines` and `"never"`.
|
|
22607
|
+
|
|
22608
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-reporttaggroupspacing"></a>
|
|
22609
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-reporttaggroupspacing"></a>
|
|
22610
|
+
##### <code>reportTagGroupSpacing</code>
|
|
22611
|
+
|
|
22612
|
+
Whether to enable reporting and fixing of line breaks between tag groups
|
|
22613
|
+
as set by `linesBetween`. Defaults to `true`. Note that the very last tag
|
|
22614
|
+
will not have spacing applied regardless. For adding line breaks there, you
|
|
22615
|
+
may wish to use the `endLines` option of the `tag-lines` rule.
|
|
22616
|
+
|
|
22617
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-reportintrataggroupspacing"></a>
|
|
22618
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-reportintrataggroupspacing"></a>
|
|
22619
|
+
##### <code>reportIntraTagGroupSpacing</code>
|
|
22620
|
+
|
|
22621
|
+
Whether to enable reporting and fixing of line breaks within tags of a given
|
|
22622
|
+
tag group. Defaults to `true` which will remove any line breaks at the end of
|
|
22623
|
+
such tags. Do not use with `true` if you are using `tag-lines` and `always`.
|
|
22624
|
+
|
|
22577
22625
|
|||
|
|
22578
22626
|
|---|---|
|
|
22579
22627
|
|Context|everywhere|
|
|
22580
22628
|
|Tags|any|
|
|
22581
22629
|
|Recommended|false|
|
|
22582
22630
|
|Settings||
|
|
22583
|
-
|Options|`tagSequence`, `alphabetizeExtras`|
|
|
22631
|
+
|Options|`tagSequence`, `alphabetizeExtras`, `linesBetween`, `reportTagGroupSpacing`, `reportIntraTagGroupSpacing`|
|
|
22584
22632
|
|
|
22585
22633
|
The following patterns are considered problems:
|
|
22586
22634
|
|
|
@@ -22645,7 +22693,16 @@ function quux () {}
|
|
|
22645
22693
|
* @abc
|
|
22646
22694
|
*/
|
|
22647
22695
|
function quux () {}
|
|
22648
|
-
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":["def","xyz","abc"]}]
|
|
22696
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["def","xyz","abc"]}]}]
|
|
22697
|
+
// Message: Tags are not in the prescribed order: def, xyz, abc
|
|
22698
|
+
|
|
22699
|
+
/**
|
|
22700
|
+
* @xyz
|
|
22701
|
+
* @def
|
|
22702
|
+
* @abc
|
|
22703
|
+
*/
|
|
22704
|
+
function quux () {}
|
|
22705
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22649
22706
|
// Message: Tags are not in the prescribed order: def, xyz, abc
|
|
22650
22707
|
|
|
22651
22708
|
/**
|
|
@@ -22677,6 +22734,135 @@ function quux () {}
|
|
|
22677
22734
|
*/
|
|
22678
22735
|
function quux () {}
|
|
22679
22736
|
// 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
|
|
22737
|
+
|
|
22738
|
+
/**
|
|
22739
|
+
* @def
|
|
22740
|
+
* @xyz
|
|
22741
|
+
* @abc
|
|
22742
|
+
*/
|
|
22743
|
+
function quux () {}
|
|
22744
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":2,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22745
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22746
|
+
|
|
22747
|
+
/**
|
|
22748
|
+
* @def
|
|
22749
|
+
* @xyz
|
|
22750
|
+
*
|
|
22751
|
+
*
|
|
22752
|
+
* @abc
|
|
22753
|
+
*/
|
|
22754
|
+
function quux () {}
|
|
22755
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":1,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22756
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22757
|
+
|
|
22758
|
+
/**
|
|
22759
|
+
* @def
|
|
22760
|
+
* @xyz A multiline
|
|
22761
|
+
* description
|
|
22762
|
+
* @abc
|
|
22763
|
+
*/
|
|
22764
|
+
function quux () {}
|
|
22765
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":2,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22766
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22767
|
+
|
|
22768
|
+
/**
|
|
22769
|
+
* @def
|
|
22770
|
+
* @xyz
|
|
22771
|
+
* @xyz
|
|
22772
|
+
*
|
|
22773
|
+
*
|
|
22774
|
+
* @abc
|
|
22775
|
+
*/
|
|
22776
|
+
function quux () {}
|
|
22777
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":1,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22778
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22779
|
+
|
|
22780
|
+
/**
|
|
22781
|
+
* Foo
|
|
22782
|
+
*
|
|
22783
|
+
* @param {(
|
|
22784
|
+
* req: express.Request,
|
|
22785
|
+
* done: (error: any, user?: any, info?: any) => void
|
|
22786
|
+
* ) => void} verify - callback to excute custom authentication logic
|
|
22787
|
+
* @see https://github.com/jaredhanson/passport/blob/v0.4.1/lib/middleware/authenticate.js#L217
|
|
22788
|
+
*
|
|
22789
|
+
*/
|
|
22790
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["since","access"]},{"tags":["class","augments","mixes"]},{"tags":["alias","memberof"]},{"tags":["see","link","global"]},{"tags":["fires","listens"]},{"tags":["param"]},{"tags":["yields"]},{"tags":["returns"]}]}]
|
|
22791
|
+
// Message: Tags are not in the prescribed order: since, access, class, augments, mixes, alias, memberof, see, link, global, fires, listens, param, yields, returns
|
|
22792
|
+
|
|
22793
|
+
/**
|
|
22794
|
+
* Summary. (use period)
|
|
22795
|
+
*
|
|
22796
|
+
* Description. (use period)
|
|
22797
|
+
*
|
|
22798
|
+
* @since 1.0.1
|
|
22799
|
+
* @access private
|
|
22800
|
+
*
|
|
22801
|
+
* @class
|
|
22802
|
+
* @mixes mixin
|
|
22803
|
+
*
|
|
22804
|
+
* @alias realName
|
|
22805
|
+
* @memberof namespace
|
|
22806
|
+
*
|
|
22807
|
+
* @see Function/class relied on
|
|
22808
|
+
* @global
|
|
22809
|
+
*
|
|
22810
|
+
* @tutorial Asd
|
|
22811
|
+
* @license MIT
|
|
22812
|
+
*
|
|
22813
|
+
* @fires eventName
|
|
22814
|
+
* @fires className#eventName
|
|
22815
|
+
* @listens event:eventName
|
|
22816
|
+
* @listens className~event:eventName
|
|
22817
|
+
*
|
|
22818
|
+
* @tutorial Asd
|
|
22819
|
+
* @license MIT
|
|
22820
|
+
*
|
|
22821
|
+
* @yields {string} Yielded value description.
|
|
22822
|
+
*
|
|
22823
|
+
* @param {string} var1 - Description.
|
|
22824
|
+
* @param {string} var2 - Description of optional variable.
|
|
22825
|
+
* @param {string} var3 - Description of optional variable with default variable.
|
|
22826
|
+
* @param {object} objectVar - Description.
|
|
22827
|
+
* @param {string} objectVar.key - Description of a key in the objectVar parameter.
|
|
22828
|
+
*
|
|
22829
|
+
* @returns {string} Return value description.
|
|
22830
|
+
*/
|
|
22831
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["since","access"]},{"tags":["class","augments","mixes"]},{"tags":["alias","memberof"]},{"tags":["see","link","global"]},{"tags":["fires","listens"]},{"tags":["param"]},{"tags":["yields"]},{"tags":["returns"]}]}]
|
|
22832
|
+
// Message: Tags are not in the prescribed order: since, access, class, augments, mixes, alias, memberof, see, link, global, fires, listens, param, yields, returns
|
|
22833
|
+
|
|
22834
|
+
/**
|
|
22835
|
+
* @def
|
|
22836
|
+
* @zzz
|
|
22837
|
+
* @abc
|
|
22838
|
+
*/
|
|
22839
|
+
function quux () {}
|
|
22840
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":1,"tagSequence":[{"tags":["qrs"]},{"tags":["def","-other","xyz"]},{"tags":["abc"]}]}]
|
|
22841
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22842
|
+
|
|
22843
|
+
/**
|
|
22844
|
+
* @xyz
|
|
22845
|
+
* @def
|
|
22846
|
+
* @abc
|
|
22847
|
+
*/
|
|
22848
|
+
function quux () {}
|
|
22849
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"alphabetizeExtras":true,"tagSequence":[]}]
|
|
22850
|
+
// Message: Tags are not in the prescribed order: (alphabetical)
|
|
22851
|
+
|
|
22852
|
+
/**
|
|
22853
|
+
* @example
|
|
22854
|
+
* enum Color { Red, Green, Blue }
|
|
22855
|
+
* faker.helpers.enumValue(Color) // 1 (Green)
|
|
22856
|
+
*
|
|
22857
|
+
* enum Direction { North = 'North', South = 'South'}
|
|
22858
|
+
* faker.helpers.enumValue(Direction) // 'South'
|
|
22859
|
+
*
|
|
22860
|
+
* enum HttpStatus { Ok = 200, Created = 201, BadRequest = 400, Unauthorized = 401 }
|
|
22861
|
+
* faker.helpers.enumValue(HttpStatus) // 200 (Ok)
|
|
22862
|
+
* @since 8.0.0
|
|
22863
|
+
*/
|
|
22864
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["internal"]},{"tags":["template","param"]},{"tags":["returns"]},{"tags":["throws"]},{"tags":["see"]},{"tags":["example"]},{"tags":["since"]},{"tags":["deprecated"]}]}]
|
|
22865
|
+
// Message: Tag groups do not have the expected whitespace
|
|
22680
22866
|
````
|
|
22681
22867
|
|
|
22682
22868
|
The following patterns are not considered problems:
|
|
@@ -22711,10 +22897,86 @@ function quux () {}
|
|
|
22711
22897
|
* @abc
|
|
22712
22898
|
*/
|
|
22713
22899
|
function quux () {}
|
|
22714
|
-
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":["def","xyz","abc"]}]
|
|
22900
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["def","xyz","abc"]}]}]
|
|
22715
22901
|
|
|
22716
22902
|
/** @def */
|
|
22717
22903
|
function quux () {}
|
|
22904
|
+
|
|
22905
|
+
/**
|
|
22906
|
+
* @def
|
|
22907
|
+
* @xyz
|
|
22908
|
+
*
|
|
22909
|
+
* @abc
|
|
22910
|
+
*/
|
|
22911
|
+
function quux () {}
|
|
22912
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":1,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22913
|
+
|
|
22914
|
+
/**
|
|
22915
|
+
* @def
|
|
22916
|
+
* @xyz A multiline
|
|
22917
|
+
* description
|
|
22918
|
+
*
|
|
22919
|
+
* @abc
|
|
22920
|
+
*/
|
|
22921
|
+
function quux () {}
|
|
22922
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":1,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22923
|
+
|
|
22924
|
+
/**
|
|
22925
|
+
* Foo
|
|
22926
|
+
*
|
|
22927
|
+
* @see https://github.com/jaredhanson/passport/blob/v0.4.1/lib/middleware/authenticate.js#L217
|
|
22928
|
+
*
|
|
22929
|
+
* @param {(
|
|
22930
|
+
* req: express.Request,
|
|
22931
|
+
* done: (error: any, user?: any, info?: any) => void
|
|
22932
|
+
* ) => void} verify - callback to excute custom authentication logic
|
|
22933
|
+
*/
|
|
22934
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["since","access"]},{"tags":["class","augments","mixes"]},{"tags":["alias","memberof"]},{"tags":["see","link","global"]},{"tags":["fires","listens"]},{"tags":["param"]},{"tags":["yields"]},{"tags":["returns"]}]}]
|
|
22935
|
+
|
|
22936
|
+
/**
|
|
22937
|
+
* Constructor.
|
|
22938
|
+
*
|
|
22939
|
+
* @public
|
|
22940
|
+
*
|
|
22941
|
+
* @param {string} [message] - Error message.
|
|
22942
|
+
*/
|
|
22943
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["since","access"]},{"tags":["class","augments","mixes"]},{"tags":["alias","memberof"]},{"tags":["public","protected","private","override"]},{"tags":["override","async"]},{"tags":["see","link","global"]},{"tags":["param"]},{"tags":["yields"]},{"tags":["returns"]},{"tags":["fires","-other","listens"]}]}]
|
|
22944
|
+
|
|
22945
|
+
/**
|
|
22946
|
+
* @param options.mode The mode to generate the birthdate. Supported modes are `'age'` and `'year'` .
|
|
22947
|
+
*
|
|
22948
|
+
* There are two modes available `'age'` and `'year'`:
|
|
22949
|
+
* - `'age'`: The min and max options define the age of the person (e.g. `18` - `42`).
|
|
22950
|
+
* - `'year'`: The min and max options define the range the birthdate may be in (e.g. `1900` - `2000`).
|
|
22951
|
+
*
|
|
22952
|
+
* Defaults to `year`.
|
|
22953
|
+
*
|
|
22954
|
+
* @example
|
|
22955
|
+
*/
|
|
22956
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["internal"]},{"tags":["template","param"]},{"tags":["returns"]},{"tags":["throws"]},{"tags":["see"]},{"tags":["example"]},{"tags":["since"]},{"tags":["deprecated"]}]}]
|
|
22957
|
+
|
|
22958
|
+
/**
|
|
22959
|
+
* @example
|
|
22960
|
+
* enum Color { Red, Green, Blue }
|
|
22961
|
+
* faker.helpers.enumValue(Color) // 1 (Green)
|
|
22962
|
+
*
|
|
22963
|
+
* enum Direction { North = 'North', South = 'South'}
|
|
22964
|
+
* faker.helpers.enumValue(Direction) // 'South'
|
|
22965
|
+
*
|
|
22966
|
+
* enum HttpStatus { Ok = 200, Created = 201, BadRequest = 400, Unauthorized = 401 }
|
|
22967
|
+
* faker.helpers.enumValue(HttpStatus) // 200 (Ok)
|
|
22968
|
+
*
|
|
22969
|
+
* @since 8.0.0
|
|
22970
|
+
*/
|
|
22971
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"tagSequence":[{"tags":["internal"]},{"tags":["template","param"]},{"tags":["returns"]},{"tags":["throws"]},{"tags":["see"]},{"tags":["example"]},{"tags":["since"]},{"tags":["deprecated"]}]}]
|
|
22972
|
+
|
|
22973
|
+
/**
|
|
22974
|
+
* @def
|
|
22975
|
+
* @xyz
|
|
22976
|
+
* @abc
|
|
22977
|
+
*/
|
|
22978
|
+
function quux () {}
|
|
22979
|
+
// "jsdoc/sort-tags": ["error"|"warn", {"linesBetween":2,"reportTagGroupSpacing":false,"tagSequence":[{"tags":["qrs"]},{"tags":["def","xyz"]},{"tags":["abc"]}]}]
|
|
22718
22980
|
````
|
|
22719
22981
|
|
|
22720
22982
|
|
|
@@ -22764,7 +23026,8 @@ added after tags should not be added after the final tag.
|
|
|
22764
23026
|
##### <code>startLines</code> (defaults to <code>0</code>)
|
|
22765
23027
|
|
|
22766
23028
|
If not set to `null`, will enforce end lines to the given count before the
|
|
22767
|
-
first tag only
|
|
23029
|
+
first tag only, unless there is only whitespace content, in which case,
|
|
23030
|
+
a line count will not be enforced.
|
|
22768
23031
|
|
|
22769
23032
|
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-41-endlines-defaults-to-0"></a>
|
|
22770
23033
|
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-41-endlines-defaults-to-0"></a>
|
|
@@ -23203,6 +23466,21 @@ The following patterns are not considered problems:
|
|
|
23203
23466
|
* @param {string} a
|
|
23204
23467
|
*/
|
|
23205
23468
|
// "jsdoc/tag-lines": ["error"|"warn", "never",{"startLines":null}]
|
|
23469
|
+
|
|
23470
|
+
/**
|
|
23471
|
+
* @param {string} input
|
|
23472
|
+
*/
|
|
23473
|
+
function processSass (input) {
|
|
23474
|
+
}
|
|
23475
|
+
// "jsdoc/tag-lines": ["error"|"warn", "never",{"startLines":1}]
|
|
23476
|
+
|
|
23477
|
+
/**
|
|
23478
|
+
*
|
|
23479
|
+
* @param {string} input
|
|
23480
|
+
*/
|
|
23481
|
+
function processSass (input) {
|
|
23482
|
+
}
|
|
23483
|
+
// "jsdoc/tag-lines": ["error"|"warn", "never",{"startLines":1}]
|
|
23206
23484
|
````
|
|
23207
23485
|
|
|
23208
23486
|
|
package/dist/defaultTagOrder.js
CHANGED
|
@@ -4,39 +4,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
const defaultTagOrder = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const defaultTagOrder = [{
|
|
8
|
+
tags: [
|
|
9
|
+
// Brief descriptions
|
|
10
|
+
'summary', 'typeSummary',
|
|
11
|
+
// Module/file-level
|
|
12
|
+
'module', 'exports', 'file', 'fileoverview', 'overview',
|
|
13
|
+
// Identifying (name, type)
|
|
14
|
+
'typedef', 'interface', 'record', 'template', 'name', 'kind', 'type', 'alias', 'external', 'host', 'callback', 'func', 'function', 'method', 'class', 'constructor',
|
|
15
|
+
// Relationships
|
|
16
|
+
'modifies', 'mixes', 'mixin', 'mixinClass', 'mixinFunction', 'namespace', 'borrows', 'constructs', 'lends', 'implements', 'requires',
|
|
17
|
+
// Long descriptions
|
|
18
|
+
'desc', 'description', 'classdesc', 'tutorial', 'copyright', 'license',
|
|
19
|
+
// Simple annotations
|
|
19
20
|
|
|
20
|
-
// TypeScript
|
|
21
|
-
'internal', 'const', 'constant', 'final', 'global', 'readonly', 'abstract', 'virtual', 'var', 'member', 'memberof', 'memberof!', 'inner', 'instance', 'inheritdoc', 'inheritDoc', 'override', 'hideconstructor',
|
|
22
|
-
// Core function/object info
|
|
23
|
-
'param', 'arg', 'argument', 'prop', 'property', 'return', 'returns',
|
|
24
|
-
// Important behavior details
|
|
25
|
-
'async', 'generator', 'default', 'defaultvalue', 'enum', 'augments', 'extends', 'throws', 'exception', 'yield', 'yields', 'event', 'fires', 'emits', 'listens', 'this',
|
|
26
|
-
// Access
|
|
27
|
-
'static', 'private', 'protected', 'public', 'access', 'package', '-other',
|
|
28
|
-
// Supplementary descriptions
|
|
29
|
-
'see', 'example',
|
|
30
|
-
// METADATA
|
|
21
|
+
// TypeScript
|
|
22
|
+
'internal', 'const', 'constant', 'final', 'global', 'readonly', 'abstract', 'virtual', 'var', 'member', 'memberof', 'memberof!', 'inner', 'instance', 'inheritdoc', 'inheritDoc', 'override', 'hideconstructor',
|
|
23
|
+
// Core function/object info
|
|
24
|
+
'param', 'arg', 'argument', 'prop', 'property', 'return', 'returns',
|
|
25
|
+
// Important behavior details
|
|
26
|
+
'async', 'generator', 'default', 'defaultvalue', 'enum', 'augments', 'extends', 'throws', 'exception', 'yield', 'yields', 'event', 'fires', 'emits', 'listens', 'this',
|
|
27
|
+
// Access
|
|
28
|
+
'static', 'private', 'protected', 'public', 'access', 'package', '-other',
|
|
29
|
+
// Supplementary descriptions
|
|
30
|
+
'see', 'example',
|
|
31
|
+
// METADATA
|
|
31
32
|
|
|
32
|
-
// Other Closure (undocumented) metadata
|
|
33
|
-
'closurePrimitive', 'customElement', 'expose', 'hidden', 'idGenerator', 'meaning', 'ngInject', 'owner', 'wizaction',
|
|
34
|
-
// Other Closure (documented) metadata
|
|
35
|
-
'define', 'dict', 'export', 'externs', 'implicitCast', 'noalias', 'nocollapse', 'nocompile', 'noinline', 'nosideeffects', 'polymer', 'polymerBehavior', 'preserve', 'struct', 'suppress', 'unrestricted',
|
|
36
|
-
// @homer0/prettier-plugin-jsdoc metadata
|
|
37
|
-
'category',
|
|
38
|
-
// Non-Closure metadata
|
|
39
|
-
'ignore', 'author', 'version', 'variation', 'since', 'deprecated', 'todo']
|
|
33
|
+
// Other Closure (undocumented) metadata
|
|
34
|
+
'closurePrimitive', 'customElement', 'expose', 'hidden', 'idGenerator', 'meaning', 'ngInject', 'owner', 'wizaction',
|
|
35
|
+
// Other Closure (documented) metadata
|
|
36
|
+
'define', 'dict', 'export', 'externs', 'implicitCast', 'noalias', 'nocollapse', 'nocompile', 'noinline', 'nosideeffects', 'polymer', 'polymerBehavior', 'preserve', 'struct', 'suppress', 'unrestricted',
|
|
37
|
+
// @homer0/prettier-plugin-jsdoc metadata
|
|
38
|
+
'category',
|
|
39
|
+
// Non-Closure metadata
|
|
40
|
+
'ignore', 'author', 'version', 'variation', 'since', 'deprecated', 'todo']
|
|
41
|
+
}];
|
|
40
42
|
var _default = defaultTagOrder;
|
|
41
43
|
exports.default = _default;
|
|
42
44
|
module.exports = exports.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTagOrder.js","names":["defaultTagOrder","_default","exports","default","module"],"sources":["../src/defaultTagOrder.js"],"sourcesContent":["const defaultTagOrder = [\n // Brief descriptions\n
|
|
1
|
+
{"version":3,"file":"defaultTagOrder.js","names":["defaultTagOrder","tags","_default","exports","default","module"],"sources":["../src/defaultTagOrder.js"],"sourcesContent":["const defaultTagOrder = [\n {\n tags: [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n\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 },\n];\n\nexport default defaultTagOrder;\n"],"mappings":";;;;;;AAAA,MAAMA,eAAe,GAAG,CACtB;EACEC,IAAI,EAAE;EACJ;EACA,SAAS,EACT,aAAa;EAEb;EACA,QAAQ,EACR,SAAS,EACT,MAAM,EACN,cAAc,EACd,UAAU;EAEV;EACA,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,aAAa;EAEb;EACA,UAAU,EACV,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,WAAW,EACX,SAAS,EACT,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU;EAEV;EACA,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS;EAET;;EAEA;EACA,UAAU,EAEV,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB;EAEjB;EACA,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS;EAET;EACA,OAAO,EACP,WAAW,EACX,SAAS,EACT,cAAc,EACd,MAAM,EACN,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,MAAM;EAEN;EACA,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EAET,QAAQ;EAER;EACA,KAAK,EACL,SAAS;EAET;;EAEA;EACA,kBAAkB,EAClB,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,SAAS,EACT,UAAU,EACV,OAAO,EACP,WAAW;EAEX;EACA,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,cAAc;EAEd;EACA,UAAU;EAEV;EACA,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,YAAY,EACZ,MAAM;AAEV,CAAC,CACF;AAAC,IAAAC,QAAA,GAEaF,eAAe;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAAAG,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA"}
|
package/dist/iterateJsdoc.js
CHANGED
|
@@ -105,7 +105,11 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
|
|
|
105
105
|
return iteratingAll && utils.hasATag(['callback', 'function', 'func', 'method']);
|
|
106
106
|
};
|
|
107
107
|
utils.stringify = (tagBlock, specRewire) => {
|
|
108
|
-
|
|
108
|
+
let block;
|
|
109
|
+
if (specRewire) {
|
|
110
|
+
block = rewireSpecs(tagBlock);
|
|
111
|
+
}
|
|
112
|
+
return (0, _commentParser.stringify)(specRewire ? block : tagBlock);
|
|
109
113
|
};
|
|
110
114
|
utils.reportJSDoc = (msg, tag, handler, specRewire, data) => {
|
|
111
115
|
report(msg, handler ? fixer => {
|