Skip to content

Commit

Permalink
infra(unicorn): prefer-negative-index (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Nov 6, 2023
1 parent 48a7af4 commit 813a34d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module.exports = defineConfig({
'unicorn/prefer-code-point': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-negative-index': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/require-array-join-separator': 'off',
Expand Down
2 changes: 1 addition & 1 deletion scripts/apidoc/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 813a34d

Please sign in to comment.