Skip to content

Commit 53e0e79

Browse files
committed
chore: configure biome
1 parent 8b638d6 commit 53e0e79

File tree

5 files changed

+310
-5
lines changed

5 files changed

+310
-5
lines changed

biome.json

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"useEditorconfig": true,
15+
"formatWithErrors": false,
16+
"indentStyle": "space",
17+
"indentWidth": 2,
18+
"lineEnding": "lf",
19+
"lineWidth": 100,
20+
"attributePosition": "auto",
21+
"bracketSpacing": true,
22+
"ignore": [
23+
"**/package.json",
24+
"**/yarn.lock",
25+
"coverage/**",
26+
"**/coverage/**",
27+
"**/build",
28+
"**/dist",
29+
"**/node_modules",
30+
"**/src/vendor-js",
31+
"**/*-css.ts",
32+
"**/*-svg.ts"
33+
]
34+
},
35+
"organizeImports": {
36+
"enabled": true
37+
},
38+
"linter": {
39+
"enabled": true,
40+
"rules": {
41+
"recommended": false,
42+
"a11y": {
43+
"noBlankTarget": "error"
44+
},
45+
"complexity": {
46+
"noBannedTypes": "error",
47+
"noExtraBooleanCast": "error",
48+
"noMultipleSpacesInRegularExpressionLiterals": "error",
49+
"noUselessCatch": "error",
50+
"noUselessConstructor": "off",
51+
"noUselessRename": "warn",
52+
"noUselessStringConcat": "warn",
53+
"noUselessTernary": "error",
54+
"noUselessThisAlias": "error",
55+
"noUselessTypeConstraint": "error",
56+
"noUselessUndefinedInitialization": "error",
57+
"noWith": "error",
58+
"useArrowFunction": "off"
59+
},
60+
"correctness": {
61+
"noChildrenProp": "error",
62+
"noConstAssign": "error",
63+
"noConstantCondition": "error",
64+
"noEmptyCharacterClassInRegex": "error",
65+
"noEmptyPattern": "error",
66+
"noGlobalObjectCalls": "error",
67+
"noInnerDeclarations": "error",
68+
"noInvalidConstructorSuper": "error",
69+
"noNewSymbol": "error",
70+
"noNonoctalDecimalEscape": "error",
71+
"noPrecisionLoss": "error",
72+
"noSelfAssign": "error",
73+
"noSetterReturn": "error",
74+
"noSwitchDeclarations": "error",
75+
"noUndeclaredVariables": "error",
76+
"noUnreachable": "error",
77+
"noUnreachableSuper": "error",
78+
"noUnsafeFinally": "error",
79+
"noUnsafeOptionalChaining": "error",
80+
"noUnusedImports": "error",
81+
"noUnusedLabels": "error",
82+
"noUnusedVariables": "error",
83+
"useArrayLiterals": "off",
84+
"useExhaustiveDependencies": "warn",
85+
"useHookAtTopLevel": "error",
86+
"useIsNan": "error",
87+
"useJsxKeyInIterable": "error",
88+
"useValidForDirection": "error",
89+
"useYield": "error"
90+
},
91+
"security": {
92+
"noDangerouslySetInnerHtml": "warn",
93+
"noDangerouslySetInnerHtmlWithChildren": "error"
94+
},
95+
"style": {
96+
"noArguments": "warn",
97+
"noDoneCallback": "error",
98+
"noNamespace": "error",
99+
"noRestrictedGlobals": {
100+
"level": "error",
101+
"options": {
102+
"deniedGlobals": [
103+
"parseInt"
104+
]
105+
}
106+
},
107+
"noUselessElse": "warn",
108+
"noVar": "warn",
109+
"useAsConstAssertion": "error",
110+
"useBlockStatements": "off",
111+
"useCollapsedElseIf": "error",
112+
"useConsistentBuiltinInstantiation": "error",
113+
"useTemplate": "warn"
114+
},
115+
"suspicious": {
116+
"noAssignInExpressions": "error",
117+
"noAsyncPromiseExecutor": "error",
118+
"noCatchAssign": "error",
119+
"noClassAssign": "error",
120+
"noCommentText": "error",
121+
"noCompareNegZero": "error",
122+
"noConsole": {
123+
"level": "error",
124+
"options": {
125+
"allow": [
126+
"warn",
127+
"error",
128+
"info"
129+
]
130+
}
131+
},
132+
"noControlCharactersInRegex": "error",
133+
"noDebugger": "error",
134+
"noDuplicateCase": "error",
135+
"noDuplicateClassMembers": "error",
136+
"noDuplicateJsxProps": "error",
137+
"noDuplicateObjectKeys": "error",
138+
"noDuplicateParameters": "error",
139+
"noEmptyBlockStatements": "error",
140+
"noExplicitAny": "warn",
141+
"noExportsInTest": "error",
142+
"noExtraNonNullAssertion": "error",
143+
"noFallthroughSwitchClause": "error",
144+
"noFocusedTests": "error",
145+
"noFunctionAssign": "error",
146+
"noGlobalAssign": "error",
147+
"noImportAssign": "error",
148+
"noMisleadingCharacterClass": "error",
149+
"noMisleadingInstantiator": "error",
150+
"noMisplacedAssertion": "error",
151+
"noPrototypeBuiltins": "error",
152+
"noRedeclare": "error",
153+
"noShadowRestrictedNames": "error",
154+
"noSkippedTests": "warn",
155+
"noSparseArray": "error",
156+
"noUnsafeDeclarationMerging": "error",
157+
"noUnsafeNegation": "error",
158+
"useGetterReturn": "error",
159+
"useValidTypeof": "error"
160+
}
161+
},
162+
"ignore": [
163+
"**/*.md",
164+
"**/build",
165+
"**/dist",
166+
"**/node_modules",
167+
"**/vendor-js/**",
168+
"**/src/vendor-js/**",
169+
"**/*.json"
170+
]
171+
},
172+
"javascript": {
173+
"formatter": {
174+
"jsxQuoteStyle": "double",
175+
"quoteProperties": "asNeeded",
176+
"trailingCommas": "es5",
177+
"semicolons": "always",
178+
"arrowParentheses": "always",
179+
"bracketSameLine": false,
180+
"quoteStyle": "single",
181+
"attributePosition": "auto",
182+
"bracketSpacing": true
183+
},
184+
"globals": [
185+
"global",
186+
"browser",
187+
"expect"
188+
],
189+
"jsxRuntime": "reactClassic"
190+
},
191+
"overrides": [
192+
{
193+
"include": [
194+
"**/*.test.*"
195+
],
196+
"linter": {
197+
"rules": {
198+
"correctness": {
199+
"noUndeclaredVariables": "off"
200+
},
201+
"suspicious": {
202+
"noExplicitAny": "off"
203+
}
204+
}
205+
}
206+
}
207+
]
208+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"workspaces": [
77
"packages/*"
88
],
9-
"packageManager": "[email protected]"
9+
"packageManager": "[email protected]",
10+
"devDependencies": {
11+
"@biomejs/biome": "^1.9.4"
12+
}
1013
}

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build": "tsc -p ./tsconfig.build.json && tsc-alias",
3030
"dev": "tsc --watch & nodemon --watch dist --delay 1 --exec tsc-alias",
3131
"typecheck": "tsc --noEmit",
32-
"lint": "eslint . --ext .ts,.tsx --fix"
32+
"lint": "biome lint"
3333
},
3434
"dependencies": {
3535
"@noble/ciphers": "^0.5.3",
@@ -82,4 +82,4 @@
8282
"tslib": "^2.6.0",
8383
"typescript": "^5.1.6"
8484
}
85-
}
85+
}

