From a27f0e0f28fb5f0b45cda5dd69d581e23fd79f0e Mon Sep 17 00:00:00 2001 From: "renovate-coveo[bot]" <115253437+renovate-coveo[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:01:44 +0000 Subject: [PATCH 1/2] chore(deps): update dependency eslint-plugin-react-hooks to v5 UITOOL-284 --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0ec8f540bd..0b2361c52b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "eslint-plugin-jsdoc": "50.4.3", "eslint-plugin-prefer-arrow": "1.2.3", "eslint-plugin-react": "7.37.2", - "eslint-plugin-react-hooks": "4.6.2", + "eslint-plugin-react-hooks": "5.0.0", "eslint-plugin-react-refresh": "0.4.14", "eslint-plugin-testing-library": "6.4.0", "eslint-plugin-unused-imports": "4.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 390a5ff482..4eac15df1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,8 +72,8 @@ importers: specifier: 7.37.2 version: 7.37.2(eslint@9.14.0(jiti@1.21.6)) eslint-plugin-react-hooks: - specifier: 4.6.2 - version: 4.6.2(eslint@9.14.0(jiti@1.21.6)) + specifier: 5.0.0 + version: 5.0.0(eslint@9.14.0(jiti@1.21.6)) eslint-plugin-react-refresh: specifier: 0.4.14 version: 0.4.14(eslint@9.14.0(jiti@1.21.6)) @@ -2902,11 +2902,11 @@ packages: peerDependencies: eslint: '>=2.0.0' - eslint-plugin-react-hooks@4.6.2: - resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} + eslint-plugin-react-hooks@5.0.0: + resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} engines: {node: '>=10'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 eslint-plugin-react-refresh@0.4.14: resolution: {integrity: sha512-aXvzCTK7ZBv1e7fahFuR3Z/fyQQSIQ711yPgYRj+Oj64tyTgO4iQIDmYXDBqvSWQ/FA4OSCsXOStlF+noU0/NA==} @@ -8150,7 +8150,7 @@ snapshots: dependencies: eslint: 9.14.0(jiti@1.21.6) - eslint-plugin-react-hooks@4.6.2(eslint@9.14.0(jiti@1.21.6)): + eslint-plugin-react-hooks@5.0.0(eslint@9.14.0(jiti@1.21.6)): dependencies: eslint: 9.14.0(jiti@1.21.6) From c3155d51974a6d3eaee5db8dba3cd08d4b30d1d2 Mon Sep 17 00:00:00 2001 From: Germain Bergeron Date: Mon, 11 Nov 2024 20:06:18 -0500 Subject: [PATCH 2/2] chore(eslint): remove fixup for reactHooks config --- eslint.config.mjs | 3 ++- packages/mantine/src/theme/Theme.tsx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 5a7def6286..4063f38831 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -22,7 +22,7 @@ export default tsEslint.config( import: eslintPluginImport, jsdoc, 'prefer-arrow': preferArrow, - 'react-hooks': fixupPluginRules(reactHooks), + 'react-hooks': reactHooks, 'unused-imports': unusedImports, }, languageOptions: { @@ -49,6 +49,7 @@ export default tsEslint.config( }, }, rules: { + ...reactHooks.configs.recommended.rules, 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'off', '@typescript-eslint/array-type': [ diff --git a/packages/mantine/src/theme/Theme.tsx b/packages/mantine/src/theme/Theme.tsx index 5ee6b07ecb..b55ebdfc1e 100644 --- a/packages/mantine/src/theme/Theme.tsx +++ b/packages/mantine/src/theme/Theme.tsx @@ -194,9 +194,8 @@ export const plasmaTheme: MantineThemeOverride = createTheme({ }, }), Input: Input.extend({ - classNames: (theme, props) => { + classNames: (_theme, props) => { const anyProps = props as any; - // eslint-disable-next-line no-underscore-dangle if (anyProps.readOnly && !props.disabled && !['Select'].includes(anyProps.__staticSelector)) { return deepMerge(InputClasses, ReadOnlyInputClasses); }