-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbiome.jsonc
More file actions
251 lines (215 loc) · 7.44 KB
/
biome.jsonc
File metadata and controls
251 lines (215 loc) · 7.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite/core"],
"formatter": {
"enabled": true,
"lineWidth": 140 // Increased to 140 to allow longer one-line code
},
"javascript": {
"formatter": {
"arrowParentheses": "always", // Match prettier
"bracketSameLine": false, // Match prettier
"jsxQuoteStyle": "double", // Match prettier (jsxSingleQuote: false)
"quoteProperties": "asNeeded",
"quoteStyle": "single", // Match prettier
"semicolons": "always", // Match prettier
"trailingCommas": "all", // Match prettier (was "es5" in ultracite)
"attributePosition": "multiline" // Force JSX attributes on separate lines for readability
}
},
// Disable auto-organizing imports initially to prevent mass changes
"assist": {
"actions": {
"source": {
"organizeImports": "off", // Disable for now - was causing mass changes
"useSortedAttributes": "off", // Disable for gentle migration
"useSortedKeys": "off"
}
}
},
"linter": {
"enabled": true,
"rules": {
// Override strict style rules that conflict with team preferences
"style": {
// Team allows named functions in callbacks (for displayName)
"useBlockStatements": "off",
// Team preference - allow some flexibility
"useConsistentCurlyBraces": "off",
// Keep filenamingConvention disabled during migration
"useFilenamingConvention": "off",
// Team uses enums
"noEnum": "off",
// Allow nested ternaries (team decision)
"noNestedTernary": "off",
// Team allows non-null assertions when needed
"noNonNullAssertion": "off",
// Don't enforce during migration - too opinionated
// Object shorthand - disable for gentle migration
"useConsistentObjectDefinitions": "off",
// Catch mutable declarations that can be const
"useConst": "error",
// ENABLED - Safe, auto-fixable style improvements
"useImportType": {
"level": "warn",
"fix": "safe" // Converts imports to type imports - safe & improves bundle size
},
// Keep these OFF - more opinionated
"useNumericSeparators": "off", // 1_000_000 formatting
"useNodejsImportProtocol": "off", // node: protocol
},
"complexity": {
// Team uses forEach sometimes
"noForEach": "off",
// Team prefers function declarations (useArrowFunction is in complexity)
"useArrowFunction": "off",
// Allow void operator (async fire-and-forget)
"noVoid": "off",
// Don't force optional chain everywhere yet
"useOptionalChain": "off",
// Don't force simplified logic during migration
"useSimplifiedLogicExpression": "off",
// Disable for gentle migration
"noExcessiveCognitiveComplexity": "off", // 59 errors - refactoring needed
"noUselessUndefinedInitialization": "off", // 4 errors
"useIndexOf": "off" // 1 error
},
"performance": {
// Disable for gentle migration
"useTopLevelRegex": "off", // 15 errors
"noBarrelFile": "off", // 9 errors
},
"suspicious": {
// Team explicitly allows any in some places
"noExplicitAny": "off",
// Allow console for now (common in scripts)
"noConsole": "off",
// Don't enforce during migration
"noImplicitAnyLet": "off",
"noEvolvingTypes": "off",
// Disable for gentle migration
"noArrayIndexKey": "off", // 13 errors
"useIterableCallbackReturn": "off", // 8 errors
"noEmptyBlockStatements": "off", // 8 errors
"useAwait": "off", // 5 errors
"noGlobalIsNan": "off", // 5 errors
"noUnknownAtRules": "off", // 3 errors (CSS)
"noDoubleEquals": "off", // 3 errors
"noBitwiseOperators": "off", // 2 errors
"useNumberToFixedDigitsArgument": "off", // 1 error
"noGlobalIsFinite": "off" // 1 error
},
"correctness": {
// Hook deps disabled in old config - keep off for migration
"useExhaustiveDependencies": "off",
// Don't enforce unused function params yet
"noUnusedFunctionParameters": "off",
// ENABLED - Safe correctness rules that catch real bugs
"noUnusedImports": {
"level": "error",
"fix": "safe"
},
"noUnusedVariables": {
"level": "warn", // Warn instead of error for gentleness
"fix": "safe"
},
"useParseIntRadix": {
"level": "error",
"fix": "safe" // Auto-adds radix parameter to parseInt
},
"noUnreachable": "error", // Dead code - definitely a bug
"noUndeclaredVariables": "error", // Typo or missing import
"noSwitchDeclarations": "error" // Variable declarations in switch - bug prone
},
"security": {
// Team uses dangerouslySetInnerHTML for Google Analytics
"noDangerouslySetInnerHtml": "off"
},
"a11y": {
// Match old jsx-a11y rules that were disabled
"noStaticElementInteractions": "off",
"noAutofocus": "off",
"noSvgWithoutTitle": "off",
// Disable for gentle migration
"noNoninteractiveElementToInteractiveRole": "off", // 11 errors
"useSemanticElements": "off", // 10 errors
"useAriaPropsSupportedByRole": "off", // 1 error
"noRedundantRoles": "off", // 1 error
"noNoninteractiveElementInteractions": "off" // 1 error
},
"nursery": {
// Disable aggressive nursery rules during migration
// "noShadow": "off",
"noUselessUndefined": "off",
// Keep sorted classes off initially
"useSortedClasses": "off",
// These are too aggressive for migration
"noLeakedRender": "off",
"useConsistentArrowReturn": "off",
"noEqualsToNull": "off",
"noIncrementDecrement": "off",
// Disable for gentle migration
"useMaxParams": "off" // 9 errors
}
}
},
// Override ultracite's test file settings if needed
"overrides": [
{
"includes": [
"src/abis/**/*",
".eslintrc-old.js",
".stylelintrc.json",
"biome.jsonc",
"tsconfig.json",
"src/constants/oracle/**/*.json",
"public/manifest.json",
"src/components/ui/*.tsx",
"src/components/shared/date-picker.tsx"
],
"formatter": {
"enabled": false
},
"linter": {
"enabled": false
}
},
{
"includes": ["**/*.config.{js,ts,mjs,cjs,mts,cts}", "*.config.{js,ts,mjs,cjs,mts,cts}"],
"linter": {
"rules": {
"style": {
"noDefaultExport": "off"
}
}
}
},
{
"includes": ["**/*.test.{ts,tsx,js,jsx}", "**/__tests__/**/*"],
"linter": {
"rules": {
"complexity": {
"noExcessiveCognitiveComplexity": "off"
},
"suspicious": {
"noConsole": "off",
"noExplicitAny": "off"
}
}
}
},
{
"includes": ["**/scripts/**/*", "**/bin/**/*"],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
},
"style": {
"noProcessEnv": "off"
}
}
}
}
]
}