-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
refactor: One-shot ESQuery selector analysis #19652
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
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
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.
LGTM, thanks!
Can we expose this, so that plugins can use?
|
@fisker please open a feature request so we can understand what it is you're asking for. |
Sorry, read it to quickly, I thought esquery was replaced. Deeply sorry. |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:
Refactor
What changes did you make? (Give an overview)
This refactors the ESQuery selector evaluation done by
NodeEventGenerator
. Previously, it would traverse the selector AST three times to collect different data. This refactor combines those three traversals into one to avoid extra work.Is there anything you'd like reviewers to focus on?