Skip to content

Commit d457a58

Browse files
committed
build: add biome.js for code formatting and linting
1 parent a3ee20c commit d457a58

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
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+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"dotenv": "^17.2.3"
2626
},
2727
"devDependencies": {
28+
"@biomejs/biome": "2.3.7",
2829
"@commitlint/cli": "^20.1.0",
2930
"@commitlint/config-conventional": "^20.0.0",
3031
"@typescript-eslint/eslint-plugin": "^8.48.0",

0 commit comments

Comments
 (0)