Skip to content

Commit b07decb

Browse files
authored
chore: replace Biome with RSLint and Prettier (#37)
* chore: replace biome with rslint and prettier * fix * fix * fix
1 parent ce7f75a commit b07decb

File tree

21 files changed

+561
-719
lines changed

21 files changed

+561
-719
lines changed

.github/workflows/lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v6
15+
with:
16+
persist-credentials: false
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: '24.14.1'
22+
package-manager-cache: false
23+
24+
- name: Enable Corepack
25+
run: |
26+
npm install -g corepack@latest --force
27+
corepack enable
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Run lint
33+
run: pnpm lint

.github/workflows/playwright.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v6
2828

29-
- name: Install pnpm
30-
uses: pnpm/action-setup@v5
31-
with:
32-
version: 10.33.0
33-
3429
- name: Setup Node.js
3530
uses: actions/setup-node@v6
3631
with:
3732
node-version: '24.14.1'
38-
cache: 'pnpm'
39-
registry-url: 'https://registry.npmjs.org'
33+
package-manager-cache: false
34+
35+
- name: Enable Corepack
36+
run: |
37+
npm install -g corepack@latest --force
38+
corepack enable
4039
4140
- name: Install dependencies
4241
run: pnpm install
@@ -46,4 +45,3 @@ jobs:
4645

4746
- name: Publish to npm
4847
run: pnpm publish --provenance --access public --no-git-checks --tag ${{ inputs.tag }}
49-

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: E2E Test
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
timeout-minutes: 60
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version: '24.14.1'
21+
package-manager-cache: false
22+
23+
- name: Enable Corepack
24+
run: |
25+
npm install -g corepack@latest --force
26+
corepack enable
27+
28+
- name: Install dependencies
29+
run: pnpm install
30+
31+
- name: Build RSC plugin
32+
run: pnpm build
33+
34+
- name: Install Playwright Browsers
35+
run: pnpm exec playwright install --with-deps
36+
37+
- name: Run Playwright tests
38+
run: pnpm test
39+
40+
- uses: actions/upload-artifact@v7
41+
if: ${{ !cancelled() }}
42+
with:
43+
name: playwright-report
44+
path: playwright-report/
45+
retention-days: 30

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ type PluginRSCOptions = {
138138
Configure module layer rules to distinguish between RSC and SSR runtimes in the server environment.
139139
140140
The plugin uses layers to differentiate between React Server Components runtime and SSR runtime within the `server` environment:
141+
141142
- **`rsc` layer**: Modules matching this rule will use the `react-server` export condition
142143
- **`ssr` layer**: Modules matching this rule will use the default export condition
143144

biome.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

e2e/helper/fixture.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ const setupExecOptions = <T extends ExecOptions | ExecSyncOptions>(
147147
};
148148

149149
export const test = base.extend<RsbuildFixture>({
150-
// biome-ignore lint/correctness/noEmptyPattern: required by playwright
150+
// rslint-disable-next-line no-empty-pattern
151151
cwd: async ({}, use, { file }) => {
152152
const cwd = path.dirname(file);
153153
await use(cwd);
154154
},
155155

156156
logHelper: [
157-
// biome-ignore lint/correctness/noEmptyPattern: required by playwright
157+
// rslint-disable-next-line no-empty-pattern
158158
async ({}, use, testInfo) => {
159159
const logHelper = proxyConsole();
160160
await use(logHelper);
@@ -313,16 +313,13 @@ export const test = base.extend<RsbuildFixture>({
313313
export { expect };
314314

315315
export const rspackTest = ((): typeof test => {
316-
const testSkip = test.skip;
317-
// @ts-expect-error
318-
testSkip.describe = test.describe.skip;
319-
// @ts-expect-error
320-
testSkip.fail = test.describe.skip;
321-
// @ts-expect-error
322-
testSkip.only = test.only;
323-
// @ts-expect-error
324-
return testSkip as typeof test.skip & {
316+
const testSkip = test.skip as typeof test.skip & {
325317
describe: typeof test.describe.skip;
318+
fail: typeof test.describe.skip;
326319
only: typeof test.only;
327320
};
321+
testSkip.describe = test.describe.skip;
322+
testSkip.fail = test.describe.skip;
323+
testSkip.only = test.only;
324+
return testSkip;
328325
})();

0 commit comments

Comments
 (0)