From e396ea8b811f5a884e3a5f250ed39e1fc7535e8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:43:22 +0000 Subject: [PATCH] Bump @biomejs/biome from 1.4.1 to 1.5.2 (#3429) * Bump @biomejs/biome from 1.4.1 to 1.5.2 Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.4.1 to 1.5.2. - [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.5.2/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * update config --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nicolas Stepien --- biome.json | 27 ++++++++++++++++++++++----- package.json | 2 +- src/TreeDataGrid.tsx | 4 ++-- test/column/summaryCellClass.test.ts | 8 ++++---- website/demos/CommonFeatures.tsx | 1 + 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/biome.json b/biome.json index 5ac4678dad..aa3d6f4065 100644 --- a/biome.json +++ b/biome.json @@ -24,6 +24,7 @@ "recommended": false, "a11y": { "noAccessKey": "warn", + "noAriaHiddenOnFocusable": "warn", "noAriaUnsupportedElements": "warn", "noAutofocus": "off", "noBlankTarget": "warn", @@ -49,6 +50,7 @@ "useMediaCaption": "off", "useValidAnchor": "off", "useValidAriaProps": "warn", + "useValidAriaRole": "warn", "useValidAriaValues": "warn", "useValidLang": "warn" }, @@ -56,7 +58,7 @@ "noBannedTypes": "warn", "noExcessiveCognitiveComplexity": "off", "noExtraBooleanCast": "warn", - "noForEach": "off", + "noForEach": "warn", "noMultipleSpacesInRegularExpressionLiterals": "warn", "noStaticOnlyClass": "warn", "noThisInStatic": "warn", @@ -75,6 +77,7 @@ "useFlatMap": "warn", "useLiteralKeys": "warn", "useOptionalChain": "warn", + "useRegexLiterals": "warn", "useSimpleNumberKeys": "warn", "useSimplifiedLogicExpression": "off" }, @@ -107,8 +110,8 @@ "noUnusedVariables": "warn", "noVoidElementsWithChildren": "warn", "noVoidTypeReturn": "warn", - "useExhaustiveDependencies": "off", - "useHookAtTopLevel": "off", + "useExhaustiveDependencies": "warn", + "useHookAtTopLevel": "warn", "useIsNan": "warn", "useValidForDirection": "warn", "useYield": "warn" @@ -124,6 +127,7 @@ "style": { "noArguments": "warn", "noCommaOperator": "warn", + "noDefaultExport": "off", "noImplicitBoolean": "off", "noInferrableTypes": "warn", "noNamespace": "warn", @@ -134,7 +138,7 @@ "noRestrictedGlobals": "warn", "noShoutyConstants": "warn", "noUnusedTemplateLiteral": "warn", - "noUselessElse": "off", + "noUselessElse": "warn", "noVar": "warn", "useAsConstAssertion": "warn", "useBlockStatements": "off", @@ -183,6 +187,7 @@ "noFunctionAssign": "warn", "noGlobalIsFinite": "warn", "noGlobalIsNan": "warn", + "noImplicitAnyLet": "off", "noImportAssign": "warn", "noLabelVar": "warn", "noMisleadingInstantiator": "warn", @@ -205,5 +210,17 @@ }, "organizeImports": { "enabled": false - } + }, + "overrides": [ + { + "include": ["**/*.js"], + "linter": { + "rules": { + "suspicious": { + "noConsoleLog": "off" + } + } + } + } + ] } diff --git a/package.json b/package.json index 6ea894910e..e5d9b68f9c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.21.5", - "@biomejs/biome": "1.4.1", + "@biomejs/biome": "1.5.2", "@faker-js/faker": "^8.0.0", "@ianvs/prettier-plugin-sort-imports": "^4.0.2", "@linaria/core": "^6.0.0", diff --git a/src/TreeDataGrid.tsx b/src/TreeDataGrid.tsx index 3f145d135e..b272817229 100644 --- a/src/TreeDataGrid.tsx +++ b/src/TreeDataGrid.tsx @@ -329,11 +329,11 @@ function TreeDataGrid( if (!onRowsChange) return; const updatedRawRows = [...rawRows]; const rawIndexes: number[] = []; - indexes.forEach((index) => { + for (const index of indexes) { const rawIndex = rawRows.indexOf(rows[index] as R); updatedRawRows[rawIndex] = updatedRows[index]; rawIndexes.push(rawIndex); - }); + } onRowsChange(updatedRawRows, { indexes: rawIndexes, column diff --git a/test/column/summaryCellClass.test.ts b/test/column/summaryCellClass.test.ts index 26dfa6939b..2cd288c930 100644 --- a/test/column/summaryCellClass.test.ts +++ b/test/column/summaryCellClass.test.ts @@ -34,9 +34,9 @@ test('summaryCellClass is a string', () => { ]; setup({ columns, topSummaryRows, bottomSummaryRows, rows: [] }); const cells = getCells(); - cells.forEach((cell) => { + for (const cell of cells) { expect(cell).toHaveClass(`${cellClassname} my-cell`, { exact: true }); - }); + } }); test('summaryCellClass returns a string', () => { @@ -65,7 +65,7 @@ test('summaryCellClass returns undefined', () => { ]; setup({ columns, topSummaryRows, bottomSummaryRows, rows: [] }); const cells = getCells(); - cells.forEach((cell) => { + for (const cell of cells) { expect(cell).toHaveClass(cellClassname, { exact: true }); - }); + } }); diff --git a/website/demos/CommonFeatures.tsx b/website/demos/CommonFeatures.tsx index 0603da134e..52ad88a6ee 100644 --- a/website/demos/CommonFeatures.tsx +++ b/website/demos/CommonFeatures.tsx @@ -305,6 +305,7 @@ export default function CommonFeatures({ direction }: Props) { const [sortColumns, setSortColumns] = useState([]); const [selectedRows, setSelectedRows] = useState((): ReadonlySet => new Set()); + // biome-ignore lint/correctness/useExhaustiveDependencies: countries won't change const countries = useMemo((): readonly string[] => { return [...new Set(rows.map((r) => r.country))].sort(new Intl.Collator().compare); // eslint-disable-next-line react-hooks/exhaustive-deps