From d1847d2d87fad723c36d19e6ab2b9abf30b01fc5 Mon Sep 17 00:00:00 2001 From: Steffen Wendt Date: Sat, 26 Oct 2024 01:39:41 +0200 Subject: [PATCH] Corrected typing issues after update Signed-off-by: Steffen Wendt --- packages/eslint-plugin-react/src/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/eslint-plugin-react/src/index.ts b/packages/eslint-plugin-react/src/index.ts index 2e2c1cc..1c3aa0b 100644 --- a/packages/eslint-plugin-react/src/index.ts +++ b/packages/eslint-plugin-react/src/index.ts @@ -2,13 +2,13 @@ import type {TSESLint} from '@typescript-eslint/utils'; import { cloudflightTypescriptBaseConfig, - cloudflightTypescriptConfig, cloudflightTypescriptDisableTypeCheckedConfig, + cloudflightTypescriptConfig, + cloudflightTypescriptDisableTypeCheckedConfig, cloudflightTypescriptImportConfig, } from '@cloudflight/eslint-plugin-typescript'; import jsxA11y from 'eslint-plugin-jsx-a11y'; import tseslint from 'typescript-eslint'; // see https://github.com/jsx-eslint/eslint-plugin-react/issues/3838 -// eslint-disable-next-line import-x/default import react from 'eslint-plugin-react'; import pluginReactHooks from 'eslint-plugin-react-hooks'; @@ -29,12 +29,12 @@ export const cloudflightReactConfig = tseslint.config( ...cloudflightTypescriptImportConfig, // type assertion is workaround for incorrect TypeScript types in eslint-plugin-react // see https://github.com/jsx-eslint/eslint-plugin-react/issues/3838 - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - react.configs.flat.recommended as TSESLint.FlatConfig.Config, + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions,@typescript-eslint/no-non-null-assertion + react.configs.flat!['recommended'] as TSESLint.FlatConfig.Config, // type assertion is workaround for incorrect TypeScript types in eslint-plugin-react // see https://github.com/jsx-eslint/eslint-plugin-react/issues/3838 - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - react.configs.flat['jsx-runtime'] as TSESLint.FlatConfig.Config, + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions,@typescript-eslint/no-non-null-assertion + react.configs.flat!['jsx-runtime'] as TSESLint.FlatConfig.Config, jsxA11y.flatConfigs.recommended, ], languageOptions: {