Skip to content

Commit af60961

Browse files
committed
feat: add file patterns to flat config
1 parent 3897283 commit af60961

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export default function createConfig ({
5858
vueVersion = '3.x', // '2.x' | '3.x' (TODO: 2.7 / vue-demi)
5959
configFormat = 'eslintrc', // eslintrc | flat
6060

61-
filePatterns = [], // flat format only - e.g. '**/*.vue', '**/*.js', etc.
62-
6361
styleGuide = 'default', // default | airbnb | standard
6462
hasTypeScript = false, // true | false
6563
needsPrettier = false, // true | false
@@ -153,7 +151,9 @@ export default function createConfig ({
153151
}
154152

155153
const flatConfigEntry = {
156-
files: filePatterns
154+
files: language === 'javascript'
155+
? ['**/*.vue','**/*.js','**/*.jsx','**/*.cjs','**/*.mjs']
156+
: ['**/*.vue','**/*.js','**/*.jsx','**/*.cjs','**/*.mjs','**/*.ts','**/*.tsx','**/*.cts','**/*.mts']
157157
}
158158
if (additionalConfig?.settings?.[CREATE_ALIAS_SETTING_PLACEHOLDER]) {
159159
flatConfigImports.push(

0 commit comments

Comments
 (0)