packages/wagmi-connectors/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"dev": "tsc -w",
30-
"test": "jest"
30+
"test": "jest",
31+
"lint": "biome lint"
3132
},
3233
"peerDependencies": {
3334
"@mobile-wallet-protocol/client": "*",
@@ -51,4 +52,4 @@
5152
"typescript": "^5.1.6",
5253
"viem": "^2.19.4"
5354
}
54-
}
55+
}

yarn.lock

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,97 @@ __metadata:
14431443
languageName: node
14441444
linkType: hard
14451445

1446+
"@biomejs/biome@npm:^1.9.4":
1447+
version: 1.9.4
1448+
resolution: "@biomejs/biome@npm:1.9.4"
1449+
dependencies:
1450+
"@biomejs/cli-darwin-arm64": "npm:1.9.4"
1451+
"@biomejs/cli-darwin-x64": "npm:1.9.4"
1452+
"@biomejs/cli-linux-arm64": "npm:1.9.4"
1453+
"@biomejs/cli-linux-arm64-musl": "npm:1.9.4"
1454+
"@biomejs/cli-linux-x64": "npm:1.9.4"
1455+
"@biomejs/cli-linux-x64-musl": "npm:1.9.4"
1456+
"@biomejs/cli-win32-arm64": "npm:1.9.4"
1457+
"@biomejs/cli-win32-x64": "npm:1.9.4"
1458+
dependenciesMeta:
1459+
"@biomejs/cli-darwin-arm64":
1460+
optional: true
1461+
"@biomejs/cli-darwin-x64":
1462+
optional: true
1463+
"@biomejs/cli-linux-arm64":
1464+
optional: true
1465+
"@biomejs/cli-linux-arm64-musl":
1466+
optional: true
1467+
"@biomejs/cli-linux-x64":
1468+
optional: true
1469+
"@biomejs/cli-linux-x64-musl":
1470+
optional: true
1471+
"@biomejs/cli-win32-arm64":
1472+
optional: true
1473+
"@biomejs/cli-win32-x64":
1474+
optional: true
1475+
bin:
1476+
biome: bin/biome
1477+
checksum: 10c0/b5655c5aed9a6fffe24f7d04f15ba4444389d0e891c9ed9106fab7388ac9b4be63185852cc2a937b22940dac3e550b71032a4afd306925cfea436c33e5646b3e
1478+
languageName: node
1479+
linkType: hard
1480+
1481+
"@biomejs/cli-darwin-arm64@npm:1.9.4":
1482+
version: 1.9.4
1483+
resolution: "@biomejs/cli-darwin-arm64@npm:1.9.4"
1484+
conditions: os=darwin & cpu=arm64
1485+
languageName: node
1486+
linkType: hard
1487+
1488+
"@biomejs/cli-darwin-x64@npm:1.9.4":
1489+
version: 1.9.4
1490+
resolution: "@biomejs/cli-darwin-x64@npm:1.9.4"
1491+
conditions: os=darwin & cpu=x64
1492+
languageName: node
1493+
linkType: hard
1494+
1495+
"@biomejs/cli-linux-arm64-musl@npm:1.9.4":
1496+
version: 1.9.4
1497+
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.4"
1498+
conditions: os=linux & cpu=arm64 & libc=musl
1499+
languageName: node
1500+
linkType: hard
1501+
1502+
"@biomejs/cli-linux-arm64@npm:1.9.4":
1503+
version: 1.9.4
1504+
resolution: "@biomejs/cli-linux-arm64@npm:1.9.4"
1505+
conditions: os=linux & cpu=arm64 & libc=glibc
1506+
languageName: node
1507+
linkType: hard
1508+
1509+
"@biomejs/cli-linux-x64-musl@npm:1.9.4":
1510+
version: 1.9.4
1511+
resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.4"
1512+
conditions: os=linux & cpu=x64 & libc=musl
1513+
languageName: node
1514+
linkType: hard
1515+
1516+
"@biomejs/cli-linux-x64@npm:1.9.4":
1517+
version: 1.9.4
1518+
resolution: "@biomejs/cli-linux-x64@npm:1.9.4"
1519+
conditions: os=linux & cpu=x64 & libc=glibc
1520+
languageName: node
1521+
linkType: hard
1522+
1523+
"@biomejs/cli-win32-arm64@npm:1.9.4":
1524+
version: 1.9.4
1525+
resolution: "@biomejs/cli-win32-arm64@npm:1.9.4"
1526+
conditions: os=win32 & cpu=arm64
1527+
languageName: node
1528+
linkType: hard
1529+
1530+
"@biomejs/cli-win32-x64@npm:1.9.4":
1531+
version: 1.9.4
1532+
resolution: "@biomejs/cli-win32-x64@npm:1.9.4"
1533+
conditions: os=win32 & cpu=x64
1534+
languageName: node
1535+
linkType: hard
1536+
14461537
"@cspotcode/source-map-support@npm:^0.8.0":
14471538
version: 0.8.1
14481539
resolution: "@cspotcode/source-map-support@npm:0.8.1"
@@ -7897,6 +7988,8 @@ __metadata:
78977988
"root-workspace-0b6124@workspace:.":
78987989
version: 0.0.0-use.local
78997990
resolution: "root-workspace-0b6124@workspace:."
7991+
dependencies:
7992+
"@biomejs/biome": "npm:^1.9.4"
79007993
languageName: unknown
79017994
linkType: soft
79027995

0 commit comments

Comments
 (0)