Skip to content

Commit 238a985

Browse files
authored
Merge pull request #62 from sectsect/biome
chore(lint): migrate from ESLint/Prettier to Biome
2 parents 5cdbe55 + ebad71f commit 238a985

20 files changed

Lines changed: 3825 additions & 9391 deletions

.changeset/tangy-cougars-take.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@sect/use-placeholder-path": patch
3+
---
4+
5+
.
6+
7+
- chore(lint): migrate from ESLint/Prettier to Biome

.eslintignore

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

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Disable concurent to run build-types after ESLint in lint-staged
1+
# Disable concurrent to run type-check after Biome in lint-staged
22
npx lint-staged --concurrent false

.lintstagedrc.json

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

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc.json

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

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"recommendations": [
3-
"dbaeumer.vscode-eslint",
4-
"esbenp.prettier-vscode",
3+
"biomejs.biome",
54
"mikestead.dotenv",
65
"blanu.vscode-styled-jsx",
76
"stylelint.vscode-stylelint",

.vscode/settings.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,29 @@
55
"package-lock.json": true
66
},
77
"editor.formatOnSave": false,
8-
"editor.defaultFormatter": "esbenp.prettier-vscode",
9-
"eslint.format.enable": true,
8+
"editor.defaultFormatter": "biomejs.biome",
9+
// Force .css files to be recognized as CSS (not PostCSS) so Biome formatter works correctly
10+
"files.associations": {
11+
"*.css": "css"
12+
},
1013
"editor.codeActionsOnSave": {
11-
"source.addMissingImports": "explicit",
12-
"source.fixAll": "explicit"
14+
"source.fixAll.biome": "explicit",
15+
"source.organizeImports.biome": "explicit"
1316
},
1417
"[javascript][javascriptreact][typescript][typescriptreact]": {
15-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
18+
"editor.formatOnSave": true,
19+
"editor.defaultFormatter": "biomejs.biome"
1620
},
1721
"[json][jsonc]": {
1822
"editor.formatOnSave": true,
19-
"editor.defaultFormatter": "esbenp.prettier-vscode"
23+
"editor.defaultFormatter": "biomejs.biome"
24+
},
25+
"[css][scss][postcss]": {
26+
"editor.formatOnSave": true,
27+
"editor.defaultFormatter": "biomejs.biome"
2028
},
21-
// "[css][scss]": {
22-
// "editor.formatOnSave": false,
23-
// "editor.defaultFormatter": "esbenp.prettier-vscode"
24-
// },
2529
"css.validate": false,
2630
"scss.validate": false,
27-
"vitest.enable": true,
28-
// "phpsab.executablePathCS": "./vendor/squizlabs/php_codesniffer/bin/phpcs",
29-
// "phpsab.executablePathCBF": "./vendor/squizlabs/php_codesniffer/bin/phpcbf",
30-
// "phpsab.autoRulesetSearch": true,
31-
// // "phpsab.standard": "WordPress-Core",
32-
// "phpsab.standard": "./phpcs.xml",
33-
// "phpsab.snifferArguments": [
34-
// "--ignore=*/wp-admin/*,*/wp-includes/*,,*/composer/*"
35-
// ],
3631
"workbench.editor.customLabels.patterns": {
3732
"**/app/**/page.tsx": "${dirname} - Page",
3833
"**/app/**/layout.tsx": "${dirname} - Layout",

.vscode/tasks.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
44
"version": "2.0.0",
5-
"tasks": [{
6-
"label": "Project wide type checking with TypeScript",
7-
"type": "npm",
8-
"script": "type-check",
9-
"problemMatcher": ["$tsc"],
10-
"group": {
11-
"kind": "build",
12-
"isDefault": true
13-
},
14-
"presentation": {
15-
"clear": true,
16-
"reveal": "never"
5+
"tasks": [
6+
{
7+
"label": "Project wide type checking with TypeScript",
8+
"type": "npm",
9+
"script": "type-check",
10+
"problemMatcher": ["$tsc"],
11+
"group": {
12+
"kind": "build",
13+
"isDefault": true
14+
},
15+
"presentation": {
16+
"clear": true,
17+
"reveal": "never"
18+
}
1719
}
18-
}]
20+
]
1921
}

CLAUDE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,12 @@ npm run prepare # Setup husky git hooks
7676

7777
## Code Quality
7878

79-
- **ESLint Config**: Modern flat config format (`eslint.config.mjs`) with comprehensive rule set:
80-
- Airbnb TypeScript base configuration
81-
- React, React Hooks, and JSX a11y rules
82-
- TypeScript strict rules (no explicit any, consistent type imports)
83-
- Import organization and unused import removal
84-
- Testing-specific rules for Vitest
85-
- TSDoc documentation validation
86-
- **Git Hooks**: Husky with commitlint for conventional commits
87-
- **Prettier**: Integrated with ESLint for consistent code formatting
88-
- **Testing Standards**:
79+
- **Biome Config**: `biome.jsonc` (v2.4.13) unifies linter and formatter in a single tool:
80+
- Recommended linter rules with project-specific overrides
81+
- Import organization via Biome's assist actions
82+
- Formatter replacing Prettier (2-space indent, single quotes, trailing commas)
83+
- **Git Hooks**: Husky runs `lint-staged` (Biome + type-check + secretlint) on pre-commit; commitlint on commit-msg
84+
- **Testing Standards**:
8985
- Use `test` not `it` for test naming
9086
- Require top-level describe blocks (max 2)
9187
- Comprehensive test coverage for all code paths

0 commit comments

Comments
 (0)