Skip to content

Commit d491b7a

Browse files
authored
chore: migrate biome to rslint and prettier (#50)
1 parent 36b7daf commit d491b7a

11 files changed

Lines changed: 134 additions & 183 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@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

.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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ function loadConfig(opts: LoadConfigOptions): string[] | undefined;
6767
- **Example:**
6868

6969
```ts
70-
import { loadConfig } from "browserslist-load-config";
70+
import { loadConfig } from 'browserslist-load-config';
7171

7272
// Pass a path to the configuration file
7373
const config = loadConfig({
74-
path: "./path/to/project/root",
75-
env: "production",
74+
path: './path/to/project/root',
75+
env: 'production',
7676
});
7777

7878
// Pass a browserslist config directly
7979
const config = loadConfig({
80-
config: "./path/to/project/root/.browserslistrc",
81-
env: "production",
80+
config: './path/to/project/root/.browserslistrc',
81+
env: 'production',
8282
});
8383

8484
console.log(config);
@@ -102,9 +102,9 @@ function findConfig(from: string): Record<string, string[]> | undefined;
102102
- **Example:**
103103

104104
```ts
105-
import { findConfig } from "browserslist-load-config";
105+
import { findConfig } from 'browserslist-load-config';
106106

107-
const config = findConfig("./path/to/project/root");
107+
const config = findConfig('./path/to/project/root');
108108

109109
console.log(config);
110110
/**

biome.json

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

package.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,22 @@
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": "rstest",
2727
"test:watch": "rstest",
2828
"bump": "npx bumpp"
2929
},
3030
"simple-git-hooks": {
31-
"pre-commit": "npx nano-staged"
32-
},
33-
"nano-staged": {
34-
"*.{js,jsx,ts,tsx,mjs,cjs}": [
35-
"biome check --write --no-errors-on-unmatched"
36-
]
31+
"pre-commit": "pnpm run lint:write"
3732
},
3833
"devDependencies": {
39-
"@biomejs/biome": "^2.4.13",
4034
"@rslib/core": "^0.21.3",
35+
"@rslint/core": "^0.5.0",
4136
"@rstest/core": "0.9.9",
4237
"@types/node": "^24.12.2",
43-
"nano-staged": "^1.0.2",
38+
"prettier": "^3.8.3",
4439
"simple-git-hooks": "^2.13.1",
4540
"typescript": "6.0.3"
4641
},

0 commit comments

Comments
 (0)