Skip to content

Commit 39a1502

Browse files
committed
chore: enable biome check on CI
1 parent df725db commit 39a1502

4 files changed

Lines changed: 56 additions & 54 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ jobs:
7575
- name: Install Dependencies
7676
run: pnpm install
7777

78-
- name: Prettier
79-
run: pnpm run prettier:ci
78+
- name: Lint
79+
run: |
80+
pnpm run prettier:ci
81+
pnpm run lint

biome.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
3+
"formatter": {
4+
"enabled": false,
5+
},
36
"files": {
47
"ignore": [
58
"client-src/**/*",

rstest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from '@rstest/core';
21
import { version } from '@rspack/core/package.json';
2+
import { defineConfig } from '@rstest/core';
33

44
console.log(`Running tests for rspack @${version} \n`);
55

src/server.ts

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -15,61 +15,61 @@ import * as url from 'node:url';
1515
import * as util from 'node:util';
1616
import * as ipaddr from 'ipaddr.js';
1717
import type {
18+
AddressInfo,
1819
BasicApplication,
20+
ByPass,
21+
ClientConfiguration,
22+
ClientConnection,
23+
Compiler,
24+
ConnectHistoryApiFallbackOptions,
25+
DevMiddlewareContext,
26+
DevMiddlewareOptions,
27+
DevServer,
28+
EXPECTED_ANY,
1929
ExpressApplication,
30+
FSWatcher,
2031
HTTPServer,
21-
Response,
22-
Request,
32+
HandleFunction,
33+
Headers,
2334
Host,
24-
Port,
25-
DevMiddlewareOptions,
26-
ConnectHistoryApiFallbackOptions,
27-
WatchFiles,
28-
Static,
29-
ServerType,
30-
ServerConfiguration,
31-
WebSocketServerConfiguration,
32-
ProxyConfigArray,
33-
Open,
34-
ClientConfiguration,
35+
IPv6,
36+
IncomingMessage,
3537
Middleware,
36-
DevMiddlewareContext,
37-
OverlayMessageOptions,
38-
Compiler,
38+
MiddlewareHandler,
39+
MiddlewareObject,
3940
MultiCompiler,
40-
FSWatcher,
41-
EXPECTED_ANY,
42-
RequestHandler,
43-
Socket,
44-
WebSocketServerImplementation,
45-
Stats,
4641
MultiStats,
47-
DevServer,
48-
StatsOptions,
4942
NetworkInterfaceInfo,
50-
WebSocketURL,
51-
WatchOptions,
52-
NormalizedStatic,
53-
ServerOptions,
43+
NextFunction,
44+
NextHandleFunction,
5445
NormalizedOpen,
46+
NormalizedStatic,
47+
Open,
48+
OpenApp,
5549
OpenOptions,
56-
StatsCompilation,
57-
NextFunction,
58-
MiddlewareHandler,
50+
OverlayMessageOptions,
51+
Port,
52+
ProxyConfigArray,
5953
ProxyConfigArrayItem,
60-
ByPass,
54+
Request,
55+
RequestHandler,
56+
Response,
6157
ServeIndexOptions,
62-
WebSocketServer,
63-
ClientConnection,
64-
IncomingMessage,
65-
MiddlewareObject,
66-
NextHandleFunction,
67-
HandleFunction,
58+
ServerConfiguration,
59+
ServerOptions,
60+
ServerType,
6861
SimpleHandleFunction,
69-
OpenApp,
70-
AddressInfo,
71-
IPv6,
72-
Headers,
62+
Socket,
63+
Static,
64+
Stats,
65+
StatsCompilation,
66+
StatsOptions,
67+
WatchFiles,
68+
WatchOptions,
69+
WebSocketServer,
70+
WebSocketServerConfiguration,
71+
WebSocketServerImplementation,
72+
WebSocketURL,
7373
} from './types';
7474

7575
const { styleText } = util;
@@ -1344,13 +1344,11 @@ class Server<
13441344
case 'string':
13451345
// could be 'sockjs', 'ws', or a path that should be required
13461346
if (clientTransport === 'sockjs') {
1347-
clientImplementation = require.resolve(
1348-
'../client/clients/SockJSClient',
1349-
);
1347+
clientImplementation =
1348+
require.resolve('../client/clients/SockJSClient');
13501349
} else if (clientTransport === 'ws') {
1351-
clientImplementation = require.resolve(
1352-
'../client/clients/WebSocketClient',
1353-
);
1350+
clientImplementation =
1351+
require.resolve('../client/clients/WebSocketClient');
13541352
} else {
13551353
try {
13561354
clientImplementation = require.resolve(clientTransport);
@@ -1494,9 +1492,8 @@ class Server<
14941492
}
14951493

14961494
compiler.options.resolve.alias = {
1497-
'ansi-html-community': require.resolve(
1498-
'@rspack/dev-server/client/utils/ansiHTML',
1499-
),
1495+
'ansi-html-community':
1496+
require.resolve('@rspack/dev-server/client/utils/ansiHTML'),
15001497
...compiler.options.resolve.alias,
15011498
};
15021499
}

0 commit comments

Comments
 (0)