Skip to content

Commit

Permalink
add more files to default filter
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 7, 2024
1 parent 73c8fd6 commit 0d14ec2
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const commonExtensions = [".js", ".cjs", ".mjs", ".ts", ".cts", ".mts"];
export const defaultExtensions = [
".js",
".cjs",
".mjs",
".ts",
...commonExtensions,
".tsx",
".jsx",
".vue",
Expand All @@ -12,21 +10,26 @@ const testFileExtensions = defaultExtensions
.map((extension) => extension.slice(1))
.join(",");

const configFileExtensions = commonExtensions
.map((extension) => extension.slice(1))
.join(",");

export const defaultExclude = [
"**/node_modules/**",
".storybook/**",
"coverage/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"**/*.mock.*",
"test{,s}/**",
`test{,-*}.{${testFileExtensions}}`,
`**/*{.,-}{spec,stories,types}.{${testFileExtensions}}`,
`**/*{.,-}{spec,story,stories,types}.{${testFileExtensions}}`,
"**/__tests__/**",
"**/*-entry.js",

/* Exclude common development tool configuration files */
"**/{ava,babel,nyc}.config.{js,cjs,mjs}",
"**/jest.config.{js,cjs,mjs,ts}",
"**/{karma,rollup,webpack}.config.js",
"**/.{eslint,mocha}rc.{js,cjs}",
`**/{ava,babel,nyc}.config.{${configFileExtensions}}`,
`**/{jest,vitest}.config.{${configFileExtensions}}`,
`**/{karma,rollup,webpack,vite}.config.{${configFileExtensions}}`,
`**/.{eslint,mocha}rc.{${configFileExtensions}}`,
];

0 comments on commit 0d14ec2

Please sign in to comment.