Skip to content

Commit 7757076

Browse files
committed
feat: switch to biome
1 parent 21a4e09 commit 7757076

File tree

9 files changed

+459
-851
lines changed

9 files changed

+459
-851
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
dist

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome"
4+
]
5+
}

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"type": "node",
7+
"request": "launch",
8+
"name": "Debug Current Test File",
9+
"autoAttachChildProcesses": true,
10+
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
11+
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
12+
"args": ["run", "${relativeFile}"],
13+
"smartStep": true,
14+
"console": "integratedTerminal"
15+
}
16+
]
17+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "biomejs.biome",
4+
"biome.enabled": true
5+
}

biome.json

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"formatWithErrors": false,
6+
"indentStyle": "space",
7+
"indentWidth": 2,
8+
"lineEnding": "lf",
9+
"lineWidth": 80,
10+
"attributePosition": "auto"
11+
},
12+
"organizeImports": { "enabled": true },
13+
"linter": {
14+
"enabled": true,
15+
"rules": {
16+
"recommended": false,
17+
"complexity": {
18+
"noExtraBooleanCast": "error",
19+
"noMultipleSpacesInRegularExpressionLiterals": "error",
20+
"noUselessCatch": "error",
21+
"noWith": "error"
22+
},
23+
"correctness": {
24+
"noConstAssign": "error",
25+
"noConstantCondition": "error",
26+
"noEmptyCharacterClassInRegex": "error",
27+
"noEmptyPattern": "error",
28+
"noGlobalObjectCalls": "error",
29+
"noInvalidConstructorSuper": "error",
30+
"noInvalidNewBuiltin": "error",
31+
"noNonoctalDecimalEscape": "error",
32+
"noPrecisionLoss": "error",
33+
"noSelfAssign": "error",
34+
"noSetterReturn": "error",
35+
"noSwitchDeclarations": "error",
36+
"noUndeclaredVariables": "error",
37+
"noUnreachable": "error",
38+
"noUnreachableSuper": "error",
39+
"noUnsafeFinally": "error",
40+
"noUnsafeOptionalChaining": "error",
41+
"noUnusedLabels": "error",
42+
"noUnusedPrivateClassMembers": "error",
43+
"noUnusedVariables": "error",
44+
"useIsNan": "error",
45+
"useValidForDirection": "error",
46+
"useYield": "error"
47+
},
48+
"suspicious": {
49+
"noAsyncPromiseExecutor": "error",
50+
"noCatchAssign": "error",
51+
"noClassAssign": "error",
52+
"noCompareNegZero": "error",
53+
"noControlCharactersInRegex": "error",
54+
"noDebugger": "error",
55+
"noDuplicateCase": "error",
56+
"noDuplicateClassMembers": "error",
57+
"noDuplicateObjectKeys": "error",
58+
"noDuplicateParameters": "error",
59+
"noEmptyBlockStatements": "error",
60+
"noFallthroughSwitchClause": "error",
61+
"noFunctionAssign": "error",
62+
"noGlobalAssign": "error",
63+
"noImportAssign": "error",
64+
"noMisleadingCharacterClass": "error",
65+
"noPrototypeBuiltins": "error",
66+
"noRedeclare": "error",
67+
"noShadowRestrictedNames": "error",
68+
"noUnsafeNegation": "error",
69+
"useGetterReturn": "error",
70+
"useValidTypeof": "error"
71+
}
72+
},
73+
"ignore": ["coverage/"]
74+
},
75+
"javascript": {
76+
"formatter": {
77+
"jsxQuoteStyle": "double",
78+
"quoteProperties": "asNeeded",
79+
"trailingCommas": "none",
80+
"semicolons": "asNeeded",
81+
"arrowParentheses": "always",
82+
"bracketSpacing": true,
83+
"bracketSameLine": false,
84+
"quoteStyle": "single",
85+
"attributePosition": "auto"
86+
},
87+
"globals": [
88+
"onscrollend",
89+
"onpointerleave",
90+
"oncontextrestored",
91+
"onemptied",
92+
"ongamepaddisconnected",
93+
"onkeypress",
94+
"onloadeddata",
95+
"onmouseup",
96+
"onvolumechange",
97+
"onpaste",
98+
"onstorage",
99+
"onkeyup",
100+
"onabort",
101+
"oncut",
102+
"ontransitionrun",
103+
"onafterprint",
104+
"onblur",
105+
"ondurationchange",
106+
"ontransitionstart",
107+
"oncanplaythrough",
108+
"onanimationend",
109+
"onmouseleave",
110+
"ondragleave",
111+
"onplay",
112+
"onunhandledrejection",
113+
"onbeforeprint",
114+
"onpointercancel",
115+
"onsubmit",
116+
"ondragstart",
117+
"onmessage",
118+
"location",
119+
"onoffline",
120+
"onappinstalled",
121+
"onwheel",
122+
"onended",
123+
"onkeydown",
124+
"onclick",
125+
"onfocus",
126+
"onscroll",
127+
"ongamepadconnected",
128+
"oncanplay",
129+
"onpointerdown",
130+
"ondeviceorientationabsolute",
131+
"onauxclick",
132+
"ondevicemotion",
133+
"onratechange",
134+
"ontransitionend",
135+
"onchange",
136+
"onselect",
137+
"onbeforeinstallprompt",
138+
"onbeforetoggle",
139+
"onmouseout",
140+
"ontimeupdate",
141+
"ondragover",
142+
"oncuechange",
143+
"ontransitioncancel",
144+
"onprogress",
145+
"onbeforeinput",
146+
"onpointerenter",
147+
"onmouseenter",
148+
"oninvalid",
149+
"onpointerout",
150+
"onpagereveal",
151+
"onpause",
152+
"onanimationstart",
153+
"onwaiting",
154+
"ondeviceorientation",
155+
"onclose",
156+
"onbeforeunload",
157+
"oncancel",
158+
"onseeked",
159+
"onpointerover",
160+
"ongotpointercapture",
161+
"onloadedmetadata",
162+
"onpageshow",
163+
"onstalled",
164+
"oncontextmenu",
165+
"onreset",
166+
"ondrag",
167+
"onbeforematch",
168+
"onload",
169+
"onlostpointercapture",
170+
"onsuspend",
171+
"onselectionchange",
172+
"onpagehide",
173+
"onrejectionhandled",
174+
"onunload",
175+
"onanimationcancel",
176+
"onmousedown",
177+
"onpointerup",
178+
"onmouseover",
179+
"onformdata",
180+
"oncontentvisibilityautostatechange",
181+
"onresize",
182+
"onsearch",
183+
"ontoggle",
184+
"exports",
185+
"onpageswap",
186+
"onbeforexrselect",
187+
"onlanguagechange",
188+
"ondragenter",
189+
"onerror",
190+
"onpointermove",
191+
"onmousemove",
192+
"ondrop",
193+
"onhashchange",
194+
"onsecuritypolicyviolation",
195+
"onslotchange",
196+
"oncopy",
197+
"onanimationiteration",
198+
"ondblclick",
199+
"ondragend",
200+
"onpointerrawupdate",
201+
"onpopstate",
202+
"onplaying",
203+
"oncontextlost",
204+
"onloadstart",
205+
"onseeking",
206+
"oninput",
207+
"onmessageerror",
208+
"onselectstart",
209+
"onmousewheel",
210+
"ononline"
211+
]
212+
},
213+
"files": {
214+
"ignore": [
215+
"dist/**",
216+
"node_modules/**",
217+
"coverage/**",
218+
".vscode",
219+
"package.json"
220+
]
221+
}
222+
}

eslint.config.js

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

0 commit comments

Comments
 (0)