Skip to content

Commit

Permalink
fix: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
demiazz committed Oct 29, 2024
1 parent eff2ad9 commit 44263fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 44263fa

Please sign in to comment.