Skip to content

Commit c2e0f19

Browse files
authored
Merge branch 'main' into feat/use-column-frozen-prop-for-tree-data-grid
2 parents a213ad4 + e396ea8 commit c2e0f19

File tree

6 files changed

+40
-22
lines changed

6 files changed

+40
-22
lines changed

Diff for: biome.json

+22-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"recommended": false,
2525
"a11y": {
2626
"noAccessKey": "warn",
27+
"noAriaHiddenOnFocusable": "warn",
2728
"noAriaUnsupportedElements": "warn",
2829
"noAutofocus": "off",
2930
"noBlankTarget": "warn",
@@ -49,14 +50,15 @@
4950
"useMediaCaption": "off",
5051
"useValidAnchor": "off",
5152
"useValidAriaProps": "warn",
53+
"useValidAriaRole": "warn",
5254
"useValidAriaValues": "warn",
5355
"useValidLang": "warn"
5456
},
5557
"complexity": {
5658
"noBannedTypes": "warn",
5759
"noExcessiveCognitiveComplexity": "off",
5860
"noExtraBooleanCast": "warn",
59-
"noForEach": "off",
61+
"noForEach": "warn",
6062
"noMultipleSpacesInRegularExpressionLiterals": "warn",
6163
"noStaticOnlyClass": "warn",
6264
"noThisInStatic": "warn",
@@ -75,6 +77,7 @@
7577
"useFlatMap": "warn",
7678
"useLiteralKeys": "warn",
7779
"useOptionalChain": "warn",
80+
"useRegexLiterals": "warn",
7881
"useSimpleNumberKeys": "warn",
7982
"useSimplifiedLogicExpression": "off"
8083
},
@@ -107,8 +110,8 @@
107110
"noUnusedVariables": "warn",
108111
"noVoidElementsWithChildren": "warn",
109112
"noVoidTypeReturn": "warn",
110-
"useExhaustiveDependencies": "off",
111-
"useHookAtTopLevel": "off",
113+
"useExhaustiveDependencies": "warn",
114+
"useHookAtTopLevel": "warn",
112115
"useIsNan": "warn",
113116
"useValidForDirection": "warn",
114117
"useYield": "warn"
@@ -124,6 +127,7 @@
124127
"style": {
125128
"noArguments": "warn",
126129
"noCommaOperator": "warn",
130+
"noDefaultExport": "off",
127131
"noImplicitBoolean": "off",
128132
"noInferrableTypes": "warn",
129133
"noNamespace": "warn",
@@ -134,7 +138,7 @@
134138
"noRestrictedGlobals": "warn",
135139
"noShoutyConstants": "warn",
136140
"noUnusedTemplateLiteral": "warn",
137-
"noUselessElse": "off",
141+
"noUselessElse": "warn",
138142
"noVar": "warn",
139143
"useAsConstAssertion": "warn",
140144
"useBlockStatements": "off",
@@ -183,6 +187,7 @@
183187
"noFunctionAssign": "warn",
184188
"noGlobalIsFinite": "warn",
185189
"noGlobalIsNan": "warn",
190+
"noImplicitAnyLet": "off",
186191
"noImportAssign": "warn",
187192
"noLabelVar": "warn",
188193
"noMisleadingInstantiator": "warn",
@@ -205,5 +210,17 @@
205210
},
206211
"organizeImports": {
207212
"enabled": false
208-
}
213+
},
214+
"overrides": [
215+
{
216+
"include": ["**/*.js"],
217+
"linter": {
218+
"rules": {
219+
"suspicious": {
220+
"noConsoleLog": "off"
221+
}
222+
}
223+
}
224+
}
225+
]
209226
}

