eslint-plugin-jsdoc 39.3.6 → 39.3.13
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 +281 -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 +11 -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,32 @@ 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
|
+
}
|
|
3759
|
+
|
|
3760
|
+
declare global {
|
|
3761
|
+
/**
|
|
3762
|
+
* @param r Range is 0-1.
|
|
3763
|
+
* @param g Range is 0-1.
|
|
3764
|
+
* @param b Range is 0-1.
|
|
3765
|
+
*/
|
|
3766
|
+
function Color(
|
|
3767
|
+
this: void,
|
|
3768
|
+
r: float,
|
|
3769
|
+
g: float,
|
|
3770
|
+
b: float,
|
|
3771
|
+
): Color;
|
|
3772
|
+
}
|
|
3663
3773
|
````
|
|
3664
3774
|
|
|
3665
3775
|
|
|
@@ -6283,7 +6393,7 @@ function quux (foo) {
|
|
|
6283
6393
|
|
|
6284
6394
|
/**
|
|
6285
6395
|
* @module test
|
|
6286
|
-
* @license MIT
|
|
6396
|
+
* @license MIT\r
|
|
6287
6397
|
*/
|
|
6288
6398
|
'use strict';
|
|
6289
6399
|
|
|
@@ -8360,14 +8470,14 @@ function quux () {
|
|
|
8360
8470
|
// Message: There must be no newline after the description of the JSDoc block.
|
|
8361
8471
|
|
|
8362
8472
|
|
|
8363
|
-
|
|
8364
|
-
* Bar
|
|
8365
|
-
|
|
8366
|
-
* Bar
|
|
8367
|
-
|
|
8368
|
-
* @bar
|
|
8369
|
-
|
|
8370
|
-
function quux () {
|
|
8473
|
+
/**\r
|
|
8474
|
+
* Bar.\r
|
|
8475
|
+
*\r
|
|
8476
|
+
* Bar.\r
|
|
8477
|
+
*\r
|
|
8478
|
+
* @bar\r
|
|
8479
|
+
*/\r
|
|
8480
|
+
function quux () {\r
|
|
8371
8481
|
|
|
8372
8482
|
}
|
|
8373
8483
|
// "jsdoc/newline-after-description": ["error"|"warn", "never"]
|
|
@@ -8391,12 +8501,12 @@ function quux () {
|
|
|
8391
8501
|
// Message: There must be a newline after the description of the JSDoc block.
|
|
8392
8502
|
|
|
8393
8503
|
|
|
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
|
|
8504
|
+
/**\r
|
|
8505
|
+
* Service for fetching symbols.\r
|
|
8506
|
+
* @param {object} $http - Injected http helper.\r
|
|
8507
|
+
* @param {object} $q - Injected Promise api helper.\r
|
|
8508
|
+
* @param {object} $location - Injected window location object.\r
|
|
8509
|
+
* @param {object} REPORT_DIALOG_CONSTANTS - Injected handle.\r
|
|
8400
8510
|
*/
|
|
8401
8511
|
// Message: There must be a newline after the description of the JSDoc block.
|
|
8402
8512
|
|
|
@@ -8459,20 +8569,20 @@ function quux () {
|
|
|
8459
8569
|
// "jsdoc/newline-after-description": ["error"|"warn", "never"]
|
|
8460
8570
|
|
|
8461
8571
|
|
|
8462
|
-
|
|
8463
|
-
* @foo
|
|
8464
|
-
* Test
|
|
8465
|
-
* abc
|
|
8466
|
-
* @bar
|
|
8572
|
+
/**\r
|
|
8573
|
+
* @foo\r
|
|
8574
|
+
* Test \r
|
|
8575
|
+
* abc \r
|
|
8576
|
+
* @bar \r
|
|
8467
8577
|
*/
|
|
8468
8578
|
|
|
8469
8579
|
|
|
8470
|
-
|
|
8471
|
-
*
|
|
8472
|
-
* @foo
|
|
8473
|
-
* Test
|
|
8474
|
-
* abc
|
|
8475
|
-
* @bar
|
|
8580
|
+
/**\r
|
|
8581
|
+
* \r
|
|
8582
|
+
* @foo\r
|
|
8583
|
+
* Test \r
|
|
8584
|
+
* abc \r
|
|
8585
|
+
* @bar \r
|
|
8476
8586
|
*/
|
|
8477
8587
|
|
|
8478
8588
|
/***
|
|
@@ -8483,16 +8593,16 @@ function quux () {
|
|
|
8483
8593
|
}
|
|
8484
8594
|
// "jsdoc/newline-after-description": ["error"|"warn", "always"]
|
|
8485
8595
|
|
|
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
|
|
8596
|
+
/**\r
|
|
8597
|
+
* Parses query string to object containing URL parameters\r
|
|
8598
|
+
* \r
|
|
8599
|
+
* @param queryString\r
|
|
8600
|
+
* Input string\r
|
|
8601
|
+
* \r
|
|
8602
|
+
* @returns\r
|
|
8603
|
+
* Object containing URL parameters\r
|
|
8604
|
+
*/\r
|
|
8605
|
+
export function parseQueryString(queryString: string): { [key: string]: string } { // <-- Line 10 that fails\r
|
|
8496
8606
|
|
|
8497
8607
|
}
|
|
8498
8608
|
|
|
@@ -17304,6 +17414,41 @@ function quux (foo) {
|
|
|
17304
17414
|
return foo;
|
|
17305
17415
|
}
|
|
17306
17416
|
// Message: JSDoc @returns declaration set with "never" but return expression is present in function.
|
|
17417
|
+
|
|
17418
|
+
/**
|
|
17419
|
+
* Reads a test fixture.
|
|
17420
|
+
*
|
|
17421
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17422
|
+
* operating system.
|
|
17423
|
+
*
|
|
17424
|
+
* @returns The file contents as buffer.
|
|
17425
|
+
*/
|
|
17426
|
+
export function readFixture(path: string): void;
|
|
17427
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17428
|
+
|
|
17429
|
+
/**
|
|
17430
|
+
* Reads a test fixture.
|
|
17431
|
+
*
|
|
17432
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17433
|
+
* operating system.
|
|
17434
|
+
*
|
|
17435
|
+
* @returns The file contents as buffer.
|
|
17436
|
+
*/
|
|
17437
|
+
export function readFixture(path: string);
|
|
17438
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17439
|
+
|
|
17440
|
+
/**
|
|
17441
|
+
* Reads a test fixture.
|
|
17442
|
+
*
|
|
17443
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17444
|
+
* operating system.
|
|
17445
|
+
*
|
|
17446
|
+
* @returns The file contents as buffer.
|
|
17447
|
+
*/
|
|
17448
|
+
export function readFixture(path: string): void {
|
|
17449
|
+
return;
|
|
17450
|
+
};
|
|
17451
|
+
// Message: JSDoc @returns declaration present but return expression not available in function.
|
|
17307
17452
|
````
|
|
17308
17453
|
|
|
17309
17454
|
The following patterns are not considered problems:
|
|
@@ -17680,6 +17825,46 @@ function * quux() {}
|
|
|
17680
17825
|
function * quux() {}
|
|
17681
17826
|
// Settings: {"jsdoc":{"mode":"jsdoc"}}
|
|
17682
17827
|
// "jsdoc/require-returns-check": ["error"|"warn", {"exemptGenerators":true}]
|
|
17828
|
+
|
|
17829
|
+
/**
|
|
17830
|
+
* @param {unknown} val
|
|
17831
|
+
* @returns { asserts val is number }
|
|
17832
|
+
*/
|
|
17833
|
+
function assertNumber(val) {
|
|
17834
|
+
assert(typeof val === 'number');
|
|
17835
|
+
}
|
|
17836
|
+
|
|
17837
|
+
/**
|
|
17838
|
+
* Reads a test fixture.
|
|
17839
|
+
*
|
|
17840
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17841
|
+
* operating system.
|
|
17842
|
+
*
|
|
17843
|
+
* @returns The file contents as buffer.
|
|
17844
|
+
*/
|
|
17845
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
17846
|
+
|
|
17847
|
+
/**
|
|
17848
|
+
* Reads a test fixture.
|
|
17849
|
+
*
|
|
17850
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17851
|
+
* operating system.
|
|
17852
|
+
*
|
|
17853
|
+
* @returns The file contents as buffer.
|
|
17854
|
+
*/
|
|
17855
|
+
export function readFixture(path: string): Promise<Buffer> {
|
|
17856
|
+
return new Promise(() => {});
|
|
17857
|
+
}
|
|
17858
|
+
|
|
17859
|
+
/**
|
|
17860
|
+
* Reads a test fixture.
|
|
17861
|
+
*
|
|
17862
|
+
* @param path The path to resolve relative to the fixture base. It will be normalized for the
|
|
17863
|
+
* operating system.
|
|
17864
|
+
*
|
|
17865
|
+
* @returns {void} The file contents as buffer.
|
|
17866
|
+
*/
|
|
17867
|
+
export function readFixture(path: string);
|
|
17683
17868
|
````
|
|
17684
17869
|
|
|
17685
17870
|
|
|
@@ -18554,6 +18739,26 @@ export const sleep = (ms: number) => {
|
|
|
18554
18739
|
return new Promise<string>((res) => setTimeout(res, ms));
|
|
18555
18740
|
};
|
|
18556
18741
|
// Message: Missing JSDoc @returns declaration.
|
|
18742
|
+
|
|
18743
|
+
/**
|
|
18744
|
+
* Reads a test fixture.
|
|
18745
|
+
*/
|
|
18746
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
18747
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18748
|
+
|
|
18749
|
+
/**
|
|
18750
|
+
* Reads a test fixture.
|
|
18751
|
+
*/
|
|
18752
|
+
export function readFixture(path: string): void;
|
|
18753
|
+
// "jsdoc/require-returns": ["error"|"warn", {"forceRequireReturn":true}]
|
|
18754
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18755
|
+
|
|
18756
|
+
/**
|
|
18757
|
+
* Reads a test fixture.
|
|
18758
|
+
*/
|
|
18759
|
+
export function readFixture(path: string);
|
|
18760
|
+
// "jsdoc/require-returns": ["error"|"warn", {"forceRequireReturn":true}]
|
|
18761
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18557
18762
|
````
|
|
18558
18763
|
|
|
18559
18764
|
The following patterns are not considered problems:
|
|
@@ -19057,6 +19262,30 @@ export const sleep = (ms: number) =>
|
|
|
19057
19262
|
export const sleep = (ms: number) => {
|
|
19058
19263
|
return new Promise<void>((res) => setTimeout(res, ms));
|
|
19059
19264
|
};
|
|
19265
|
+
|
|
19266
|
+
/**
|
|
19267
|
+
* Reads a test fixture.
|
|
19268
|
+
*
|
|
19269
|
+
* @returns The file contents as buffer.
|
|
19270
|
+
*/
|
|
19271
|
+
export function readFixture(path: string): Promise<Buffer>;
|
|
19272
|
+
|
|
19273
|
+
/**
|
|
19274
|
+
* Reads a test fixture.
|
|
19275
|
+
*
|
|
19276
|
+
* @returns {void}.
|
|
19277
|
+
*/
|
|
19278
|
+
export function readFixture(path: string): void;
|
|
19279
|
+
|
|
19280
|
+
/**
|
|
19281
|
+
* Reads a test fixture.
|
|
19282
|
+
*/
|
|
19283
|
+
export function readFixture(path: string): void;
|
|
19284
|
+
|
|
19285
|
+
/**
|
|
19286
|
+
* Reads a test fixture.
|
|
19287
|
+
*/
|
|
19288
|
+
export function readFixture(path: string);
|
|
19060
19289
|
````
|
|
19061
19290
|
|
|
19062
19291
|
|
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"}
|