Skip to content

Commit 4c4af3d

Browse files
Bump @biomejs/biome from 1.8.3 to 1.9.3 (#3612)
* Bump @biomejs/biome from 1.8.3 to 1.9.3 Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.8.3 to 1.9.3. - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/cli/v1.9.3/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * update config, fix lints --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas Stepien <[email protected]>
1 parent 757aab6 commit 4c4af3d

14 files changed

+77
-25
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.js
22
*.json
3+
*.css
34
/website/routeTree.gen.ts

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
"editor.defaultFormatter": "esbenp.prettier-vscode",
66
"editor.formatOnSave": true,
7-
"[javascript][json][jsonc]": {
7+
"[javascript][json][jsonc][css]": {
88
"editor.defaultFormatter": "biomejs.biome"
99
},
1010
"typescript.enablePromptUseWorkspaceTsdk": true,

biome.json

+57-8
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@
2828
}
2929
},
3030
"css": {
31-
"linter": {
32-
"enabled": false
33-
},
3431
"formatter": {
35-
"enabled": false,
36-
"indentStyle": "space"
32+
"quoteStyle": "single"
3733
}
3834
},
3935
"linter": {
@@ -48,6 +44,7 @@
4844
"noDistractingElements": "warn",
4945
"noHeaderScope": "warn",
5046
"noInteractiveElementToNoninteractiveRole": "warn",
47+
"noLabelWithoutControl": "off",
5148
"noNoninteractiveElementToInteractiveRole": "warn",
5249
"noNoninteractiveTabindex": "warn",
5350
"noPositiveTabindex": "warn",
@@ -59,12 +56,15 @@
5956
"useAriaActivedescendantWithTabindex": "warn",
6057
"useAriaPropsForRole": "warn",
6158
"useButtonType": "warn",
59+
"useFocusableInteractive": "off",
60+
"useGenericFontNames": "warn",
6261
"useHeadingContent": "warn",
6362
"useHtmlLang": "warn",
6463
"useIframeTitle": "warn",
6564
"useKeyWithClickEvents": "off",
6665
"useKeyWithMouseEvents": "warn",
6766
"useMediaCaption": "off",
67+
"useSemanticElements": "off",
6868
"useValidAnchor": "warn",
6969
"useValidAriaProps": "warn",
7070
"useValidAriaRole": "warn",
@@ -88,13 +88,16 @@
8888
"noUselessLabel": "warn",
8989
"noUselessLoneBlockStatements": "warn",
9090
"noUselessRename": "warn",
91+
"noUselessStringConcat": "warn",
9192
"noUselessSwitchCase": "warn",
9293
"noUselessTernary": "warn",
9394
"noUselessThisAlias": "warn",
9495
"noUselessTypeConstraint": "warn",
96+
"noUselessUndefinedInitialization": "warn",
9597
"noVoid": "warn",
9698
"noWith": "warn",
9799
"useArrowFunction": "warn",
100+
"useDateNow": "warn",
98101
"useFlatMap": "warn",
99102
"useLiteralKeys": "warn",
100103
"useOptionalChain": "warn",
@@ -113,24 +116,35 @@
113116
"noFlatMapIdentity": "warn",
114117
"noGlobalObjectCalls": "warn",
115118
"noInnerDeclarations": "warn",
119+
"noInvalidBuiltinInstantiation": "warn",
116120
"noInvalidConstructorSuper": "warn",
121+
"noInvalidDirectionInLinearGradient": "warn",
122+
"noInvalidGridAreas": "warn",
117123
"noInvalidNewBuiltin": "warn",
124+
"noInvalidPositionAtImportRule": "warn",
118125
"noInvalidUseBeforeDeclaration": "warn",
119126
"noNewSymbol": "warn",
120-
"noNodejsModules": "off",
127+
"noNodejsModules": "warn",
121128
"noNonoctalDecimalEscape": "warn",
122129
"noPrecisionLoss": "warn",
123130
"noRenderReturnValue": "warn",
124131
"noSelfAssign": "warn",
125132
"noSetterReturn": "warn",
126133
"noStringCaseMismatch": "warn",
127134
"noSwitchDeclarations": "warn",
135+
"noUndeclaredDependencies": "warn",
128136
"noUndeclaredVariables": "off",
137+
"noUnknownFunction": "warn",
138+
"noUnknownMediaFeatureName": "warn",
139+
"noUnknownProperty": "warn",
140+
"noUnknownUnit": "warn",
141+
"noUnmatchableAnbSelector": "warn",
129142
"noUnnecessaryContinue": "warn",
130143
"noUnreachable": "warn",
131144
"noUnreachableSuper": "warn",
132145
"noUnsafeFinally": "warn",
133146
"noUnsafeOptionalChaining": "warn",
147+
"noUnusedFunctionParameters": "off",
134148
"noUnusedImports": "warn",
135149
"noUnusedLabels": "warn",
136150
"noUnusedPrivateClassMembers": "warn",
@@ -140,6 +154,7 @@
140154
"useArrayLiterals": "warn",
141155
"useExhaustiveDependencies": "off",
142156
"useHookAtTopLevel": "warn",
157+
"useImportExtensions": "off",
143158
"useIsNan": "warn",
144159
"useJsxKeyInIterable": "off",
145160
"useValidForDirection": "warn",
@@ -149,7 +164,8 @@
149164
"noAccumulatingSpread": "warn",
150165
"noBarrelFile": "off",
151166
"noDelete": "warn",
152-
"noReExportAll": "off"
167+
"noReExportAll": "off",
168+
"useTopLevelRegex": "warn"
153169
},
154170
"security": {
155171
"noDangerouslySetInnerHtml": "warn",
@@ -160,6 +176,7 @@
160176
"noArguments": "warn",
161177
"noCommaOperator": "warn",
162178
"noDefaultExport": "off",
179+
"noDoneCallback": "warn",
163180
"noImplicitBoolean": "off",
164181
"noInferrableTypes": "warn",
165182
"noNamespace": "warn",
@@ -173,13 +190,17 @@
173190
"noUnusedTemplateLiteral": "warn",
174191
"noUselessElse": "warn",
175192
"noVar": "warn",
193+
"noYodaExpression": "warn",
176194
"useAsConstAssertion": "warn",
177195
"useBlockStatements": "off",
178196
"useCollapsedElseIf": "warn",
179197
"useConsistentArrayType": "warn",
198+
"useConsistentBuiltinInstantiation": "warn",
180199
"useConst": "warn",
181200
"useDefaultParameterLast": "off",
201+
"useDefaultSwitchClause": "warn",
182202
"useEnumInitializers": "warn",
203+
"useExplicitLengthCheck": "off",
183204
"useExponentiationOperator": "warn",
184205
"useExportType": "warn",
185206
"useFilenamingConvention": "off",
@@ -199,32 +220,40 @@
199220
"useSingleCaseStatement": "off",
200221
"useSingleVarDeclarator": "warn",
201222
"useTemplate": "warn",
223+
"useThrowNewError": "warn",
224+
"useThrowOnlyError": "warn",
202225
"useWhile": "warn"
203226
},
204227
"suspicious": {
205228
"noApproximativeNumericConstant": "warn",
206229
"noArrayIndexKey": "off",
207-
"noAssignInExpressions": "off",
230+
"noAssignInExpressions": "warn",
208231
"noAsyncPromiseExecutor": "warn",
209232
"noCatchAssign": "warn",
210233
"noClassAssign": "warn",
211234
"noCommentText": "warn",
212235
"noCompareNegZero": "warn",
213236
"noConfusingLabels": "warn",
214237
"noConfusingVoidType": "warn",
238+
"noConsole": "warn",
215239
"noConsoleLog": "warn",
216240
"noConstEnum": "warn",
217241
"noControlCharactersInRegex": "warn",
218242
"noDebugger": "warn",
219243
"noDoubleEquals": "warn",
244+
"noDuplicateAtImportRules": "warn",
220245
"noDuplicateCase": "warn",
221246
"noDuplicateClassMembers": "warn",
247+
"noDuplicateFontNames": "warn",
222248
"noDuplicateJsxProps": "warn",
223249
"noDuplicateObjectKeys": "warn",
224250
"noDuplicateParameters": "warn",
251+
"noDuplicateSelectorsKeyframeBlock": "warn",
225252
"noDuplicateTestHooks": "warn",
253+
"noEmptyBlock": "warn",
226254
"noEmptyBlockStatements": "off",
227255
"noEmptyInterface": "warn",
256+
"noEvolvingTypes": "off",
228257
"noExplicitAny": "off",
229258
"noExportsInTest": "warn",
230259
"noExtraNonNullAssertion": "warn",
@@ -236,15 +265,19 @@
236265
"noGlobalIsNan": "warn",
237266
"noImplicitAnyLet": "off",
238267
"noImportAssign": "warn",
268+
"noImportantInKeyframe": "warn",
239269
"noLabelVar": "warn",
240270
"noMisleadingCharacterClass": "warn",
241271
"noMisleadingInstantiator": "warn",
272+
"noMisplacedAssertion": "off",
242273
"noMisrefactoredShorthandAssign": "warn",
243274
"noPrototypeBuiltins": "warn",
275+
"noReactSpecificProps": "off",
244276
"noRedeclare": "warn",
245277
"noRedundantUseStrict": "warn",
246278
"noSelfCompare": "warn",
247279
"noShadowRestrictedNames": "warn",
280+
"noShorthandPropertyOverrides": "warn",
248281
"noSkippedTests": "warn",
249282
"noSparseArray": "warn",
250283
"noSuspiciousSemicolonInJsx": "warn",
@@ -253,9 +286,11 @@
253286
"noUnsafeNegation": "warn",
254287
"useAwait": "warn",
255288
"useDefaultSwitchClauseLast": "warn",
289+
"useErrorMessage": "warn",
256290
"useGetterReturn": "warn",
257291
"useIsArray": "warn",
258292
"useNamespaceKeyword": "warn",
293+
"useNumberToFixedDigitsArgument": "warn",
259294
"useValidTypeof": "warn"
260295
}
261296
}
@@ -264,11 +299,25 @@
264299
"enabled": false
265300
},
266301
"overrides": [
302+
{
303+
"include": ["**/*.test.*"],
304+
"linter": {
305+
"rules": {
306+
"performance": {
307+
"useTopLevelRegex": "off"
308+
}
309+
}
310+
}
311+
},
267312
{
268313
"include": ["**/*.js"],
269314
"linter": {
270315
"rules": {
316+
"correctness": {
317+
"noNodejsModules": "off"
318+
},
271319
"suspicious": {
320+
"noConsole": "off",
272321
"noConsoleLog": "off"
273322
}
274323
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@babel/preset-react": "^7.18.6",
6262
"@babel/preset-typescript": "^7.18.6",
6363
"@babel/runtime": "^7.21.5",
64-
"@biomejs/biome": "1.8.3",
64+
"@biomejs/biome": "1.9.3",
6565
"@eslint/compat": "^1.1.1",
6666
"@faker-js/faker": "^9.0.0",
6767
"@ianvs/prettier-plugin-sort-imports": "^4.0.2",
@@ -86,6 +86,7 @@
8686
"@wyw-in-js/rollup": "^0.5.0",
8787
"@wyw-in-js/vite": "^0.5.0",
8888
"babel-plugin-optimize-clsx": "^2.6.2",
89+
"browserslist": "^4.24.0",
8990
"eslint": "^9.11.1",
9091
"eslint-plugin-jest-dom": "^5.0.1",
9192
"eslint-plugin-react": "^7.36.1",

rollup.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import nodeResolve from '@rollup/plugin-node-resolve';
66
import pkg from './package.json' with { type: 'json' };
77

88
const extensions = ['.ts', '.tsx'];
9+
const annotationRegexp = /^[@#]__.+__$/;
910

1011
export default {
1112
input: './src/index.ts',
@@ -42,7 +43,7 @@ export default {
4243
// remove all comments except terser annotations
4344
// https://github.com/terser/terser#annotations
4445
// https://babeljs.io/docs/en/options#shouldprintcomment
45-
shouldPrintComment: (comment) => /^[@#]__.+__$/.test(comment)
46+
shouldPrintComment: (comment) => annotationRegexp.test(comment)
4647
}),
4748
nodeResolve({ extensions })
4849
]

test/browser/column/colSpan.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('colSpan', () => {
77
function setupColSpanGrid(colCount = 15) {
88
type Row = number;
99
const columns: Column<Row, Row>[] = [];
10-
const rows: readonly Row[] = [...Array(10).keys()];
10+
const rows: readonly Row[] = Array.from({ length: 10 }, (_, i) => i);
1111

1212
for (let i = 0; i < colCount; i++) {
1313
const key = String(i);

test/browser/keyboardNavigation.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313

1414
type Row = undefined;
1515

16-
const rows: readonly Row[] = Array(100);
16+
const rows: readonly Row[] = new Array(100);
1717
const topSummaryRows: readonly Row[] = [undefined];
1818
const bottomSummaryRows: readonly Row[] = [undefined, undefined];
1919

@@ -129,7 +129,7 @@ test('arrow and tab navigation', async () => {
129129
});
130130

131131
test('grid enter/exit', async () => {
132-
setup({ columns, rows: Array(5), bottomSummaryRows });
132+
setup({ columns, rows: new Array(5), bottomSummaryRows });
133133

134134
// no initial selection
135135
expect(getSelectedCell()).not.toBeInTheDocument();
@@ -168,7 +168,7 @@ test('grid enter/exit', async () => {
168168
});
169169

170170
test('navigation with focusable cell renderer', async () => {
171-
setup({ columns, rows: Array(1), bottomSummaryRows });
171+
setup({ columns, rows: new Array(1), bottomSummaryRows });
172172
await userEvent.tab();
173173
await userEvent.keyboard('{arrowdown}');
174174
validateCellPosition(0, 1);
@@ -209,7 +209,7 @@ test('navigation when header and summary rows have focusable elements', async ()
209209
}
210210
];
211211

212-
setup({ columns, rows: Array(2), bottomSummaryRows });
212+
setup({ columns, rows: new Array(2), bottomSummaryRows });
213213
await userEvent.tab();
214214

215215
// should set focus on the header filter

test/browser/rowHeight.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Row = number;
88

99
function setupGrid(rowHeight: DataGridProps<Row>['rowHeight']) {
1010
const columns: Column<Row>[] = [];
11-
const rows: readonly Row[] = [...Array(50).keys()];
11+
const rows: readonly Row[] = Array.from({ length: 50 }, (_, i) => i);
1212

1313
for (let i = 0; i < 5; i++) {
1414
const key = String(i);

test/browser/scrollToCell.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { getGrid } from './utils';
99

1010
type Row = undefined;
1111

12-
const rows: readonly Row[] = Array(50);
12+
const rows: readonly Row[] = new Array(50);
1313
const summaryRows: readonly Row[] = [undefined, undefined];
1414

1515
const columns: Column<Row, Row>[] = [];

test/browser/virtualization.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function setupGrid(
2121
summaryRowCount = 0
2222
) {
2323
const columns: Column<unknown>[] = [];
24-
const rows = Array(rowCount);
25-
const topSummaryRows = Array(summaryRowCount).fill(null);
26-
const bottomSummaryRows = Array(summaryRowCount).fill(null);
24+
const rows = new Array(rowCount);
25+
const topSummaryRows = new Array(summaryRowCount).fill(null);
26+
const bottomSummaryRows = new Array(summaryRowCount).fill(null);
2727

2828
for (let i = 0; i < columnCount; i++) {
2929
const key = String(i);

website/routes/ColumnSpanning.lazy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const Route = createLazyFileRoute('/ColumnSpanning')({
1212
});
1313

1414
type Row = number;
15-
const rows: readonly Row[] = [...Array(100).keys()];
15+
const rows: readonly Row[] = Array.from({ length: 100 }, (_, i) => i);
1616

1717
const colSpanClassname = css`
1818
background-color: #ffb300;

website/routes/MillionCells.lazy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const Route = createLazyFileRoute('/MillionCells')({
1111
});
1212

1313
type Row = number;
14-
const rows: readonly Row[] = [...Array(1000).keys()];
14+
const rows: readonly Row[] = Array.from({ length: 1000 }, (_, i) => i);
1515

1616
function MillionCells() {
1717
const direction = useDirection();

website/routes/ResizableGrid.lazy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const Route = createLazyFileRoute('/ResizableGrid')({
1010
});
1111

1212
type Row = number;
13-
const rows: readonly Row[] = [...Array(100).keys()];
13+
const rows: readonly Row[] = Array.from({ length: 100 }, (_, i) => i);
1414

1515
const columns: Column<Row>[] = [];
1616

website/routes/VariableRowHeight.lazy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const Route = createLazyFileRoute('/VariableRowHeight')({
1111
});
1212

1313
type Row = number;
14-
const rows: readonly Row[] = [...Array(500).keys()];
14+
const rows: readonly Row[] = Array.from({ length: 500 }, (_, i) => i);
1515

1616
function VariableRowHeight() {
1717
const direction = useDirection();

0 commit comments

Comments
 (0)