-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): add prefer-regexp-exec rule #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eslint-plugin): add prefer-regexp-exec rule #305
Conversation
Codecov Report
@@ Coverage Diff @@
## master #305 +/- ##
==========================================
+ Coverage 95.5% 95.52% +0.02%
==========================================
Files 88 89 +1
Lines 4093 4112 +19
Branches 1150 1153 +3
==========================================
+ Hits 3909 3928 +19
Misses 82 82
Partials 102 102
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @ldrick!
I think we'll merge @mysticatea's work first, and then we can see what is shared, so just putting a block on for now, but LGTM
Hi @bradzacher , I am back from vacation and will change common used things. In the meanwhile, I have trouble with pulling master, due to 86 errors in linting. Did something change and how can this be fixed - because all of the linting issues refer not to this rule? |
Try doing a yarn install followed by a build. |
I tried locally, but linting fails, with exactly the same as azure pipelines in this PR. 😭 |
Ahh, I see what's happening. Which is why there are so many extra files. You'll have to go through and remove the changes to fix up the changeset in this branch. |
This reverts commit b6d7590.
@bradzacher Wow, thank you many times, I literally screwed up my master and with it everything else. I'm going to round up this PR tomorrow and continue using only one notebook with my (kn)own configuration. 🙇 |
I did everything, I wanted to do. Please check, if moving getTypeName is what everyone would have expected and the way it should be. Thanks 👍 |
Hi, it would be nice to merge this one, to save me from merging masters 😸 and it was already approved. Thanks |
@ldrick - We try to leave PRs open for around 2-3 weeks after getting an approval because we like to have 2 review approvals per feature PR. Don't worry about checking back and merging master regularly. We'll coordinate that when it comes time to merge it. That being said, it's probably time to merge this one in once these checks finish! |
Fixes: #283
This PR adds a new rule:
@typescript-eslint/prefer-regexp-exec
.I ended up with copying many things from #289, due to nearly the same problem is solved there already. Probably its useful to move
getTypeName(type: ts.Type): string
to utils - please let me know.