mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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.
|
// 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.
|
* files, a pass-through stream is returned.
|
||||||
*
|
*
|
||||||
* @param filePath - The file path to transform.
|
* @param filePath - The file path to transform.
|
||||||
* @returns {Transform} The transform stream.
|
* @returns {Transform} The transform stream.
|
||||||
*/
|
*/
|
||||||
return function removeFencedCodeTransform(filePath) {
|
return function removeFencedCodeTransform(filePath) {
|
||||||
if (!['.js', '.cjs', '.mjs'].includes(path.extname(filePath))) {
|
if (!['.js', '.cjs', '.mjs', '.ts'].includes(path.extname(filePath))) {
|
||||||
return new PassThrough();
|
return new PassThrough();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user