From 2080be217a74c3217c0400f2108b022adab3b6f9 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 28 Sep 2023 12:46:55 +0800 Subject: [PATCH] feat: add `componentExts` to top level config --- src/factory.ts | 4 +--- src/types.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/factory.ts b/src/factory.ts index 9611ea22c2..0839bbbc74 100644 --- a/src/factory.ts +++ b/src/factory.ts @@ -53,6 +53,7 @@ export function antfu(options: OptionsConfig & FlatESLintConfigItem = {}, ...use stylistic: enableStylistic = true, gitignore: enableGitignore = true, overrides = {}, + componentExts = [], } = options const configs: FlatESLintConfigItem[][] = [] @@ -85,9 +86,6 @@ export function antfu(options: OptionsConfig & FlatESLintConfigItem = {}, ...use unicorn(), ) - // In the future we may support more component extensions like Svelte or so - const componentExts: string[] = [] - if (enableVue) componentExts.push('vue') diff --git a/src/types.ts b/src/types.ts index 49a496443e..10f9c2fe2c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -43,7 +43,7 @@ export interface OptionsIsInEditor { isInEditor?: boolean } -export interface OptionsConfig { +export interface OptionsConfig extends OptionsComponentExts { /** * Enable gitignore support. *