Skip to content
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

Closed
JoshuaKGoldberg opened this issue Oct 7, 2018 · 1 comment
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

Comments

@JoshuaKGoldberg
Copy link

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 odd foo.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.

@JoshuaKGoldberg JoshuaKGoldberg added Type: Bug Status: Accepting PRs Good First Issue 🙌 Howdy, neighbor! Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. labels Oct 7, 2018
@roblourens
Copy link
Member

I'm on it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

2 participants