Skip to content

Commit b961cdc

Browse files
committed
Modify to improve RegExp to detect tsx file
1 parent 555fd6a commit b961cdc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/language-js/printer-estree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ function printPathNoParens(path, options, print, args) {
30083008
parent.params &&
30093009
parent.params.length === 1 &&
30103010
options.filepath &&
3011-
options.filepath.match(/\.tsx/) &&
3011+
/\.tsx$/i.test(options.filepath) &&
30123012
!n.constraint &&
30133013
grandParent.type === "ArrowFunctionExpression"
30143014
) {

0 commit comments

Comments
 (0)