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:
parent
0e1c385cd0
commit
8f775c0f7e
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user