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
Update: run rules after node.parent
is already set (fixes #9122)
#9283
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not-an-aardvark
added
blocked
This change can't be completed until another issue is resolved
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
labels
Sep 10, 2017
@not-an-aardvark, thanks for your PR! By analyzing the history of the files in this pull request, we identified @i-ron-y, @mysticatea and @nzakas to be potential reviewers. |
not-an-aardvark
force-pushed
the
deferred-listener-calls
branch
from
September 10, 2017 22:42
e7a373d
to
f65fdac
Compare
LGTM |
not-an-aardvark
force-pushed
the
deferred-listener-calls
branch
from
September 11, 2017 20:11
f65fdac
to
5aeed11
Compare
LGTM |
not-an-aardvark
added
accepted
There is consensus among the team that this change meets the criteria for inclusion
and removed
blocked
This change can't be completed until another issue is resolved
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
labels
Sep 11, 2017
ilyavolodin
approved these changes
Sep 15, 2017
btmills
approved these changes
Sep 15, 2017
aladdin-add
added a commit
to aladdin-add/eslint
that referenced
this pull request
Sep 18, 2017
…slint#9122) (eslint#9283)" This reverts commit 1488b51.
ilyavolodin
pushed a commit
that referenced
this pull request
Sep 18, 2017
* Revert "4.7.0" This reverts commit 439e8e6. * Revert "Build: changelog update for 4.7.0" This reverts commit 2ec62f9. * Revert "Upgrade: Espree v3.5.1 (fixes #9153) (#9314)" This reverts commit 787b78b. * Revert "Update: run rules after `node.parent` is already set (fixes #9122) (#9283)" This reverts commit 1488b51. * Revert "Docs: fix wrong config in max-len example. (#9309)" This reverts commit 4431d68. * Revert "Chore: Revert "avoid handling Rules instances in config-validator" (#9295)" This reverts commit 9d1df92. * Revert "Docs: Fix code snippet to refer to the correct option (#9313)" This reverts commit 7d24dde. * Revert "�Chore: rewrite parseListConfig for a small perf gain. (#9300)" This reverts commit 12388d4.
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Mar 15, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request? (put an "X" next to item)
[x] Add something to the core
What changes did you make? (Give an overview)
This is a reference implementation of #9122. With this change, rules don't have to worry about whether
node.parent
has been set at any given point, because all of thenode.parent
properties will be assigned by the time the rule gets run.This builds on #9268, and should not be merged until #9268 is merged. For now, only look at the second commit.Since this stores nodes in a queue rather than doing another traversal, this has very little performance impact:
Performance metrics
On 9ecd264 (without this change applied):
On
deferred-listener-calls
(with this change applied):These numbers indicate a 1% performance decrease on the single-file benchmark, and a 1% improvement on the multi-file benchmark. I suspect at least some of this is noise, but if there is a performance impact it seems quite small.
Is there anything you'd like reviewers to focus on?
Nothing in particular