Skip to content

Commit

Permalink
feat: add file patterns to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
JoostKersjes committed Apr 12, 2024
1 parent 3897283 commit af60961
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit af60961

Please sign in to comment.