generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 10
/
constants.ts
35 lines (32 loc) · 992 Bytes
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const commonExtensions = [".js", ".cjs", ".mjs", ".ts", ".cts", ".mts"];
export const defaultExtensions = [
...commonExtensions,
".tsx",
".jsx",
".vue",
".svelte",
];
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,story,stories,types}.{${testFileExtensions}}`,
"**/__tests__/**",
"**/*-entry.js",
/* Exclude common development tool configuration files */
`**/{ava,babel,nyc}.config.{${configFileExtensions}}`,
`**/{jest,vitest}.config.{${configFileExtensions}}`,
`**/{karma,rollup,webpack,vite}.config.{${configFileExtensions}}`,
`**/.{eslint,mocha}rc.{${configFileExtensions}}`,
];