Skip to content

Commit b4f30f6

Browse files
authored
Merge pull request #13714 from phated/phated/ts-exclude-tests
Build: Exclude all test and story files from transpilation
2 parents 131dea7 + a5fcba4 commit b4f30f6

File tree

34 files changed

+231
-38
lines changed

34 files changed

+231
-38
lines changed

addons/a11y/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@
1111
"noFallthroughCasesInSwitch": true
1212
},
1313
"include": ["src/**/*"],
14-
"exclude": ["src/__tests__/**/*"]
14+
"exclude": [
15+
"src/**/*.test.*",
16+
"src/**/tests/**/*",
17+
"src/**/__tests__/**/*",
18+
"src/**/*.stories.*",
19+
"src/**/*.mockdata.*",
20+
"src/**/__testfixtures__/**"
21+
]
1522
}

addons/actions/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@
55
"types": ["webpack-env", "jest"]
66
},
77
"include": ["src/**/*"],
8-
"exclude": ["src/__tests__/**/*", "src/**/*.test.ts"]
8+
"exclude": [
9+
"src/**/*.test.*",
10+
"src/**/tests/**/*",
11+
"src/**/__tests__/**/*",
12+
"src/**/*.stories.*",
13+
"src/**/*.mockdata.*",
14+
"src/**/__testfixtures__/**"
15+
]
916
}

addons/backgrounds/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"src/**/*"
99
],
1010
"exclude": [
11-
"src/__tests__/**/*"
11+
"src/**/*.test.*",
12+
"src/**/tests/**/*",
13+
"src/**/__tests__/**/*",
14+
"src/**/*.stories.*",
15+
"src/**/*.mockdata.*",
16+
"src/**/__testfixtures__/**"
1217
]
1318
}

addons/controls/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@
55
"types": ["webpack-env", "jest", "node"]
66
},
77
"include": ["src/**/*"],
8-
"exclude": ["src/**.test.ts"]
8+
"exclude": [
9+
"src/**/*.test.*",
10+
"src/**/tests/**/*",
11+
"src/**/__tests__/**/*",
12+
"src/**/*.stories.*",
13+
"src/**/*.mockdata.*",
14+
"src/**/__testfixtures__/**"
15+
]
916
}

addons/cssresources/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"src/**/*"
99
],
1010
"exclude": [
11-
"src/__tests__/**/*"
11+
"src/**/*.test.*",
12+
"src/**/tests/**/*",
13+
"src/**/__tests__/**/*",
14+
"src/**/*.stories.*",
15+
"src/**/*.mockdata.*",
16+
"src/**/__testfixtures__/**"
1217
]
1318
}

addons/design-assets/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"src/**/*"
99
],
1010
"exclude": [
11-
"src/__tests__/**/*"
11+
"src/**/*.test.*",
12+
"src/**/tests/**/*",
13+
"src/**/__tests__/**/*",
14+
"src/**/*.stories.*",
15+
"src/**/*.mockdata.*",
16+
"src/**/__testfixtures__/**"
1217
]
1318
}

addons/docs/tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55
"types": ["webpack-env", "jest", "node"]
66
},
77
"include": ["src/**/*"],
8-
"exclude": ["src/**.test.ts"]
8+
"exclude": [
9+
"src/**/*.test.*",
10+
"src/**/__tests__/**/*",
11+
"src/**/*.stories.*",
12+
"src/**/*.mockdata.*",
13+
"src/**/__testfixtures__/**"
14+
]
915
}

addons/essentials/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@
55
"types": ["webpack-env", "jest", "node"]
66
},
77
"include": ["src/**/*"],
8-
"exclude": ["src/**.test.ts"]
8+
"exclude": [
9+
"src/**/*.test.*",
10+
"src/**/tests/**/*",
11+
"src/**/__tests__/**/*",
12+
"src/**/*.stories.*",
13+
"src/**/*.mockdata.*",
14+
"src/**/__testfixtures__/**"
15+
]
916
}

addons/events/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"src/**/*"
99
],
1010
"exclude": [
11-
"src/__tests__/**/*"
11+
"src/**/*.test.*",
12+
"src/**/tests/**/*",
13+
"src/**/__tests__/**/*",
14+
"src/**/*.stories.*",
15+
"src/**/*.mockdata.*",
16+
"src/**/__testfixtures__/**"
1217
]
1318
}

addons/google-analytics/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"src/**/*"
99
],
1010
"exclude": [
11-
"src/__tests__/**/*"
11+
"src/**/*.test.*",
12+
"src/**/tests/**/*",
13+
"src/**/__tests__/**/*",
14+
"src/**/*.stories.*",
15+
"src/**/*.mockdata.*",
16+
"src/**/__testfixtures__/**"
1217
]
1318
}

0 commit comments

Comments
 (0)