8000 chore: enable prefer-regexp-test by abrahamguo · Pull Request #9658 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

chore: enable prefer-regexp-test #9658

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

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

abrahamguo
Copy link
Contributor

PR Checklist

Overview

Enable unicorn/prefer-regexp-test (docs).

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @abrahamguo!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link
netlify bot commented Jul 29, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 511655f
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/66b3e66a88c8010007e9638f
😎 Deploy Preview https://deploy-preview-9658--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
nx-cloud bot commented Jul 29, 2024

Josh-Cena
Josh-Cena previously approved these changes Jul 29, 2024
Copy link
codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.07%. Comparing base (2645946) to head (511655f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9658   +/-   ##
=======================================
  Coverage   88.07%   88.07%           
=======================================
  Files         402      402           
  Lines       13693    13693           
  Branches     3982     3982           
=======================================
  Hits        12060    12060           
  Misses       1324     1324           
  Partials      309      309           
Flag Coverage Δ
unittest 88.07% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ackages/eslint-plugin/src/util/getWrappingFixer.ts 95.45% <100.00%> (ø)

Copy link
Member
@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have https://typescript-eslint.io/rules/prefer-regexp-exec. I wonder if we should also have prefer-regexp-test? 🤷

...or maybe move both to eslint-plugin-regexp?

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jul 29, 2024
@abrahamguo
Copy link
Contributor Author

@JoshuaKGoldberg Not saying they wouldn't be open to it, but it looks like all of eslint-plugin-regexp's lint rules relate to the contents of regular expressions themselves, whereas rules like prefer-regexp-test and prefer-regexp-exec relate to the JS methods surrounding the regular expressions.

@Josh-Cena
Copy link
Member
Josh-Cena commented Aug 1, 2024

That's two +1s—let's do this!

It's indeed weird that we have prefer-regexp-exec. Looks like the Unicorn rule doesn't use type information though, so it may false positive though chances are sparse.

Once this branch is updated we can merge.

@abrahamguo abrahamguo dismissed stale reviews from JoshuaKGoldberg and Josh-Cena via b9e26bc August 7, 2024 01:10
@Josh-Cena Josh-Cena merged commit a26e3c7 into typescript-eslint:main Aug 7, 2024
59 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval 4C04 >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0