Skip to content

Commit db70ba2

Browse files
chenjiahanCopilot
andauthored
chore: replace Biome with rslint and Prettier (#92)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 84c7fb8 commit db70ba2

File tree

13 files changed

+105
-182
lines changed

13 files changed

+105
-182
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
inputs:
66
tag:
77
type: choice
8-
description: "Release Npm Tag"
8+
description: 'Release Npm Tag'
99
required: true
10-
default: "nightly"
10+
default: 'nightly'
1111
options:
1212
- alpha
1313
- beta
@@ -18,7 +18,7 @@ on:
1818

1919
dry_run:
2020
type: boolean
21-
description: "DryRun release"
21+
description: 'DryRun release'
2222
required: true
2323
default: false
2424

@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4545
with:
4646
node-version: 24.14.1
47-
cache: "pnpm"
47+
cache: 'pnpm'
4848

4949
# Update npm to the latest version to enable OIDC
5050
- name: Update npm

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2828
with:
2929
node-version: 24.14.1
30-
cache: "pnpm"
30+
cache: 'pnpm'
3131

3232
- name: Install Dependencies
3333
run: pnpm install

.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+
}

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["biomejs.biome"]
2+
"recommendations": ["esbenp.prettier-vscode"]
33
}

.vscode/settings.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
11
{
22
"search.useIgnoreFiles": true,
3-
"[json]": {
4-
"editor.defaultFormatter": "biomejs.biome"
5-
},
6-
"[typescript]": {
7-
"editor.defaultFormatter": "biomejs.biome"
8-
},
9-
"[javascript]": {
10-
"editor.defaultFormatter": "biomejs.biome"
11-
},
12-
"[javascriptreact]": {
13-
"editor.defaultFormatter": "biomejs.biome"
14-
},
15-
"[css]": {
16-
"editor.defaultFormatter": "biomejs.biome"
17-
}
3+
"editor.defaultFormatter": "esbenp.prettier-vscode"
184
}

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,11 @@ new ReactRefreshPlugin({
191191
- Type: `string`
192192
- Default: `builtin:react-refresh-loader`
193193

194-
Be default, the plugin uses `builtin:react-refresh-loader` loader implementation [from Rspack](https://github.com/web-infra-dev/rspack/tree/main/crates/rspack_loader_react_refresh) in order ot inject
195-
the React Refresh utilities into each module. `reactRefreshLoader` option allows to specify the loader, that implements
196-
custom React Refresh instrumentation if needed.
194+
By default, the plugin uses the `builtin:react-refresh-loader` loader implementation [from Rspack](https://github.com/web-infra-dev/rspack/tree/main/crates/rspack_loader_react_refresh) to inject the React Refresh utilities into each module. The `reactRefreshLoader` option allows you to specify a loader that implements custom React Refresh instrumentation if needed.
197195

198196
```js
199197
new ReactRefreshPlugin({
200-
reactRefreshLoader: 'my-advanced-react-refresh-loader',
198+
reactRefreshLoader: 'my-advanced-react-refresh-loader',
201199
});
202200
```
203201

biome.json

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

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,23 @@
1818
"scripts": {
1919
"build": "rslib",
2020
"dev": "rslib -w",
21-
"lint": "biome check .",
22-
"lint:write": "biome check . --write",
21+
"lint": "rslint && prettier -c .",
22+
"lint:write": "rslint --fix && prettier -w .",
2323
"prepare": "simple-git-hooks && npm run build",
2424
"test": "rstest",
2525
"release": "node ./scripts/release.js",
2626
"bump": "npx bumpp --no-push --no-tag --no-commit"
2727
},
28-
"files": ["client", "dist"],
28+
"files": [
29+
"client",
30+
"dist"
31+
],
2932
"simple-git-hooks": {
30-
"pre-commit": "npx nano-staged"
31-
},
32-
"nano-staged": {
33-
"*.{js,jsx,ts,tsx,mjs,cjs}": [
34-
"biome check --write --no-errors-on-unmatched"
35-
]
33+
"pre-commit": "pnpm run lint:write"
3634
},
3735
"devDependencies": {
38-
"@biomejs/biome": "^1.9.4",
3936
"@rslib/core": "^0.20.3",
37+
"@rslint/core": "^0.3.4",
4038
"@rspack/core": "2.0.0-rc.0",
4139
"@rstest/core": "^0.9.6",
4240
"@types/node": "^24.12.2",
@@ -45,7 +43,7 @@
4543
"cross-env": "^10.1.0",
4644
"execa": "9.6.1",
4745
"fs-extra": "11.3.4",
48-
"nano-staged": "^0.9.0",
46+
"prettier": "^3.8.1",
4947
"react-refresh": "^0.18.0",
5048
"semver": "7.7.4",
5149
"simple-git-hooks": "^2.13.1",

0 commit comments

Comments
 (0)