diff --git a/src/createConfig.ts b/src/createConfig.ts index 63403fa..5bde0c5 100644 --- a/src/createConfig.ts +++ b/src/createConfig.ts @@ -13,7 +13,7 @@ import { vueTsConfigs, type ExtendableConfigName } from './configs' import type { ScriptLang } from './internals' type ConfigOptions = ProjectOptions & { - extends?: Array + extends?: ExtendableConfigName[] supportedScriptLangs?: Record } diff --git a/src/utilities.ts b/src/utilities.ts index cdbc596..508f7dc 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -43,9 +43,8 @@ export function configureVueProject(userOptions: ProjectOptions): void { export function defineConfigWithVueTs( ...configs: InfiniteDepthConfigWithVueSupport[] ): ConfigArray { - const flattenedConfigs: Array = - // @ts-ignore - configs.flat(Infinity) + // @ts-ignore + const flattenedConfigs: ConfigObjectOrPlaceholder[] = configs.flat(Infinity) const reorderedConfigs = insertAndReorderConfigs(flattenedConfigs) @@ -84,8 +83,8 @@ type ExtractedConfig = { const userTypeAwareConfigs: ExtractedConfig[] = [] function insertAndReorderConfigs( - configs: Array, -): Array { + configs: ConfigObjectOrPlaceholder[], +): ConfigObjectOrPlaceholder[] { const lastExtendedConfigIndex = configs.findLastIndex( config => config instanceof TsEslintConfigForVue, )