Skip to content

Commit 871af3f

Browse files
committed
feat: add componentExts to top level config
1 parent fa71469 commit 871af3f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/factory.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export function coderwyd(options: OptionsConfig & FlatESLintConfigItem = {}, ...
6666
stylistic: enableStylistic = true,
6767
gitignore: enableGitignore = true,
6868
overrides = {},
69+
componentExts = [],
6970
} = options
7071

7172
const configs: FlatESLintConfigItem[][] = []
@@ -94,8 +95,6 @@ export function coderwyd(options: OptionsConfig & FlatESLintConfigItem = {}, ...
9495
unicorn(),
9596
)
9697

97-
// In the future we may support more component extensions like Svelte or so
98-
const componentExts: string[] = []
9998
if (enableVue)
10099
componentExts.push('vue')
101100

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface OptionsIsInEditor {
4343
isInEditor?: boolean
4444
}
4545

46-
export interface OptionsConfig {
46+
export interface OptionsConfig extends OptionsComponentExts {
4747
/**
4848
* Enable gitignore support.
4949
*

0 commit comments

Comments
 (0)