eslint-plugin-jsdoc 39.3.6 → 39.3.12
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 +267 -52
- package/dist/WarnSettings.js +0 -5
- package/dist/WarnSettings.js.map +1 -1
- package/dist/alignTransform.js +69 -61
- package/dist/alignTransform.js.map +1 -1
- package/dist/bin/generateRule.js +7 -26
- package/dist/bin/generateRule.js.map +1 -1
- package/dist/defaultTagOrder.js +30 -14
- package/dist/defaultTagOrder.js.map +1 -1
- package/dist/exportParser.js +34 -143
- package/dist/exportParser.js.map +1 -1
- package/dist/generateRule.js +7 -26
- package/dist/generateRule.js.map +1 -1
- package/dist/getDefaultTagStructureForMode.js +189 -93
- package/dist/getDefaultTagStructureForMode.js.map +1 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +43 -206
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/jsdocUtils.js +71 -220
- package/dist/jsdocUtils.js.map +1 -1
- package/dist/rules/checkAccess.js +0 -8
- package/dist/rules/checkAccess.js.map +1 -1
- package/dist/rules/checkAlignment.js +0 -8
- package/dist/rules/checkAlignment.js.map +1 -1
- package/dist/rules/checkExamples.js +25 -63
- package/dist/rules/checkExamples.js.map +1 -1
- package/dist/rules/checkIndentation.js +0 -7
- package/dist/rules/checkIndentation.js.map +1 -1
- package/dist/rules/checkLineAlignment.js +9 -30
- package/dist/rules/checkLineAlignment.js.map +1 -1
- package/dist/rules/checkParamNames.js +9 -47
- package/dist/rules/checkParamNames.js.map +1 -1
- package/dist/rules/checkPropertyNames.js +1 -18
- package/dist/rules/checkPropertyNames.js.map +1 -1
- package/dist/rules/checkSyntax.js +2 -5
- package/dist/rules/checkSyntax.js.map +1 -1
- package/dist/rules/checkTagNames.js +0 -18
- package/dist/rules/checkTagNames.js.map +1 -1
- package/dist/rules/checkTypes.js +17 -46
- package/dist/rules/checkTypes.js.map +1 -1
- package/dist/rules/checkValues.js +0 -18
- package/dist/rules/checkValues.js.map +1 -1
- package/dist/rules/emptyTags.js +6 -11
- package/dist/rules/emptyTags.js.map +1 -1
- package/dist/rules/implementsOnClasses.js +0 -6
- package/dist/rules/implementsOnClasses.js.map +1 -1
- package/dist/rules/matchDescription.js +0 -20
- package/dist/rules/matchDescription.js.map +1 -1
- package/dist/rules/matchName.js +2 -17
- package/dist/rules/matchName.js.map +1 -1
- package/dist/rules/multilineBlocks.js +10 -34
- package/dist/rules/multilineBlocks.js.map +1 -1
- package/dist/rules/newlineAfterDescription.js +0 -8
- package/dist/rules/newlineAfterDescription.js.map +1 -1
- package/dist/rules/noBadBlocks.js +2 -16
- package/dist/rules/noBadBlocks.js.map +1 -1
- package/dist/rules/noDefaults.js +0 -7
- package/dist/rules/noDefaults.js.map +1 -1
- package/dist/rules/noMissingSyntax.js +2 -16
- package/dist/rules/noMissingSyntax.js.map +1 -1
- package/dist/rules/noMultiAsterisks.js +2 -16
- package/dist/rules/noMultiAsterisks.js.map +1 -1
- package/dist/rules/noRestrictedSyntax.js +3 -9
- package/dist/rules/noRestrictedSyntax.js.map +1 -1
- package/dist/rules/noTypes.js +0 -7
- package/dist/rules/noTypes.js.map +1 -1
- package/dist/rules/noUndefinedTypes.js +13 -34
- package/dist/rules/noUndefinedTypes.js.map +1 -1
- package/dist/rules/requireAsteriskPrefix.js +2 -26
- package/dist/rules/requireAsteriskPrefix.js.map +1 -1
- package/dist/rules/requireDescription.js +0 -17
- package/dist/rules/requireDescription.js.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.js +13 -34
- package/dist/rules/requireDescriptionCompleteSentence.js.map +1 -1
- package/dist/rules/requireExample.js +0 -9
- package/dist/rules/requireExample.js.map +1 -1
- package/dist/rules/requireFileOverview.js +0 -16
- package/dist/rules/requireFileOverview.js.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.js +2 -16
- package/dist/rules/requireHyphenBeforeParamDescription.js.map +1 -1
- package/dist/rules/requireJsdoc.js +13 -58
- package/dist/rules/requireJsdoc.js.map +1 -1
- package/dist/rules/requireParam.js +6 -53
- package/dist/rules/requireParam.js.map +1 -1
- package/dist/rules/requireParamDescription.js +0 -4
- package/dist/rules/requireParamDescription.js.map +1 -1
- package/dist/rules/requireParamName.js +0 -4
- package/dist/rules/requireParamName.js.map +1 -1
- package/dist/rules/requireParamType.js +0 -4
- package/dist/rules/requireParamType.js.map +1 -1
- package/dist/rules/requireProperty.js +0 -9
- package/dist/rules/requireProperty.js.map +1 -1
- package/dist/rules/requirePropertyDescription.js +0 -4
- package/dist/rules/requirePropertyDescription.js.map +1 -1
- package/dist/rules/requirePropertyName.js +0 -4
- package/dist/rules/requirePropertyName.js.map +1 -1
- package/dist/rules/requirePropertyType.js +0 -4
- package/dist/rules/requirePropertyType.js.map +1 -1
- package/dist/rules/requireReturns.js +13 -23
- package/dist/rules/requireReturns.js.map +1 -1
- package/dist/rules/requireReturnsCheck.js +12 -20
- package/dist/rules/requireReturnsCheck.js.map +1 -1
- package/dist/rules/requireReturnsDescription.js +0 -6
- package/dist/rules/requireReturnsDescription.js.map +1 -1
- package/dist/rules/requireReturnsType.js +0 -4
- package/dist/rules/requireReturnsType.js.map +1 -1
- package/dist/rules/requireThrows.js +6 -15
- package/dist/rules/requireThrows.js.map +1 -1
- package/dist/rules/requireYields.js +13 -29
- package/dist/rules/requireYields.js.map +1 -1
- package/dist/rules/requireYieldsCheck.js +8 -29
- package/dist/rules/requireYieldsCheck.js.map +1 -1
- package/dist/rules/sortTags.js +17 -30
- package/dist/rules/sortTags.js.map +1 -1
- package/dist/rules/tagLines.js +0 -26
- package/dist/rules/tagLines.js.map +1 -1
- package/dist/rules/validTypes.js +22 -53
- package/dist/rules/validTypes.js.map +1 -1
- package/dist/tagNames.js +7 -4
- package/dist/tagNames.js.map +1 -1
- package/dist/utils/hasReturnValue.js +22 -66
- package/dist/utils/hasReturnValue.js.map +1 -1
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -2403,17 +2403,28 @@ const fn = ( lorem, sit ) => {}
|
|
|
2403
2403
|
// Message: Expected JSDoc block lines to not be aligned.
|
|
2404
2404
|
|
|
2405
2405
|
|
|
2406
|
-
|
|
2407
|
-
* Function description
|
|
2408
|
-
|
|
2409
|
-
* @param {string} lorem Description
|
|
2410
|
-
* @param {int} sit Description multi words
|
|
2411
|
-
* @param {string} sth Multi
|
|
2412
|
-
* line description
|
|
2413
|
-
|
|
2406
|
+
/**\r
|
|
2407
|
+
* Function description.\r
|
|
2408
|
+
*\r
|
|
2409
|
+
* @param {string} lorem Description.\r
|
|
2410
|
+
* @param {int} sit Description multi words.\r
|
|
2411
|
+
* @param {string} sth Multi\r
|
|
2412
|
+
* line description.\r
|
|
2413
|
+
*/\r
|
|
2414
2414
|
const fn = ( lorem, sit ) => {}
|
|
2415
2415
|
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2416
2416
|
// Message: Expected JSDoc block lines to be aligned.
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Function description.
|
|
2420
|
+
*
|
|
2421
|
+
* @param {string} lorem Description.
|
|
2422
|
+
* @param {int} sit Description multi
|
|
2423
|
+
* line with asterisks.
|
|
2424
|
+
*/
|
|
2425
|
+
const fn = ( lorem, sit ) => {}
|
|
2426
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2427
|
+
// Message: Expected JSDoc block lines to be aligned.
|
|
2417
2428
|
````
|
|
2418
2429
|
|
|
2419
2430
|
The following patterns are not considered problems:
|
|
@@ -2671,14 +2682,14 @@ const fn = ({ids}) => {}
|
|
|
2671
2682
|
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2672
2683
|
|
|
2673
2684
|
|
|
2674
|
-
|
|
2675
|
-
* Function description
|
|
2676
|
-
|
|
2677
|
-
* @param {string} lorem Description
|
|
2678
|
-
* @param {int} sit Description multi words
|
|
2679
|
-
* @param {string} sth Multi
|
|
2680
|
-
* line description
|
|
2681
|
-
|
|
2685
|
+
/**\r
|
|
2686
|
+
* Function description.\r
|
|
2687
|
+
*\r
|
|
2688
|
+
* @param {string} lorem Description.\r
|
|
2689
|
+
* @param {int} sit Description multi words.\r
|
|
2690
|
+
* @param {string} sth Multi\r
|
|
2691
|
+
* line description.\r
|
|
2692
|
+
*/\r
|
|
2682
2693
|
const fn = ( lorem, sit ) => {}
|
|
2683
2694
|
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2684
2695
|
|
|
@@ -2697,6 +2708,79 @@ const fn = ( lorem, sit ) => {};
|
|
|
2697
2708
|
*/
|
|
2698
2709
|
const fn2 = () => {}
|
|
2699
2710
|
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2711
|
+
|
|
2712
|
+
/**
|
|
2713
|
+
* Function description.
|
|
2714
|
+
*
|
|
2715
|
+
* @param lorem Description.
|
|
2716
|
+
* @param sit Description multi words.
|
|
2717
|
+
* @return Return description.
|
|
2718
|
+
*/
|
|
2719
|
+
const fn = ( lorem, sit ) => {};
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* Function description.
|
|
2723
|
+
*
|
|
2724
|
+
* @param lorem Description.
|
|
2725
|
+
* @param sit Description multi words.
|
|
2726
|
+
* @returns Return description.
|
|
2727
|
+
*/
|
|
2728
|
+
const fn2 = ( lorem, sit ) => {};
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* Function description.
|
|
2732
|
+
*
|
|
2733
|
+
* @param a Description.
|
|
2734
|
+
* @param b Description multi words.
|
|
2735
|
+
* @returns Return description.
|
|
2736
|
+
*/
|
|
2737
|
+
const fn3 = ( a, b ) => {};
|
|
2738
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* Function description.
|
|
2742
|
+
*
|
|
2743
|
+
* @argument lorem Description.
|
|
2744
|
+
* @return Return description.
|
|
2745
|
+
*/
|
|
2746
|
+
const fn = ( lorem ) => {};
|
|
2747
|
+
|
|
2748
|
+
/**
|
|
2749
|
+
* Function description.
|
|
2750
|
+
*
|
|
2751
|
+
* @argument lorem Description.
|
|
2752
|
+
* @returns Return description.
|
|
2753
|
+
*/
|
|
2754
|
+
const fn2 = ( lorem ) => {};
|
|
2755
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Function description.
|
|
2759
|
+
*
|
|
2760
|
+
* @arg a Description.
|
|
2761
|
+
* @returns Return description.
|
|
2762
|
+
*/
|
|
2763
|
+
const fn = ( a ) => {};
|
|
2764
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2765
|
+
|
|
2766
|
+
/**
|
|
2767
|
+
* Function description.
|
|
2768
|
+
*
|
|
2769
|
+
* @arg lorem Description.
|
|
2770
|
+
* @param sit Return description.
|
|
2771
|
+
*/
|
|
2772
|
+
const fn = ( lorem, sit ) => {};
|
|
2773
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* Function description.
|
|
2777
|
+
*
|
|
2778
|
+
* @arg a Description.
|
|
2779
|
+
* @argument b Second description.
|
|
2780
|
+
* @returns Return description.
|
|
2781
|
+
*/
|
|
2782
|
+
const fn = ( a, b ) => {};
|
|
2783
|
+
// "jsdoc/check-line-alignment": ["error"|"warn", "always"]
|
|
2700
2784
|
````
|
|
2701
2785
|
|
|
2702
2786
|
|
|
@@ -3660,6 +3744,18 @@ class A {
|
|
|
3660
3744
|
* @param root."1" Our "b"
|
|
3661
3745
|
*/
|
|
3662
3746
|
const foo = ([, b]) => b;
|
|
3747
|
+
|
|
3748
|
+
/**
|
|
3749
|
+
* @param arg1 This is the description for arg1.
|
|
3750
|
+
*/
|
|
3751
|
+
function foo(this: void, arg1: number): void;
|
|
3752
|
+
|
|
3753
|
+
declare global {
|
|
3754
|
+
/**
|
|
3755
|
+
* @param arg1 This is the number for foo.
|
|
3756
|
+
*/
|
|
3757
|
+
function foo(this: void, arg1: number): void;
|
|
3758
|
+
}
|
|
3663
3759
|
````
|
|
3664
3760
|
|
|
3665
3761
|
|
|
@@ -6283,7 +6379,7 @@ function quux (foo) {
|
|
|
6283
6379
|
|
|
6284
6380
|
/**
|
|
6285
6381
|
* @module test
|
|
6286
|
-
* @license MIT
|
|
6382
|
+
* @license MIT\r
|
|
6287
6383
|
*/
|
|
6288
6384
|
'use strict';
|
|
6289
6385
|
|
|
@@ -8360,14 +8456,14 @@ function quux () {
|
|
|
8360
8456
|
// Message: There must be no newline after the description of the JSDoc block.
|
|
8361
8457
|
|
|
8362
8458
|
|
|
8363
|
-
|
|
8364
|
-
* Bar
|
|
8365
|
-
|
|
8366
|
-
* Bar
|
|
8367
|
-
|
|
8368
|
-
* @bar
|
|
8369
|
-
|
|
8370
|
-
function quux () {
|
|
8459
|
+
/**\r
|
|
8460
|
+
* Bar.\r
|
|
8461
|
+
*\r
|
|
8462
|
+
* Bar.\r
|
|
8463
|
+
*\r
|
|
8464
|
+
* @bar\r
|
|
8465
|
+
*/\r
|
|
8466
|
+
function quux () {\r
|
|
8371
8467
|
|
|
8372
8468
|
}
|
|
8373
8469
|
// "jsdoc/newline-after-description": ["error"|"warn", "never"]
|
|
@@ -8391,12 +8487,12 @@ function quux () {
|
|
|
8391
8487
|
// Message: There must be a newline after the description of the JSDoc block.
|
|
8392
8488
|
|
|
8393
8489
|
|
|
8394
|
-
|
|
8395
|
-
* Service for fetching symbols
|
|
8396
|
-
* @param {object} $http - Injected http helper
|
|
8397
|
-
* @param {object} $q - Injected Promise api helper
|
|
8398
|
-
* @param {object} $location - Injected window location object
|
|
8399
|
-
* @param {object} REPORT_DIALOG_CONSTANTS - Injected handle
|
|
8490
|
+
/**\r
|
|
8491
|
+
* Service for fetching symbols.\r
|
|
8492
|
+
* @param {object} $http - Injected http helper.\r
|
|
8493
|
+
* @param {object} $q - Injected Promise api helper.\r
|
|
8494
|
+
* @param {object} $location - Injected window location object.\r
|
|
8495
|
+
* @param {object} REPORT_DIALOG_CONSTANTS - Injected handle.\r
|
|
8400
8496
|
*/
|
|
8401
8497
|
// Message: There must be a newline after the description of the JSDoc block.
|
|
8402
8498
|
|
|
@@ -8459,20 +8555,20 @@ function quux () {
|
|
|
8459
8555
|
// "jsdoc/newline-after-description": ["error"|"warn", "never"]
|
|
8460
8556
|
|
|
8461
8557
|
|
|
8462
|
-
|
|
8463
|
-
* @foo
|
|
8464
|
-
* Test
|
|
8465
|
-
* abc
|
|
8466
|
-
* @bar
|
|
8558
|
+
/**\r
|
|
8559
|
+
* @foo\r
|
|
8560
|
+
* Test \r
|
|
8561
|
+
* abc \r
|
|
8562
|
+
* @bar \r
|
|
8467
8563
|
*/
|
|
8468
8564
|
|
|
8469
8565
|
|
|
8470
|
-
|
|
8471
|
-
*
|
|
8472
|
-
* @foo
|
|
8473
|
-
* Test
|
|
8474
|
-
* abc
|
|
8475
|
-
* @bar
|
|
8566
|
+
/**\r
|
|
8567
|
+
* \r
|
|
8568
|
+
* @foo\r
|
|
8569
|
+
* Test \r
|
|
8570
|
+
* abc \r
|
|
8571
|
+
* @bar \r
|
|
8476
8572
|
*/
|
|
8477
8573
|
|
|
8478
8574
|
/***
|
|
@@ -8483,16 +8579,16 @@ function quux () {
|
|
|
8483
8579
|
}
|
|
8484
8580
|
// "jsdoc/newline-after-description": ["error"|"warn", "always"]
|
|
8485
8581
|
|
|
8486
|
-
|
|
8487
|
-
* Parses query string to object containing URL parameters
|
|
8488
|
-
*
|
|
8489
|
-
* @param queryString
|
|
8490
|
-
* Input string
|
|
8491
|
-
*
|
|
8492
|
-
* @returns
|
|
8493
|
-
* Object containing URL parameters
|
|
8494
|
-
|
|
8495
|
-
export function parseQueryString(queryString: string): { [key: string]: string } { // <-- Line 10 that fails
|
|
8582
|
+
/**\r
|
|
8583
|
+
* Parses query string to object containing URL parameters\r
|
|
8584
|
+
* \r
|
|
8585
|
+
* @param queryString\r
|
|
8586
|
+
* Input string\r
|
|
8587
|
+
* \r
|
|
8588
|
+
* @returns\r
|
|
8589
|
+
* Object containing URL parameters\r
|
|
8590
|
+
*/\r
|
|
8591
|
+
export function parseQueryString(queryString: string): { [key: string]: string } { // <-- Line 10 that fails\r
|
|
8496
8592
|
|
|
8497
8593
|
}
|
|
8498
8594
|
|
|
@@ -17304,6 +17400,41 @@ function quux (foo) {
|
|
|
17304
17400
|
return foo;
|
|
17305
17401
|
}
|
|
17306
17402
|
// Message: JSDoc @returns declaration set with "never" but return expression is present in function.
|
|
17403
|
+
|
|
17404
|
+
/**
|
|
17405
|
+
* Reads a test fixture.
|
|
17406
|
+
*
|
|
17407
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17408
|
+
* operating system.
|
|
17409
|
+
*
|
|
17410
|
+
* @returns The file contents as buffer.
|
|
17411
|
+
*/
|
|
17412
|
+
export function readFixture(path: string): void;
|
|
17413
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17414
|
+
|
|
17415
|
+
/**
|
|
17416
|
+
* Reads a test fixture.
|
|
17417
|
+
*
|
|
17418
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17419
|
+
* operating system.
|
|
17420
|
+
*
|
|
17421
|
+
* @returns The file contents as buffer.
|
|
17422
|
+
*/
|
|
17423
|
+
export function readFixture(path: string);
|
|
17424
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17425
|
+
|
|
17426
|
+
/**
|
|
17427
|
+
* Reads a test fixture.
|
|
17428
|
+
*
|
|
17429
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17430
|
+
* operating system.
|
|
17431
|
+
*
|
|
17432
|
+
* @returns The file contents as buffer.
|
|
17433
|
+
*/
|
|
17434
|
+
export function readFixture(path: string): void {
|
|
17435
|
+
return;
|
|
17436
|
+
};
|
|
17437
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17307
17438
|
````
|
|
17308
17439
|
|
|
17309
17440
|
The following patterns are not considered problems:
|
|
@@ -17680,6 +17811,46 @@ function * quux() {}
|
|
|
17680
17811
|
function * quux() {}
|
|
17681
17812
|
// Settings: {"jsdoc":{"mode":"jsdoc"}}
|
|
17682
17813
|
// "jsdoc/require-returns-check": ["error"|"warn", {"exemptGenerators":true}]
|
|
17814
|
+
|
|
17815
|
+
/**
|
|
17816
|
+
* @param {unknown} val
|
|
17817
|
+
* @returns { asserts val is number }
|
|
17818
|
+
*/
|
|
17819
|
+
function assertNumber(val) {
|
|
17820
|
+
assert(typeof val === 'number');
|
|
17821
|
+
}
|
|
17822
|
+
|
|
17823
|
+
/**
|
|
17824
|
+
* Reads a test fixture.
|
|
17825
|
+
*
|
|
17826
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17827
|
+
* operating system.
|
|
17828
|
+
*
|
|
17829
|
+
* @returns The file contents as buffer.
|
|
17830
|
+
*/
|
|
17831
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
17832
|
+
|
|
17833
|
+
/**
|
|
17834
|
+
* Reads a test fixture.
|
|
17835
|
+
*
|
|
17836
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17837
|
+
* operating system.
|
|
17838
|
+
*
|
|
17839
|
+
* @returns The file contents as buffer.
|
|
17840
|
+
*/
|
|
17841
|
+
export function readFixture(path: string): Promise<Buffer> {
|
|
17842
|
+
return new Promise(() => {});
|
|
17843
|
+
}
|
|
17844
|
+
|
|
17845
|
+
/**
|
|
17846
|
+
* Reads a test fixture.
|
|
17847
|
+
*
|
|
17848
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17849
|
+
* operating system.
|
|
17850
|
+
*
|
|
17851
|
+
* @returns {void} The file contents as buffer.
|
|
17852
|
+
*/
|
|
17853
|
+
export function readFixture(path: string);
|
|
17683
17854
|
````
|
|
17684
17855
|
|
|
17685
17856
|
|
|
@@ -18554,6 +18725,26 @@ export const sleep = (ms: number) => {
|
|
|
18554
18725
|
return new Promise<string>((res) => setTimeout(res, ms));
|
|
18555
18726
|
};
|
|
18556
18727
|
// Message: Missing JSDoc @returns declaration.
|
|
18728
|
+
|
|
18729
|
+
/**
|
|
18730
|
+
* Reads a test fixture.
|
|
18731
|
+
*/
|
|
18732
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
18733
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18734
|
+
|
|
18735
|
+
/**
|
|
18736
|
+
* Reads a test fixture.
|
|
18737
|
+
*/
|
|
18738
|
+
export function readFixture(path: string): void;
|
|
18739
|
+
// "jsdoc/require-returns": ["error"|"warn", {"forceRequireReturn":true}]
|
|
18740
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18741
|
+
|
|
18742
|
+
/**
|
|
18743
|
+
* Reads a test fixture.
|
|
18744
|
+
*/
|
|
18745
|
+
export function readFixture(path: string);
|
|
18746
|
+
// "jsdoc/require-returns": ["error"|"warn", {"forceRequireReturn":true}]
|
|
18747
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18557
18748
|
````
|
|
18558
18749
|
|
|
18559
18750
|
The following patterns are not considered problems:
|
|
@@ -19057,6 +19248,30 @@ export const sleep = (ms: number) =>
|
|
|
19057
19248
|
export const sleep = (ms: number) => {
|
|
19058
19249
|
return new Promise<void>((res) => setTimeout(res, ms));
|
|
19059
19250
|
};
|
|
19251
|
+
|
|
19252
|
+
/**
|
|
19253
|
+
* Reads a test fixture.
|
|
19254
|
+
*
|
|
19255
|
+
* @returns The file contents as buffer.
|
|
19256
|
+
*/
|
|
19257
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
19258
|
+
|
|
19259
|
+
/**
|
|
19260
|
+
* Reads a test fixture.
|
|
19261
|
+
*
|
|
19262
|
+
* @returns {void}.
|
|
19263
|
+
*/
|
|
19264
|
+
export function readFixture(path: string): void;
|
|
19265
|
+
|
|
19266
|
+
/**
|
|
19267
|
+
* Reads a test fixture.
|
|
19268
|
+
*/
|
|
19269
|
+
export function readFixture(path: string): void;
|
|
19270
|
+
|
|
19271
|
+
/**
|
|
19272
|
+
* Reads a test fixture.
|
|
19273
|
+
*/
|
|
19274
|
+
export function readFixture(path: string);
|
|
19060
19275
|
````
|
|
19061
19276
|
|
|
19062
19277
|
|
package/dist/WarnSettings.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
const WarnSettings = function () {
|
|
9
8
|
/** @type {WeakMap<object, Set<string>>} */
|
|
10
9
|
const warnedSettings = new WeakMap();
|
|
@@ -18,19 +17,15 @@ const WarnSettings = function () {
|
|
|
18
17
|
hasBeenWarned(context, setting) {
|
|
19
18
|
return warnedSettings.has(context) && warnedSettings.get(context).has(setting);
|
|
20
19
|
},
|
|
21
|
-
|
|
22
20
|
markSettingAsWarned(context, setting) {
|
|
23
21
|
// istanbul ignore else
|
|
24
22
|
if (!warnedSettings.has(context)) {
|
|
25
23
|
warnedSettings.set(context, new Set());
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
warnedSettings.get(context).add(setting);
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
};
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
var _default = WarnSettings;
|
|
35
30
|
exports.default = _default;
|
|
36
31
|
module.exports = exports.default;
|
package/dist/WarnSettings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarnSettings.js","names":["WarnSettings","warnedSettings","WeakMap","hasBeenWarned","context","setting","has","get","markSettingAsWarned","set","Set","add"],"sources":["../src/WarnSettings.js"],"sourcesContent":["const WarnSettings = function () {\n /** @type {WeakMap<object, Set<string>>} */\n const warnedSettings = new WeakMap();\n\n return {\n /**\n * Warn only once for each context and setting\n *\n * @param {object} context\n * @param {string} setting\n */\n hasBeenWarned (context, setting) {\n return warnedSettings.has(context) && warnedSettings.get(context).has(setting);\n },\n\n markSettingAsWarned (context, setting) {\n // istanbul ignore else\n if (!warnedSettings.has(context)) {\n warnedSettings.set(context, new Set());\n }\n\n warnedSettings.get(context).add(setting);\n },\n };\n};\n\nexport default WarnSettings;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarnSettings.js","names":["WarnSettings","warnedSettings","WeakMap","hasBeenWarned","context","setting","has","get","markSettingAsWarned","set","Set","add"],"sources":["../src/WarnSettings.js"],"sourcesContent":["const WarnSettings = function () {\n /** @type {WeakMap<object, Set<string>>} */\n const warnedSettings = new WeakMap();\n\n return {\n /**\n * Warn only once for each context and setting\n *\n * @param {object} context\n * @param {string} setting\n */\n hasBeenWarned (context, setting) {\n return warnedSettings.has(context) && warnedSettings.get(context).has(setting);\n },\n\n markSettingAsWarned (context, setting) {\n // istanbul ignore else\n if (!warnedSettings.has(context)) {\n warnedSettings.set(context, new Set());\n }\n\n warnedSettings.get(context).add(setting);\n },\n };\n};\n\nexport default WarnSettings;\n"],"mappings":";;;;;;AAAA,MAAMA,YAAY,GAAG,YAAY;EAC/B;EACA,MAAMC,cAAc,GAAG,IAAIC,OAAO,EAAE;EAEpC,OAAO;IACL;AACJ;AACA;AACA;AACA;AACA;IACIC,aAAa,CAAEC,OAAO,EAAEC,OAAO,EAAE;MAC/B,OAAOJ,cAAc,CAACK,GAAG,CAACF,OAAO,CAAC,IAAIH,cAAc,CAACM,GAAG,CAACH,OAAO,CAAC,CAACE,GAAG,CAACD,OAAO,CAAC;IAChF,CAAC;IAEDG,mBAAmB,CAAEJ,OAAO,EAAEC,OAAO,EAAE;MACrC;MACA,IAAI,CAACJ,cAAc,CAACK,GAAG,CAACF,OAAO,CAAC,EAAE;QAChCH,cAAc,CAACQ,GAAG,CAACL,OAAO,EAAE,IAAIM,GAAG,EAAE,CAAC;MACxC;MAEAT,cAAc,CAACM,GAAG,CAACH,OAAO,CAAC,CAACO,GAAG,CAACN,OAAO,CAAC;IAC1C;EACF,CAAC;AACH,CAAC;AAAC,eAEaL,YAAY;AAAA;AAAA"}
|