Skip to content

Commit 2978427

Browse files
committed
build: replace eslint with biome for linting
1 parent 11ebaf6 commit 2978427

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

biome.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
4+
"files": { "ignoreUnknown": false },
5+
"formatter": {
6+
"enabled": true,
7+
"formatWithErrors": false,
8+
"indentStyle": "space",
9+
"indentWidth": 2,
10+
"lineEnding": "lf",
11+
"lineWidth": 120,
12+
"attributePosition": "auto",
13+
"bracketSameLine": false,
14+
"bracketSpacing": true,
15+
"expand": "auto",
16+
"useEditorconfig": true
17+
},
18+
"linter": {
19+
"enabled": true,
20+
"rules": {
21+
"recommended": false,
22+
"correctness": { "noUnusedVariables": "warn" },
23+
"suspicious": { "noConsole": "off", "noExplicitAny": "off" }
24+
},
25+
"includes": ["**", "!**/build", "!**/node_modules", "!**/.*", "!**/*.d.ts", "!.husky/"]
26+
},
27+
"javascript": {
28+
"formatter": {
29+
"jsxQuoteStyle": "double",
30+
"quoteProperties": "asNeeded",
31+
"trailingCommas": "all",
32+
"semicolons": "asNeeded",
33+
"arrowParentheses": "asNeeded",
34+
"bracketSameLine": false,
35+
"quoteStyle": "single",
36+
"attributePosition": "auto",
37+
"bracketSpacing": true
38+
},
39+
"globals": ["exports"]
40+
},
41+
"html": {
42+
"formatter": {
43+
"indentScriptAndStyle": false,
44+
"selfCloseVoidElements": "always"
45+
}
46+
},
47+
"overrides": [{ "includes": ["src/**/*.{js,ts}", "tests/**/*.{js,ts}"] }],
48+
"assist": {
49+
"enabled": true,
50+
"actions": { "source": { "organizeImports": "on" } }
51+
}
52+
}

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
'src/**/*.{ts,js}': ['npx eslint'],
2+
'src/**/*.{ts,js}': ['biome check --write'],
33
}

0 commit comments

Comments
 (0)