Skip to content

Commit 3c4a3cb

Browse files
authored
chore: migrate from biome to prettier and rslint (#37)
1 parent 9787a11 commit 3c4a3cb

12 files changed

Lines changed: 111 additions & 167 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
# Run `npm run bump` to bump the version and create a git tag.
66
push:
77
tags:
8-
- "v*"
8+
- 'v*'
99

1010
workflow_dispatch:
1111

@@ -46,4 +46,4 @@ jobs:
4646
- name: Create GitHub Release
4747
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
4848
with:
49-
generateReleaseNotes: "true"
49+
generateReleaseNotes: 'true'

.github/workflows/test.yml

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

3535
- name: Install Dependencies
3636
run: pnpm install && npx playwright install

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
dist
3+
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": ["rstack.rslint", "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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add plugin to your `rsbuild.config.ts`:
2121

2222
```ts
2323
// rsbuild.config.ts
24-
import { pluginEjs } from "rsbuild-plugin-ejs";
24+
import { pluginEjs } from 'rsbuild-plugin-ejs';
2525

2626
export default {
2727
plugins: [pluginEjs()],
@@ -37,7 +37,7 @@ For example, first create a `src/index.ejs` file, and point to that file using `
3737
```ts title="rsbuild.config.ts"
3838
export default {
3939
html: {
40-
template: "./src/index.ejs",
40+
template: './src/index.ejs',
4141
},
4242
};
4343
```
@@ -74,7 +74,7 @@ const defaultOptions = {
7474
```ts
7575
pluginEjs({
7676
ejsOptions: {
77-
delimiter: "|",
77+
delimiter: '|',
7878
},
7979
});
8080
```

biome.json

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

package.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,29 @@
1111
}
1212
},
1313
"types": "./dist/index.d.ts",
14-
"files": ["dist"],
14+
"files": [
15+
"dist"
16+
],
1517
"scripts": {
1618
"build": "rslib",
1719
"dev": "rslib -w",
18-
"lint": "biome check .",
19-
"lint:write": "biome check . --write",
20+
"lint": "rslint && prettier -c .",
21+
"lint:write": "rslint --fix && prettier -w .",
2022
"prepare": "simple-git-hooks && npm run build",
2123
"test": "playwright test",
2224
"bump": "npx bumpp"
2325
},
2426
"simple-git-hooks": {
25-
"pre-commit": "npx nano-staged"
26-
},
27-
"nano-staged": {
28-
"*.{js,jsx,ts,tsx,mjs,cjs}": [
29-
"biome check --write --no-errors-on-unmatched"
30-
]
27+
"pre-commit": "pnpm run lint:write"
3128
},
3229
"devDependencies": {
33-
"@biomejs/biome": "^1.9.4",
3430
"@playwright/test": "^1.59.1",
3531
"@rsbuild/core": "^1.7.5",
3632
"@rslib/core": "^0.21.0",
33+
"@rslint/core": "0.4.1",
3734
"@types/node": "^24.12.2",
38-
"nano-staged": "^1.0.2",
3935
"playwright": "^1.59.1",
36+
"prettier": "^3.8.1",
4037
"simple-git-hooks": "^2.13.1",
4138
"typescript": "6.0.2"
4239
},

0 commit comments

Comments
 (0)