From af60961c2feb56bf9a8c68e34801a4c40ccd224f Mon Sep 17 00:00:00 2001 From: Joost Kersjes Date: Fri, 12 Apr 2024 19:40:39 +0200 Subject: [PATCH] feat: add file patterns to flat config --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index c46717b..79a0066 100644 --- a/index.js +++ b/index.js @@ -58,8 +58,6 @@ export default function createConfig ({ vueVersion = '3.x', // '2.x' | '3.x' (TODO: 2.7 / vue-demi) configFormat = 'eslintrc', // eslintrc | flat - filePatterns = [], // flat format only - e.g. '**/*.vue', '**/*.js', etc. - styleGuide = 'default', // default | airbnb | standard hasTypeScript = false, // true | false needsPrettier = false, // true | false @@ -153,7 +151,9 @@ export default function createConfig ({ } const flatConfigEntry = { - files: filePatterns + files: language === 'javascript' + ? ['**/*.vue','**/*.js','**/*.jsx','**/*.cjs','**/*.mjs'] + : ['**/*.vue','**/*.js','**/*.jsx','**/*.cjs','**/*.mjs','**/*.ts','**/*.tsx','**/*.cts','**/*.mts'] } if (additionalConfig?.settings?.[CREATE_ALIAS_SETTING_PLACEHOLDER]) { flatConfigImports.push(