From 9731bc490d86a68a6d935ffaf7a442b03d8ad8c6 Mon Sep 17 00:00:00 2001 From: Alexey Plutalov Date: Tue, 29 Oct 2024 11:12:11 +0300 Subject: [PATCH] fix: fix types --- src/configs/react.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/configs/react.ts b/src/configs/react.ts index 24a5ae9..210677a 100644 --- a/src/configs/react.ts +++ b/src/configs/react.ts @@ -12,6 +12,10 @@ export type Options = { export function react({ jsxRuntime = true, version = 'detect' }: Options = {}): NamedConfig[] { const { flat: configs } = plugin.configs; + if (configs == null) { + throw new Error("There no flat configs in the 'eslint-plugin-react'"); + } + const result: NamedConfig[] = [ { ...(configs.recommended as Config),