1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Remove fenced code in TypeScript files (#16742)

This commit is contained in:
Frederik Bolding 2022-11-30 15:36:34 +01:00 committed by GitHub
parent 0e1c385cd0
commit 8f775c0f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,14 +104,14 @@ function createRemoveFencedCodeTransform(
// string.
/**
* Returns a transform stream that removes fenced code from JavaScript files. For non-JavaScript
* Returns a transform stream that removes fenced code from JavaScript/TypeScript files. For non-JavaScript
* files, a pass-through stream is returned.
*
* @param filePath - The file path to transform.
* @returns {Transform} The transform stream.
*/
return function removeFencedCodeTransform(filePath) {
if (!['.js', '.cjs', '.mjs'].includes(path.extname(filePath))) {
if (!['.js', '.cjs', '.mjs', '.ts'].includes(path.extname(filePath))) {
return new PassThrough();
}