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

feat(getStaticValue): allow RegExp getters #77

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

RunDevelopment
Copy link

This allows getStaticValue to evaluate RegExp getters. Only the safe readonly getters are allowed, those are source, flags, and the getters for individual flags.

lastIndex is not included because its result depends on previous uses of the RegExp.

I also added tests for String and Array length and property access and for the RegExp constructor.

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.11 ⚠️

Comparison is base (5b1d059) 96.70% compared to head (8d6998e) 96.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   96.70%   96.60%   -0.11%     
==========================================
  Files          13       13              
  Lines        2004     2090      +86     
  Branches      380      388       +8     
==========================================
+ Hits         1938     2019      +81     
- Misses         65       68       +3     
- Partials        1        3       +2     
Impacted Files Coverage Δ
src/get-static-value.mjs 96.49% <100.00%> (-0.18%) ⬇️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ota-meshi ota-meshi changed the title Allow RegExp getters in getStaticValue feat(getStaticValue): allow RegExp getters Mar 17, 2023
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM!

@ota-meshi ota-meshi merged commit 80b934e into eslint-community:main Mar 17, 2023
@github-actions
Copy link

🎉 This PR is included in version 4.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants