Skip to content

Commit 7129f32

Browse files
authored
chore: migrate to Rslint and Prettier (#53)
1 parent a744d92 commit 7129f32

25 files changed

Lines changed: 313 additions & 337 deletions

.github/renovate.json5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>rstackjs/renovate"]
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['github>rstackjs/renovate'],
44
}

.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@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3131
with:
3232
node-version: 24.15.0
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 & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +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-
}
3+
"cSpell.words": ["rslint"]
154
}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add plugin to your `rsbuild.config.ts`:
2323

2424
```ts
2525
// rsbuild.config.ts
26-
import { pluginBasicSsl } from "@rsbuild/plugin-basic-ssl";
26+
import { pluginBasicSsl } from '@rsbuild/plugin-basic-ssl';
2727

2828
export default {
2929
plugins: [pluginBasicSsl()],
@@ -44,7 +44,7 @@ Filename of the generated certificate.
4444

4545
```ts
4646
pluginBasicSsl({
47-
filename: "foo.pem",
47+
filename: 'foo.pem',
4848
});
4949
```
5050

@@ -57,10 +57,10 @@ Output path of the generated certificate.
5757
- **Example:**
5858

5959
```ts
60-
import path from "node:path";
60+
import path from 'node:path';
6161

6262
pluginBasicSsl({
63-
outputPath: path.join(__dirname, "node_modules/.cache/cert"),
63+
outputPath: path.join(__dirname, 'node_modules/.cache/cert'),
6464
});
6565
```
6666

@@ -72,14 +72,14 @@ Attributes passing to `selfsigned`, see [selfsigned](https://github.com/jfromani
7272
- **Default:**
7373

7474
```ts
75-
const defaultAttrs = [{ name: "commonName", value: "localhost" }];
75+
const defaultAttrs = [{ name: 'commonName', value: 'localhost' }];
7676
```
7777

7878
- **Example:**
7979

8080
```ts
8181
pluginBasicSsl({
82-
selfsignedAttrs: [{ name: "commonName", value: "example.com" }],
82+
selfsignedAttrs: [{ name: 'commonName', value: 'example.com' }],
8383
});
8484
```
8585

biome.json

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

package.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,26 @@
2020
"scripts": {
2121
"build": "rslib",
2222
"dev": "rslib -w",
23-
"lint": "biome check .",
24-
"lint:write": "biome check . --write",
25-
"prepare": "simple-git-hooks && npm run build",
23+
"lint": "rslint && prettier -c .",
24+
"lint:write": "rslint --fix && prettier -w .",
25+
"prepare": "simple-git-hooks && pnpm run build",
2626
"test": "playwright test",
27-
"bump": "npx bumpp"
27+
"bump": "pnpx bumpp"
2828
},
2929
"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-
]
30+
"pre-commit": "pnpm run lint:write"
3631
},
3732
"dependencies": {
3833
"selfsigned": "^3.0.1"
3934
},
4035
"devDependencies": {
41-
"@biomejs/biome": "^1.9.4",
4236
"@playwright/test": "^1.59.1",
4337
"@rsbuild/core": "1.7.5",
4438
"@rslib/core": "^0.21.3",
39+
"@rslint/core": "^0.5.0",
4540
"@types/node": "^24.12.2",
46-
"nano-staged": "^1.0.2",
4741
"playwright": "^1.59.1",
42+
"prettier": "^3.8.3",
4843
"simple-git-hooks": "^2.13.1",
4944
"typescript": "6.0.3"
5045
},

0 commit comments

Comments
 (0)