This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Replace "/.*\.tsx/.test(...)" in source code with String.endsWith(".tsx") #525
Labels
Difficulty: Easy
Someone with little to no experience in TSLint should be able to send a pull request for this issue.
Good First Issue 🙌
Howdy, neighbor!
Status: Accepting PRs
Type: Bug
Milestone
See discussion in #521.
/.*\.tsx/.test(node.fileName)
will accidentally skip non-tsx files in the rare case of someone including .tsx in their file name before the extension, such as the very oddfoo.tsx.ts
. Let's switch it to just checking if the string ends with the .tsx extension.endsWith
is supported in all Node versions we support here.The text was updated successfully, but these errors were encountered: