Skip to content

Commit 316a271

Browse files
committed
chore: change biome check to biome lint
1 parent b4ff0b8 commit 316a271

55 files changed

Lines changed: 2910 additions & 2944 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ module.exports = {
88
files: "*.json",
99
options: {
1010
parser: "json",
11-
useTabs: false,
12-
},
11+
useTabs: false
12+
}
1313
},
1414
{
1515
files: "*.ts",
1616
options: {
17-
parser: "typescript",
18-
},
19-
},
20-
],
17+
parser: "typescript"
18+
}
19+
}
20+
]
2121
};

jest.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ const isWin = os.platform() === "win32";
44
const config = {
55
preset: "ts-jest",
66
testEnvironmentOptions: {
7-
url: "http://localhost/",
7+
url: "http://localhost/"
88
},
99
testMatch: [
1010
"<rootDir>/tests/*.test.ts",
1111
// TODO: enable after migrating to separated repo
12-
"<rootDir>/tests/e2e/*.test.js",
12+
"<rootDir>/tests/e2e/*.test.js"
1313
],
1414
testPathIgnorePatterns: [
1515
// TODO: check why http proxy server throw error with websocket server
@@ -19,26 +19,26 @@ const config = {
1919
// TODO: check why this test throw error when run with other tests
2020
"<rootDir>/tests/e2e/watch-files.test.js",
2121
// TODO: check why this test timeout
22-
"<rootDir>/tests/e2e/web-socket-server-url.test.js",
22+
"<rootDir>/tests/e2e/web-socket-server-url.test.js"
2323
],
2424
cache: false,
2525
testTimeout: process.env.CI ? 120000 : 30000,
2626
transform: {
2727
"(.*)\\.{js,ts}": [
2828
"ts-jest",
2929
{
30-
tsconfig: "<rootDir>/tests/tsconfig.json",
31-
},
32-
],
30+
tsconfig: "<rootDir>/tests/tsconfig.json"
31+
}
32+
]
3333
},
3434
// Add this to find out which test timeouts
3535
// testSequencer: "<rootDir>/tests/helpers/sequencer.js",
3636
snapshotResolver: "<rootDir>/tests/helpers/snapshot-resolver.js",
3737
setupFilesAfterEnv: ["<rootDir>/tests/helpers/setup-test.js"],
3838
globalSetup: "<rootDir>/tests/helpers/global-setup-test.js",
3939
moduleNameMapper: {
40-
"^uuid$": require.resolve("uuid"),
41-
},
40+
"^uuid$": require.resolve("uuid")
41+
}
4242
};
4343

4444
module.exports = config;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
},
3636
"nano-staged": {
3737
"*.{js,jsx,ts,tsx,mjs,cjs}": [
38-
"biome check --write --no-errors-on-unmatched"
38+
"npm run format",
39+
"biome lint --write --no-errors-on-unmatched"
3940
]
4041
},
4142
"files": ["dist", "client"],

scripts/release.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const currentVersion = pkg.version;
1515
const nextVersion = inc(currentVersion, RELEASE_VERSION_TYPE);
1616
if (!nextVersion) {
1717
throw new Error(
18-
`Failed to generate next version from "${currentVersion}" with type "${RELEASE_VERSION_TYPE}"`,
18+
`Failed to generate next version from "${currentVersion}" with type "${RELEASE_VERSION_TYPE}"`
1919
);
2020
}
2121

src/server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const getFreePort = async function getFreePort(port: string, host: string) {
4040
: 3;
4141

4242
return pRetry(() => getPort(basePort, host), {
43-
retries: defaultPortRetry,
43+
retries: defaultPortRetry
4444
});
4545
};
4646

@@ -85,15 +85,15 @@ export class RspackDevServer extends WebpackDevServer {
8585
if (mode === "production") {
8686
this.logger.warn(
8787
"Hot Module Replacement (HMR) is enabled for the production build. \n" +
88-
"Make sure to disable HMR for production by setting `devServer.hot` to `false` in the configuration.",
88+
"Make sure to disable HMR for production by setting `devServer.hot` to `false` in the configuration."
8989
);
9090
}
9191

9292
compiler.options.resolve.alias = {
9393
"ansi-html-community": require.resolve(
94-
"@rspack/dev-server/client/utils/ansiHTML",
94+
"@rspack/dev-server/client/utils/ansiHTML"
9595
),
96-
...compiler.options.resolve.alias,
96+
...compiler.options.resolve.alias
9797
};
9898
}
9999
}

tests/ansiHTML.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ import ansiHTML from "../client-src/utils/ansiHTML";
33
describe("ansi-html", () => {
44
it("should transform 24-bit rgb ansi colors", () => {
55
expect(ansiHTML("\u001b[38;2;255;30;30m×\u001b[0m")).toMatchInlineSnapshot(
6-
`"<span style="color: rgb(255,30,30);">×</span><span style="font-weight:normal;opacity:1;color:#fff;background:#000;"></span>"`,
6+
`"<span style="color: rgb(255,30,30);">×</span><span style="font-weight:normal;opacity:1;color:#fff;background:#000;"></span>"`
77
);
88
});
99

1010
it("should transform 24-bit rgb ansi colors with additional properties", () => {
1111
expect(
12-
ansiHTML("[\u001b[38;2;92;157;255;1;4m/root/index.js\u001b[0m:1:1]"),
12+
ansiHTML("[\u001b[38;2;92;157;255;1;4m/root/index.js\u001b[0m:1:1]")
1313
).toMatchInlineSnapshot(
14-
`"[<span style="color: rgb(92,157,255);"><span style="font-weight:bold;"><u>/root/index.js</u></span></span><span style="font-weight:normal;opacity:1;color:#fff;background:#000;">:1:1]</span>"`,
14+
`"[<span style="color: rgb(92,157,255);"><span style="font-weight:bold;"><u>/root/index.js</u></span></span><span style="font-weight:normal;opacity:1;color:#fff;background:#000;">:1:1]</span>"`
1515
);
1616
});
1717

1818
it("should transform basic ansi colors", () => {
1919
expect(ansiHTML("\u001b[0mcontent")).toMatchInlineSnapshot(
20-
`"<span style="font-weight:normal;opacity:1;color:#fff;background:#000;">content</span>"`,
20+
`"<span style="font-weight:normal;opacity:1;color:#fff;background:#000;">content</span>"`
2121
);
2222
expect(
2323
ansiHTML(
24-
"\u001b[33m<\u001b[39m\u001b[33mheader\u001b[39m\u001b[33m>\u001b[39m",
25-
),
24+
"\u001b[33m<\u001b[39m\u001b[33mheader\u001b[39m\u001b[33m>\u001b[39m"
25+
)
2626
).toMatchInlineSnapshot(
27-
`"<span style="color:#e8bf03;"><</span><span style="color:#e8bf03;">header</span><span style="color:#e8bf03;">></span>"`,
27+
`"<span style="color:#e8bf03;"><</span><span style="color:#e8bf03;">header</span><span style="color:#e8bf03;">></span>"`
2828
);
2929
});
3030
});

0 commit comments

Comments
 (0)