Skip to content

Commit e87217a

Browse files
committed
refactor: migrate from Biome to Oxfmt for linting and formatting
- Updated CI workflow to use Oxfmt for formatting and linting checks. - Replaced Biome configurations with Oxfmt in lint-staged and VSCode settings. - Removed Biome as a dependency and added Oxfmt. - Updated documentation to reflect changes in linting and formatting tools. - Adjusted tool descriptions in data files for consistency.
1 parent 20217de commit e87217a

31 files changed

+175
-370
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: ['20.19.3', '22.17.0'] # Test with both Node.js v20 LTS and v22 LTS
15+
node-version: ["20.19.3", "22.17.0"] # Test with both Node.js v20 LTS and v22 LTS
1616
fail-fast: false
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
2020
with:
21-
fetch-depth: 0 # Fetch all history for proper lockfile validation
21+
fetch-depth: 0 # Fetch all history for proper lockfile validation
2222

2323
- name: Install pnpm
2424
uses: pnpm/action-setup@v4
2525
with:
26-
version: 8.15.4 # Using the version from packageManager in package.json
26+
version: 8.15.4 # Using the version from packageManager in package.json
2727
run_install: false
2828

2929
- name: Setup Node.js ${{ matrix.node-version }}
3030
uses: actions/setup-node@v4
3131
with:
3232
node-version: ${{ matrix.node-version }}
33-
cache: 'pnpm'
33+
cache: "pnpm"
3434

3535
- name: Install dependencies
3636
run: pnpm install --frozen-lockfile
3737

3838
- name: Check formatting
39-
run: pnpm biome format .
39+
run: pnpm oxfmt
4040

4141
- name: Run linting
42-
run: pnpm biome check .
43-
42+
run: pnpm oxfmt check .
43+
4444
- name: Lint Markdown files
4545
run: pnpm lint:md
46-
46+
4747
- name: Run all linting checks (combined)
48-
run: pnpm lint
48+
run: pnpm lint

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
# Run lint-staged with available pnpm
52
pnpm lint-staged || (
63
echo "Error: Failed to run lint-staged. Make sure pnpm is installed."

.lintstagedrc.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"*.{js,jsx,ts,tsx}": ["biome check --write", "biome format --write"],
3-
"*.astro": ["biome check --write", "biome format --write"],
4-
"*.md": ["markdownlint-cli2 --fix"]
5-
}
2+
"*.{js,jsx,ts,tsx}": [
3+
"oxfmt check",
4+
"oxfmt format"
5+
]
6+
}

.oxfmtrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"singleQuote": true
4+
}

.vscode/extensions.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"recommendations": [
33
"astro-build.astro-vscode",
44
"bradlc.vscode-tailwindcss",
5-
"biomejs.biome",
6-
"streetsidesoftware.code-spell-checker",
75
"ms-vscode.vscode-typescript-next",
8-
"davidanson.vscode-markdownlint"
6+
"davidanson.vscode-markdownlint",
7+
"esbenp.prettier-vscode"
98
],
109
"unwantedRecommendations": []
1110
}

.vscode/settings.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
{
22
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "biomejs.biome",
4-
"editor.codeActionsOnSave": {
5-
"source.organizeImports.biome": "explicit",
6-
"source.fixAll.biome": "explicit"
7-
},
8-
"[astro]": {
9-
"editor.defaultFormatter": "biomejs.biome",
10-
"editor.formatOnSave": true
11-
},
12-
"[typescript]": {
13-
"editor.defaultFormatter": "biomejs.biome"
14-
},
15-
"[javascript]": {
16-
"editor.defaultFormatter": "biomejs.biome"
17-
},
18-
"[json]": {
19-
"editor.defaultFormatter": "biomejs.biome"
20-
},
213
"typescript.tsdk": "node_modules/typescript/lib",
224
"typescript.enablePromptUseWorkspaceTsdk": true,
235
"eslint.validate": [

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Frontend Tools Explorer is a curated collection of essential tools, libraries, a
2121
- Testing Frameworks (Vitest, Jest, Playwright, etc.)
2222
- Package Managers (npm, pnpm, Yarn, etc.)
2323
- Runtimes (Node.js, Deno, Bun, etc.)
24-
- Linters & Formatters (ESLint, Biome, etc.)
24+
- Linters & Formatters (ESLint, Oxfmt, etc.)
2525
- And many more!
2626

2727
### ✨ Features

astro.config.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ export default defineConfig({
1414
'upload.wikimedia.org',
1515
'avatars.githubusercontent.com',
1616
'cdn.jsdelivr.net',
17-
'pnpm.io'
18-
]
17+
'pnpm.io',
18+
],
1919
},
2020

2121
prefetch: {
2222
prefetchAll: true,
23-
defaultStrategy: 'viewport'
23+
defaultStrategy: 'viewport',
2424
},
2525

2626
vite: {
@@ -30,18 +30,18 @@ export default defineConfig({
3030
minify: 'terser',
3131
terserOptions: {
3232
compress: {
33-
drop_console: true
34-
}
35-
}
33+
drop_console: true,
34+
},
35+
},
3636
},
3737
optimizeDeps: {
38-
include: ['tailwindcss']
39-
}
38+
include: ['tailwindcss'],
39+
},
4040
},
4141

4242
// Configure Vercel adapter with image service enabled
4343
adapter: vercel({
4444
imageService: true,
45-
devImageService: 'sharp'
46-
})
45+
devImageService: 'sharp',
46+
}),
4747
});

biome.json

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

docs/CI.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The CI workflow is defined in `.github/workflows/lint.yml` and performs the foll
1212
2. **Setup pnpm**: Installs the pnpm package manager (version 8.15.4)
1313
3. **Setup Node.js**: Configures Node.js environment with both Node.js v20 LTS and v22 LTS using a matrix strategy
1414
4. **Install Dependencies**: Installs project dependencies using pnpm
15-
5. **Check Formatting**: Verifies code formatting using Biome with `pnpm biome format .`
16-
6. **Run JavaScript/TypeScript Linting**: Performs code linting using Biome with `pnpm biome check .`
15+
5. **Check Formatting**: Verifies code formatting using Oxfmt with `pnpm oxfmt`
16+
6. **Run JavaScript/TypeScript Linting**: Performs code linting using Oxfmt with `pnpm oxfmt check .`
1717
7. **Run Markdown Linting**: Checks markdown files with `pnpm lint:md`
1818
8. **Run Combined Linting**: Executes all linting checks with `pnpm lint`
1919

@@ -88,7 +88,7 @@ If you prefer to test manually, follow these steps:
8888
pnpm install --no-frozen-lockfile
8989

9090
# Check formatting
91-
pnpm biome format .
91+
pnpm oxfmt
9292

9393
# Run JavaScript/TypeScript linting
9494
pnpm lint:js

0 commit comments

Comments
 (0)