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

Prevent . in regex #64

Open
adrianbw opened this issue Jun 30, 2023 · 2 comments
Open

Prevent . in regex #64

adrianbw opened this issue Jun 30, 2023 · 2 comments
Labels
enhancement New feature or request eslint help wanted Extra attention is needed

Comments

@adrianbw
Copy link

Originally suggested by @timneutkens because the Next.js team will be adding it. Periods in regex tend to lead to a lot of unintentional matching, and this will help prevent performance hits from doing so.

@mrmckeb mrmckeb added enhancement New feature or request eslint labels Jul 6, 2023
@mrmckeb
Copy link
Contributor

mrmckeb commented Aug 29, 2023

Is there an ESLint rule that can help with this? I had a look, but couldn't find one.

@timneutkens
Copy link
Member

I think we'll have to write one but shouldn't be too hard as regexes are a separate AST node.

CleanShot 2023-08-30 at 10 02 02@2x

@mrmckeb mrmckeb added the help wanted Extra attention is needed label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request eslint help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants