Skip to content

Commit 08d4144

Browse files
committed
style: lint write
1 parent 8d2ce00 commit 08d4144

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ async function getRetryCode(
7575
): Promise<string> {
7676
const filename = 'initialChunkRetry';
7777
// In production, files are in dist/runtime, in development they are in src/runtime
78-
const baseDir = __dirname.includes('/dist/')
79-
? __dirname
78+
const baseDir = __dirname.includes('/dist/')
79+
? __dirname
8080
: path.join(__dirname, '..', 'dist');
8181
const runtimeFilePath = path.join(
8282
baseDir,

src/runtime/initialChunkRetry.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ function validateTargetInfo(
5555
return { target, tagName, url };
5656
}
5757

58-
5958
function createElement(
6059
origin: HTMLElement,
6160
attributes: ScriptElementAttributes,

test/basic/multiRules.test.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,21 @@ test('should support multiple retry rules', async ({ page }) => {
8080
expect(cssBlockedResponseCount).toBeGreaterThanOrEqual(1);
8181

8282
// Check retry contexts
83-
const jsRetries = onRetryContextList.filter(ctx => ctx.url.includes('.js'));
84-
const cssRetries = onRetryContextList.filter(ctx => ctx.url.includes('.css'));
83+
const jsRetries = onRetryContextList.filter((ctx) => ctx.url.includes('.js'));
84+
const cssRetries = onRetryContextList.filter((ctx) =>
85+
ctx.url.includes('.css'),
86+
);
8587

8688
expect(jsRetries.length).toBeGreaterThanOrEqual(2);
8789
expect(cssRetries.length).toBeGreaterThanOrEqual(1);
8890

8991
// Check success contexts
90-
const jsSuccess = onSuccessContextList.filter(ctx => ctx.url.includes('.js'));
91-
const cssSuccess = onSuccessContextList.filter(ctx => ctx.url.includes('.css'));
92+
const jsSuccess = onSuccessContextList.filter((ctx) =>
93+
ctx.url.includes('.js'),
94+
);
95+
const cssSuccess = onSuccessContextList.filter((ctx) =>
96+
ctx.url.includes('.css'),
97+
);
9298

9399
expect(jsSuccess.length).toBeGreaterThanOrEqual(1);
94100
expect(cssSuccess.length).toBeGreaterThanOrEqual(1);
@@ -157,7 +163,9 @@ test('should match rules by test function', async ({ page }) => {
157163
logger.level = 'log';
158164
});
159165

160-
test('should use first matching rule when multiple rules match', async ({ page }) => {
166+
test('should use first matching rule when multiple rules match', async ({
167+
page,
168+
}) => {
161169
logger.level = 'verbose';
162170
const { logs, restore } = proxyConsole();
163171

@@ -187,10 +195,8 @@ test('should use first matching rule when multiple rules match', async ({ page }
187195
],
188196
});
189197

190-
const { onRetryContextList, onSuccessContextList, onFailContextList } = await proxyPageConsole(
191-
page,
192-
rsbuild.port,
193-
);
198+
const { onRetryContextList, onSuccessContextList, onFailContextList } =
199+
await proxyPageConsole(page, rsbuild.port);
194200

195201
await gotoPage(page, rsbuild);
196202
const compTestElement = page.locator('#comp-test');

0 commit comments

Comments
 (0)