-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feat]: provide compatibility with eslint v9 #3727
Conversation
Oh... One more.
|
e8c06fc
to
cbe8e69
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3727 +/- ##
==========================================
- Coverage 97.76% 97.57% -0.19%
==========================================
Files 133 133
Lines 9467 9496 +29
Branches 3467 3480 +13
==========================================
+ Hits 9255 9266 +11
- Misses 212 230 +18 ☔ View full report in Codecov by Sentry. |
91b8de0
to
029e253
Compare
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.
It'd be very convenient if this was rebased so there was one commit that added and used astUtil.getScope
, and the rest was done in their own atomic commits :-)
const name = node.name; | ||
const variable = variableUtil.variablesInScope(context, node).find((item) => item.name === name); |
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.
it seems like variableUtil.variablesInScope(context, node, node.name)
should do this logic for us. am i misreading?
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.
variableUtil.variablesInScope(context, node)
returns a set of vars visible from the specified node, and then we pick the one by name, as I understand.
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.
right - but providing the third argument to variablesInScope
picks it by name already, doesn't it?
); | ||
const scope = astUtil.getScope(context, node); | ||
const allVars = []; | ||
let vars = (scope.childScopes[0] || scope).variableScope; |
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.
can you elaborate on the need for this? did eslint 9 just straight up remove this functionality?
380e32c
to
51d342b
Compare
I believe this was obsoleted by #3759. |
relates #3699
superseeds #3726