From 013cc5267ff3cc35e9c9d5bc495baea4098193a8 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sun, 27 Oct 2024 11:57:49 +0100 Subject: [PATCH] fix(utils): allow an array for the values of SharedConfig According to the docs for ESLint an array should be allowed here, and the type used by ESLint in their `ESLint.Plugin` interface is: Record | undefined So we should also allow an array. The helper function `tseslint.config` returns an array so without this you're not allowed to use a config returned by this function as a value in this record. Fixes #10213 --- packages/utils/src/ts-eslint/Config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/ts-eslint/Config.ts b/packages/utils/src/ts-eslint/Config.ts index dad591e03ef5..8292ede12ebf 100644 --- a/packages/utils/src/ts-eslint/Config.ts +++ b/packages/utils/src/ts-eslint/Config.ts @@ -150,7 +150,7 @@ export namespace FlatConfig { export type SourceType = 'commonjs' | ParserOptionsTypes.SourceType; export interface SharedConfigs { - [key: string]: Config; + [key: string]: Config | ConfigArray; } export interface Plugin { /**