Diff for: package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,24 @@
6161
"@babel/preset-react": "^7.18.6",
6262
"@babel/preset-typescript": "^7.18.6",
6363
"@babel/runtime": "^7.21.5",
64-
"@biomejs/biome": "1.4.1",
64+
"@biomejs/biome": "1.5.2",
6565
"@faker-js/faker": "^8.0.0",
6666
"@ianvs/prettier-plugin-sort-imports": "^4.0.2",
6767
"@linaria/core": "^6.0.0",
6868
"@microsoft/api-extractor": "^7.23.0",
6969
"@rollup/plugin-babel": "^6.0.3",
7070
"@rollup/plugin-node-resolve": "^15.1.0",
71-
"@testing-library/jest-dom": "^6.0.0",
72-
"@testing-library/react": "^14.0.0",
73-
"@testing-library/user-event": "^14.1.1",
71+
"@testing-library/jest-dom": "^6.2.0",
72+
"@testing-library/react": "^14.1.2",
73+
"@testing-library/user-event": "^14.5.2",
7474
"@types/lodash-es": "^4.17.7",
7575
"@types/node": "^20.10.3",
7676
"@types/react": "^18.2.35",
7777
"@types/react-dom": "^18.2.4",
7878
"@typescript-eslint/eslint-plugin": "^6.1.0",
7979
"@typescript-eslint/parser": "^6.1.0",
80-
"@vitejs/plugin-react": "^4.0.2",
81-
"@vitest/coverage-v8": "^1.0.0",
80+
"@vitejs/plugin-react": "^4.2.1",
81+
"@vitest/coverage-v8": "^1.2.0",
8282
"@wyw-in-js/rollup": "^0.2.2",
8383
"@wyw-in-js/vite": "^0.2.2",
8484
"babel-plugin-optimize-clsx": "^2.6.2",
@@ -91,12 +91,12 @@
9191
"eslint-plugin-react-hooks": "^4.6.0",
9292
"eslint-plugin-sonarjs": "^0.23.0",
9393
"eslint-plugin-testing-library": "^6.2.0",
94-
"jsdom": "^23.0.1",
94+
"jsdom": "23.1.0",
9595
"jspdf": "^2.5.1",
9696
"jspdf-autotable": "^3.5.23",
9797
"lodash-es": "^4.17.21",
9898
"postcss": "^8.4.25",
99-
"prettier": "3.1.1",
99+
"prettier": "3.2.2",
100100
"react": "^18.1.0",
101101
"react-dnd": "^16.0.1",
102102
"react-dnd-html5-backend": "^16.0.1",
@@ -105,8 +105,8 @@
105105
"rollup": "^4.0.2",
106106
"rollup-plugin-postcss": "^4.0.2",
107107
"typescript": "~5.3.2",
108-
"vite": "^5.0.0",
109-
"vitest": "^1.0.0"
108+
"vite": "^5.0.11",
109+
"vitest": "^1.2.0"
110110
},
111111
"peerDependencies": {
112112
"react": "^18.0",

Diff for: src/TreeDataGrid.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,11 @@ function TreeDataGrid<R, SR, K extends Key>(
329329
if (!onRowsChange) return;
330330
const updatedRawRows = [...rawRows];
331331
const rawIndexes: number[] = [];
332-
indexes.forEach((index) => {
332+
for (const index of indexes) {
333333
const rawIndex = rawRows.indexOf(rows[index] as R);
334334
updatedRawRows[rawIndex] = updatedRows[index];
335335
rawIndexes.push(rawIndex);
336-
});
336+
}
337337
onRowsChange(updatedRawRows, {
338338
indexes: rawIndexes,
339339
column

Diff for: test/column/summaryCellClass.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ test('summaryCellClass is a string', () => {
3434
];
3535
setup({ columns, topSummaryRows, bottomSummaryRows, rows: [] });
3636
const cells = getCells();
37-
cells.forEach((cell) => {
37+
for (const cell of cells) {
3838
expect(cell).toHaveClass(`${cellClassname} my-cell`, { exact: true });
39-
});
39+
}
4040
});
4141

4242
test('summaryCellClass returns a string', () => {
@@ -65,7 +65,7 @@ test('summaryCellClass returns undefined', () => {
6565
];
6666
setup({ columns, topSummaryRows, bottomSummaryRows, rows: [] });
6767
const cells = getCells();
68-
cells.forEach((cell) => {
68+
for (const cell of cells) {
6969
expect(cell).toHaveClass(cellClassname, { exact: true });
70-
});
70+
}
7171
});

Diff for: vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export default defineConfig({
3232
test: {
3333
root: '.',
3434
environment: 'jsdom',
35-
pool: 'vmThreads',
3635
globals: true,
3736
coverage: {
3837
provider: 'v8',
3938
enabled: isCI,
4039
include: ['src/**/*.{ts,tsx}', '!src/types.ts'],
4140
reporter: ['text', 'json']
4241
},
42+
pool: 'vmThreads',
4343
poolOptions: {
4444
vmThreads: {
4545
useAtomics: true

Diff for: website/demos/CommonFeatures.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ export default function CommonFeatures({ direction }: Props) {
305305
const [sortColumns, setSortColumns] = useState<readonly SortColumn[]>([]);
306306
const [selectedRows, setSelectedRows] = useState((): ReadonlySet<number> => new Set());
307307

308+
// biome-ignore lint/correctness/useExhaustiveDependencies: countries won't change
308309
const countries = useMemo((): readonly string[] => {
309310
return [...new Set(rows.map((r) => r.country))].sort(new Intl.Collator().compare);
310311
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)