aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-11-06 09:52:17 +0100
committerGitHub <[email protected]>2023-11-06 08:52:17 +0000
commit813a34dc6be0f364fceaa2400823e0d4bab98b8d (patch)
treeab9afe0cfdf45a0f9226a74a12b51ea264944304 /scripts
parent48a7af4f0470115945ab166b540d0bedc7e5eb20 (diff)
downloadfaker-813a34dc6be0f364fceaa2400823e0d4bab98b8d.tar.xz
faker-813a34dc6be0f364fceaa2400823e0d4bab98b8d.zip
infra(unicorn): prefer-negative-index (#2512)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidoc/signature.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts
index 2cca92b9..43026a78 100644
--- a/scripts/apidoc/signature.ts
+++ b/scripts/apidoc/signature.ts
@@ -342,7 +342,7 @@ function extractDefaultFromComment(comment?: Comment): string | undefined {
throw new Error(`Found description text after the default value:\n${text}`);
}
- summary.splice(summary.length - 2, 2);
+ summary.splice(-2, 2);
const lastSummaryPart = summary[summary.length - 1];
lastSummaryPart.text = lastSummaryPart.text.replace(/[ \n]Defaults to $/, '');
return result[2];