Skip to content

Commit f82204c

Browse files
committed
Replace ESLint and Prettier with Biome (#419)
1 parent 6bc9f4f commit f82204c

22 files changed

+193
-1437
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,11 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020

21-
- name: Cache Yarn cache
22-
uses: actions/cache@v4
23-
env:
24-
cache-name: yarn-cache
25-
with:
26-
path: ~/.yarn/berry/cache
27-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-${{ env.cache-name }}
30-
31-
- name: Use Node.js
32-
uses: actions/setup-node@v4
33-
with:
34-
node-version: '20'
35-
36-
- name: Enable Corepack
37-
run: corepack enable
38-
39-
- name: Install dependencies
40-
run: yarn --immutable
41-
42-
- name: Build package
43-
run: yarn build
21+
- name: Setup Biome
22+
uses: biomejs/setup-biome@v2
4423

4524
- name: Run tests
46-
run: yarn lint
25+
run: biome lint
4726

4827
typescript:
4928
name: Type checking
@@ -88,29 +67,11 @@ jobs:
8867
- name: Checkout
8968
uses: actions/checkout@v4
9069

91-
- name: Cache Yarn cache
92-
uses: actions/cache@v4
93-
env:
94-
cache-name: yarn-cache
95-
with:
96-
path: ~/.yarn/berry/cache
97-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
98-
restore-keys: |
99-
${{ runner.os }}-${{ env.cache-name }}
100-
101-
- name: Use Node.js
102-
uses: actions/setup-node@v4
103-
with:
104-
node-version: '20'
105-
106-
- name: Enable Corepack
107-
run: corepack enable
108-
109-
- name: Install dependencies
110-
run: yarn --immutable
70+
- name: Setup Biome
71+
uses: biomejs/setup-biome@v2
11172

11273
- name: Run formatting
113-
run: yarn format
74+
run: biome format
11475

11576
unit:
11677
name: Unit tests

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarn lint-staged
1+
yarn format --staged --no-errors-on-unmatched --write

.lintstagedrc.json

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

.prettierignore

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

.prettierrc.json

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

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"recommendations": ["dbaeumer.vscode-eslint", "eamodio.gitlens", "esbenp.prettier-vscode"],
2+
"recommendations": ["biomejs.biome", "eamodio.gitlens"],
33
"unwantedRecommendations": ["dbaeumer.jshint"]
44
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"editor.defaultFormatter": "esbenp.prettier-vscode",
2+
"editor.defaultFormatter": "biomejs.biome",
33
"editor.formatOnSave": true,
44
"search.exclude": {
55
"**/.yarn": true

biome.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
3+
"files": {
4+
"ignore": [".tsimp", "coverage", "dist", ".pnp.cjs", ".pnp.loader.mjs"]
5+
},
6+
"formatter": {
7+
"lineWidth": 100,
8+
"indentStyle": "space"
9+
},
10+
"linter": {
11+
"rules": {
12+
"complexity": {
13+
"noUselessSwitchCase": "off"
14+
},
15+
"suspicious": {
16+
"noConsoleLog": "warn"
17+
}
18+
}
19+
},
20+
"javascript": {
21+
"formatter": {
22+
"quoteStyle": "single"
23+
}
24+
},
25+
"overrides": [
26+
{
27+
"include": ["**/package.json"],
28+
"formatter": {
29+
"lineWidth": 1
30+
}
31+
},
32+
{
33+
"include": ["**/vite.config.ts"],
34+
"linter": {
35+
"rules": {
36+
"suspicious": {
37+
"noConsoleLog": "off"
38+
}
39+
}
40+
}
41+
}
42+
]
43+
}

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
"unit": "yarn workspaces foreach --all run unit"
1919
},
2020
"devDependencies": {
21-
"husky": "^9.0.0",
22-
"lint-staged": "^15.0.0",
23-
"prettier": "^3.2.0"
24-
},
25-
"resolutions": {
26-
"eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0"
21+
"husky": "^9.0.0"
2722
},
2823
"packageManager": "yarn@4.1.1"
2924
}

packages/react-datetime-picker/.eslintignore

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

0 commit comments

Comments
 (0)