Skip to content

Commit b113b44

Browse files
authored
chore: update eslint-plugin-unicorn (#15219)
1 parent d669eed commit b113b44

File tree

5 files changed

+18
-61
lines changed

5 files changed

+18
-61
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"eslint-plugin-markdown": "^3.0.0",
4242
"eslint-plugin-prettier": "^5.0.0",
4343
"eslint-plugin-promise": "^6.1.1",
44-
"eslint-plugin-unicorn": "^54.0.0",
44+
"eslint-plugin-unicorn": "^55.0.0",
4545
"execa": "^5.0.0",
4646
"find-process": "^1.4.1",
4747
"glob": "^10.3.10",

packages/jest-reporters/src/GitHubActionsReporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default class GitHubActionsReporter extends BaseReporter {
173173
private printFullResult(context: TestContext, results: TestResult): void {
174174
const rootDir = context.config.rootDir;
175175
let testDir = results.testFilePath.replace(rootDir, '');
176-
testDir = testDir.slice(1, testDir.length);
176+
testDir = testDir.slice(1);
177177
const resultTree = this.getResultTree(
178178
results.testResults,
179179
testDir,
@@ -409,7 +409,7 @@ export default class GitHubActionsReporter extends BaseReporter {
409409
for (const result of results) {
410410
let testDir = result.testFilePath;
411411
testDir = testDir.replace(rootDir, '');
412-
testDir = testDir.slice(1, testDir.length);
412+
testDir = testDir.slice(1);
413413
if (result.failureMessage) {
414414
if (!written) {
415415
this.log('');

packages/jest-reporters/src/trimAndFormatPath.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ export default function trimAndFormatPath(
3131
const basenameLength = basename.length;
3232
if (basenameLength + 4 < maxLength) {
3333
const dirnameLength = maxLength - 4 - basenameLength;
34-
dirname = `...${dirname.slice(
35-
dirname.length - dirnameLength,
36-
dirname.length,
37-
)}`;
34+
dirname = `...${dirname.slice(dirname.length - dirnameLength)}`;
3835
return slash(chalk.dim(dirname + path.sep) + chalk.bold(basename));
3936
}
4037

@@ -44,8 +41,6 @@ export default function trimAndFormatPath(
4441

4542
// can't fit dirname, but can fit trimmed basename
4643
return slash(
47-
chalk.bold(
48-
`...${basename.slice(basename.length - maxLength - 4, basename.length)}`,
49-
),
44+
chalk.bold(`...${basename.slice(basename.length - maxLength - 4)}`),
5045
);
5146
}

packages/jest-reporters/src/wrapAnsiString.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function wrapAnsiString(
3232
}
3333

3434
if (lastIndex !== string.length - 1) {
35-
tokens.push(['string', string.slice(lastIndex, string.length)]);
35+
tokens.push(['string', string.slice(lastIndex)]);
3636
}
3737

3838
let lastLineLength = 0;
@@ -44,10 +44,7 @@ export default function wrapAnsiString(
4444
if (lastLineLength + token.length > terminalWidth) {
4545
while (token.length > 0) {
4646
const chunk = token.slice(0, terminalWidth - lastLineLength);
47-
const remaining = token.slice(
48-
terminalWidth - lastLineLength,
49-
token.length,
50-
);
47+
const remaining = token.slice(terminalWidth - lastLineLength);
5148
lines[lines.length - 1] += chunk;
5249
lastLineLength += chunk.length;
5350
token = remaining;

yarn.lock

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,23 +2886,6 @@ __metadata:
28862886
languageName: node
28872887
linkType: hard
28882888

2889-
"@eslint/eslintrc@npm:^3.0.2":
2890-
version: 3.1.0
2891-
resolution: "@eslint/eslintrc@npm:3.1.0"
2892-
dependencies:
2893-
ajv: ^6.12.4
2894-
debug: ^4.3.2
2895-
espree: ^10.0.1
2896-
globals: ^14.0.0
2897-
ignore: ^5.2.0
2898-
import-fresh: ^3.2.1
2899-
js-yaml: ^4.1.0
2900-
minimatch: ^3.1.2
2901-
strip-json-comments: ^3.1.1
2902-
checksum: b0a9bbd98c8b9e0f4d975b042ff9b874dde722b20834ea2ff46551c3de740d4f10f56c449b790ef34d7f82147cbddfc22b004a43cc885dbc2664bb134766b5e4
2903-
languageName: node
2904-
linkType: hard
2905-
29062889
"@eslint/js@npm:8.57.0":
29072890
version: 8.57.0
29082891
resolution: "@eslint/js@npm:8.57.0"
@@ -3412,7 +3395,7 @@ __metadata:
34123395
eslint-plugin-markdown: ^3.0.0
34133396
eslint-plugin-prettier: ^5.0.0
34143397
eslint-plugin-promise: ^6.1.1
3415-
eslint-plugin-unicorn: ^54.0.0
3398+
eslint-plugin-unicorn: ^55.0.0
34163399
execa: ^5.0.0
34173400
find-process: ^1.4.1
34183401
glob: ^10.3.10
@@ -6588,7 +6571,7 @@ __metadata:
65886571
languageName: node
65896572
linkType: hard
65906573

6591-
"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.12.0, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
6574+
"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
65926575
version: 8.12.1
65936576
resolution: "acorn@npm:8.12.1"
65946577
bin:
@@ -10146,17 +10129,17 @@ __metadata:
1014610129
languageName: node
1014710130
linkType: hard
1014810131

10149-
"eslint-plugin-unicorn@npm:^54.0.0":
10150-
version: 54.0.0
10151-
resolution: "eslint-plugin-unicorn@npm:54.0.0"
10132+
"eslint-plugin-unicorn@npm:^55.0.0":
10133+
version: 55.0.0
10134+
resolution: "eslint-plugin-unicorn@npm:55.0.0"
1015210135
dependencies:
1015310136
"@babel/helper-validator-identifier": ^7.24.5
1015410137
"@eslint-community/eslint-utils": ^4.4.0
10155-
"@eslint/eslintrc": ^3.0.2
1015610138
ci-info: ^4.0.0
1015710139
clean-regexp: ^1.0.0
1015810140
core-js-compat: ^3.37.0
1015910141
esquery: ^1.5.0
10142+
globals: ^15.7.0
1016010143
indent-string: ^4.0.0
1016110144
is-builtin-module: ^3.2.1
1016210145
jsesc: ^3.0.2
@@ -10168,7 +10151,7 @@ __metadata:
1016810151
strip-indent: ^3.0.0
1016910152
peerDependencies:
1017010153
eslint: ">=8.56.0"
10171-
checksum: f071c79e7b7416be4d6e5b1900f20b995b841393baf7c31c56534a4e7b144bf728a07bf107585a8d1e0525010df448d16862aaa38cb9309f798a59bd91efbe4d
10154+
checksum: c925254406e687c5caaf7e019c083107b9d309569c78ec8d32e5d7c539cfb6331b5f88dc647c35e26f07493c287d39970f05fa0279787ba86bfc6edd7701bd8c
1017210155
languageName: node
1017310156
linkType: hard
1017410157

@@ -10199,13 +10182,6 @@ __metadata:
1019910182
languageName: node
1020010183
linkType: hard
1020110184

10202-
"eslint-visitor-keys@npm:^4.0.0":
10203-
version: 4.0.0
10204-
resolution: "eslint-visitor-keys@npm:4.0.0"
10205-
checksum: 5c09f89cf29d87cdbfbac38802a880d3c2e65f8cb61c689888346758f1e24a4c7f6caefeac9474dfa52058a99920623599bdb00516976a30134abeba91275aa2
10206-
languageName: node
10207-
linkType: hard
10208-
1020910185
"eslint@npm:^8.8.0":
1021010186
version: 8.57.0
1021110187
resolution: "eslint@npm:8.57.0"
@@ -10254,17 +10230,6 @@ __metadata:
1025410230
languageName: node
1025510231
linkType: hard
1025610232

10257-
"espree@npm:^10.0.1":
10258-
version: 10.1.0
10259-
resolution: "espree@npm:10.1.0"
10260-
dependencies:
10261-
acorn: ^8.12.0
10262-
acorn-jsx: ^5.3.2
10263-
eslint-visitor-keys: ^4.0.0
10264-
checksum: a4708ab987f6c03734b8738b1588e9f31b2e305e869ca4677c60d82294eb05f7099b6687eb39eeb0913bb2d49bdf0bd0f31c511599ea7ee171281f871a9c897e
10265-
languageName: node
10266-
linkType: hard
10267-
1026810233
"espree@npm:^9.6.0, espree@npm:^9.6.1":
1026910234
version: 9.6.1
1027010235
resolution: "espree@npm:9.6.1"
@@ -11577,10 +11542,10 @@ __metadata:
1157711542
languageName: node
1157811543
linkType: hard
1157911544

11580-
"globals@npm:^14.0.0":
11581-
version: 14.0.0
11582-
resolution: "globals@npm:14.0.0"
11583-
checksum: 534b8216736a5425737f59f6e6a5c7f386254560c9f41d24a9227d60ee3ad4a9e82c5b85def0e212e9d92162f83a92544be4c7fd4c902cb913736c10e08237ac
11545+
"globals@npm:^15.7.0":
11546+
version: 15.8.0
11547+
resolution: "globals@npm:15.8.0"
11548+
checksum: 92d0522c47226ca12f6fd8938df04b37852d812cc5a84e31890d919497f102a818d2081570bc08c2dd6353cd8b2699e7180bc468abbbec8c858a19e0fa53aeb8
1158411549
languageName: node
1158511550
linkType: hard
1158611551

0 commit comments

Comments
 (0)