Skip to content

Commit 1a92ea1

Browse files
authored
Upgrade to Biome v2 (Comcast#3811)
* Upgrade to Biome v2 * Enable project rule * sort
1 parent 1864179 commit 1a92ea1

3 files changed

Lines changed: 35 additions & 39 deletions

File tree

biome.json

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"ignore": [
5-
"./.cache/**/*",
6-
"./coverage/**/*",
7-
"./dist/**/*",
8-
"./lib/**/*",
9-
"./node_modules/**/*",
10-
"./website/routeTree.gen.ts"
4+
"includes": [
5+
"**",
6+
"!.cache/**/*",
7+
"!coverage/**/*",
8+
"!dist/**/*",
9+
"!lib/**/*",
10+
"!node_modules/**/*",
11+
"!website/routeTree.gen.ts"
1112
]
1213
},
1314
"formatter": {
14-
"ignore": ["*.ts", "*.tsx", "./package.json"],
15+
"includes": ["**", "!**/*.ts", "!**/*.tsx", "!package.json"],
1516
"indentStyle": "space",
1617
"lineWidth": 100
1718
},
@@ -33,14 +34,16 @@
3334
}
3435
},
3536
"linter": {
37+
"domains": {
38+
"project": "recommended"
39+
},
3640
"rules": {
3741
"recommended": false,
3842
"a11y": {
3943
"noAccessKey": "warn",
4044
"noAriaHiddenOnFocusable": "warn",
4145
"noAriaUnsupportedElements": "warn",
4246
"noAutofocus": "off",
43-
"noBlankTarget": "warn",
4447
"noDistractingElements": "warn",
4548
"noHeaderScope": "warn",
4649
"noInteractiveElementToNoninteractiveRole": "warn",
@@ -72,17 +75,21 @@
7275
"useValidLang": "warn"
7376
},
7477
"complexity": {
78+
"noAdjacentSpacesInRegex": "warn",
79+
"noArguments": "warn",
7580
"noBannedTypes": "warn",
81+
"noCommaOperator": "warn",
7682
"noEmptyTypeParameters": "warn",
7783
"noExcessiveCognitiveComplexity": "off",
7884
"noExcessiveNestedTestSuites": "off",
7985
"noExtraBooleanCast": "warn",
86+
"noFlatMapIdentity": "warn",
8087
"noForEach": "warn",
81-
"noMultipleSpacesInRegularExpressionLiterals": "warn",
8288
"noStaticOnlyClass": "warn",
8389
"noThisInStatic": "warn",
8490
"noUselessCatch": "warn",
8591
"noUselessConstructor": "warn",
92+
"noUselessContinue": "warn",
8693
"noUselessEmptyExport": "warn",
8794
"noUselessFragments": "warn",
8895
"noUselessLabel": "warn",
@@ -95,15 +102,16 @@
95102
"noUselessTypeConstraint": "warn",
96103
"noUselessUndefinedInitialization": "warn",
97104
"noVoid": "warn",
98-
"noWith": "warn",
99105
"useArrowFunction": "warn",
100106
"useDateNow": "warn",
101107
"useFlatMap": "warn",
102108
"useLiteralKeys": "warn",
109+
"useNumericLiterals": "warn",
103110
"useOptionalChain": "warn",
104111
"useRegexLiterals": "warn",
105112
"useSimpleNumberKeys": "warn",
106-
"useSimplifiedLogicExpression": "off"
113+
"useSimplifiedLogicExpression": "off",
114+
"useWhile": "warn"
107115
},
108116
"correctness": {
109117
"noChildrenProp": "off",
@@ -113,20 +121,18 @@
113121
"noConstructorReturn": "warn",
114122
"noEmptyCharacterClassInRegex": "warn",
115123
"noEmptyPattern": "warn",
116-
"noFlatMapIdentity": "warn",
117124
"noGlobalObjectCalls": "warn",
118125
"noInnerDeclarations": "warn",
119126
"noInvalidBuiltinInstantiation": "warn",
120127
"noInvalidConstructorSuper": "warn",
121128
"noInvalidDirectionInLinearGradient": "warn",
122129
"noInvalidGridAreas": "warn",
123-
"noInvalidNewBuiltin": "warn",
124130
"noInvalidPositionAtImportRule": "warn",
125131
"noInvalidUseBeforeDeclaration": "warn",
126-
"noNewSymbol": "warn",
127132
"noNodejsModules": "warn",
128133
"noNonoctalDecimalEscape": "warn",
129134
"noPrecisionLoss": "warn",
135+
"noPrivateImports": "warn",
130136
"noRenderReturnValue": "warn",
131137
"noSelfAssign": "warn",
132138
"noSetterReturn": "warn",
@@ -139,7 +145,6 @@
139145
"noUnknownProperty": "warn",
140146
"noUnknownUnit": "warn",
141147
"noUnmatchableAnbSelector": "warn",
142-
"noUnnecessaryContinue": "warn",
143148
"noUnreachable": "warn",
144149
"noUnreachableSuper": "warn",
145150
"noUnsafeFinally": "warn",
@@ -151,36 +156,35 @@
151156
"noUnusedVariables": "warn",
152157
"noVoidElementsWithChildren": "warn",
153158
"noVoidTypeReturn": "warn",
154-
"useArrayLiterals": "warn",
155159
"useExhaustiveDependencies": "off",
156160
"useHookAtTopLevel": "warn",
157161
"useImportExtensions": "off",
158162
"useIsNan": "warn",
159163
"useJsxKeyInIterable": "off",
160164
"useValidForDirection": "warn",
161-
"useYield": "warn"
165+
"useYield": "warn",
166+
"useValidTypeof": "warn"
162167
},
163168
"performance": {
164169
"noAccumulatingSpread": "warn",
165170
"noBarrelFile": "off",
166171
"noDelete": "warn",
172+
"noNamespaceImport": "warn",
167173
"noReExportAll": "off",
168174
"useTopLevelRegex": "warn"
169175
},
170176
"security": {
177+
"noBlankTarget": "warn",
171178
"noDangerouslySetInnerHtml": "warn",
172179
"noDangerouslySetInnerHtmlWithChildren": "warn",
173180
"noGlobalEval": "warn"
174181
},
175182
"style": {
176-
"noArguments": "warn",
177-
"noCommaOperator": "warn",
178183
"noDefaultExport": "off",
179184
"noDoneCallback": "warn",
180185
"noImplicitBoolean": "off",
181186
"noInferrableTypes": "warn",
182187
"noNamespace": "warn",
183-
"noNamespaceImport": "warn",
184188
"noNegationElse": "warn",
185189
"noNonNullAssertion": "off",
186190
"noParameterAssign": "off",
@@ -189,8 +193,8 @@
189193
"noShoutyConstants": "warn",
190194
"noUnusedTemplateLiteral": "warn",
191195
"noUselessElse": "warn",
192-
"noVar": "warn",
193196
"noYodaExpression": "warn",
197+
"useArrayLiterals": "warn",
194198
"useAsConstAssertion": "warn",
195199
"useBlockStatements": "off",
196200
"useCollapsedElseIf": "warn",
@@ -212,17 +216,13 @@
212216
"useNodeAssertStrict": "warn",
213217
"useNodejsImportProtocol": "warn",
214218
"useNumberNamespace": "warn",
215-
"useNumericLiterals": "warn",
216219
"useSelfClosingElements": "warn",
217-
"useShorthandArrayType": "warn",
218220
"useShorthandAssign": "warn",
219221
"useShorthandFunctionType": "warn",
220-
"useSingleCaseStatement": "off",
221222
"useSingleVarDeclarator": "warn",
222223
"useTemplate": "warn",
223224
"useThrowNewError": "warn",
224-
"useThrowOnlyError": "warn",
225-
"useWhile": "warn"
225+
"useThrowOnlyError": "warn"
226226
},
227227
"suspicious": {
228228
"noApproximativeNumericConstant": "warn",
@@ -236,7 +236,6 @@
236236
"noConfusingLabels": "warn",
237237
"noConfusingVoidType": "warn",
238238
"noConsole": "warn",
239-
"noConsoleLog": "warn",
240239
"noConstEnum": "warn",
241240
"noControlCharactersInRegex": "warn",
242241
"noDebugger": "warn",
@@ -284,23 +283,22 @@
284283
"noThenProperty": "warn",
285284
"noUnsafeDeclarationMerging": "warn",
286285
"noUnsafeNegation": "warn",
286+
"noVar": "warn",
287+
"noWith": "warn",
287288
"useAwait": "warn",
288289
"useDefaultSwitchClauseLast": "warn",
289290
"useErrorMessage": "warn",
290291
"useGetterReturn": "warn",
291292
"useIsArray": "warn",
292293
"useNamespaceKeyword": "warn",
293-
"useNumberToFixedDigitsArgument": "warn",
294-
"useValidTypeof": "warn"
294+
"useNumberToFixedDigitsArgument": "warn"
295295
}
296296
}
297297
},
298-
"organizeImports": {
299-
"enabled": false
300-
},
298+
"assist": { "actions": { "source": { "organizeImports": "off" } } },
301299
"overrides": [
302300
{
303-
"include": ["**/*.test.*"],
301+
"includes": ["**/*.test.*"],
304302
"linter": {
305303
"rules": {
306304
"performance": {
@@ -310,15 +308,14 @@
310308
}
311309
},
312310
{
313-
"include": ["**/*.js", "rolldown.config.ts"],
311+
"includes": ["**/*.js", "**/rolldown.config.ts"],
314312
"linter": {
315313
"rules": {
316314
"correctness": {
317315
"noNodejsModules": "off"
318316
},
319317
"suspicious": {
320-
"noConsole": "off",
321-
"noConsoleLog": "off"
318+
"noConsole": "off"
322319
}
323320
}
324321
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"devDependencies": {
5555
"@babel/preset-typescript": "^7.27.1",
56-
"@biomejs/biome": "1.9.4",
56+
"@biomejs/biome": "2.0.0",
5757
"@eslint/markdown": "^6.3.0",
5858
"@faker-js/faker": "^9.6.0",
5959
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",

src/DataGrid.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,6 @@ export function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridPr
11671167
selectedPosition.idx === -1 && selectedPosition.rowIdx !== minRowIdx - 1;
11681168

11691169
return (
1170-
// biome-ignore lint/a11y/useValidAriaProps: aria-description is a valid prop
11711170
<div
11721171
role={role}
11731172
aria-label={ariaLabel}

0 commit comments

Comments
 (0)