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

fix(template-parser): visit receiver of Call expression #1887

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

P4
Copy link

@P4 P4 commented Jun 14, 2024

When traversing a Call AST node, ESLint would never visit its receiver/callee. Since Call didn't have visitor keys listed explicitly, the parser would use getFallbackKeys, which seems to be buggy as it only returns args and not receiver.

Update test cases for no-call-expression to deal with new call expressions being reported.

Since convertAnnotatedSourceToFailureCase doesn't deal well with overlapping errors at the moment, instances of ()() were removed from existing tests and added as separate cases for nested calls.

Closes #1885

Paweł Maniecki added 2 commits June 14, 2024 23:33
When traversing a Call AST node, ESLint would never visit its receiver/callee.
Since Call didn't have visitor keys listed explicitly, the parser would use `getFallbackKeys`,
which seems to be buggy as it only returns `args` and not `receiver`.

Update test cases for no-call-expression to deal with new call expressions being reported.

Since convertAnnotatedSourceToFailureCase doesn't deal well with overlapping errors at the moment,
instances of `()()` were removed from existing tests and added as separate cases for nested calls.

Closes angular-eslint#1885
follow-up to 4292d10, fixes an identical problem with calls like
`foo?.()` which are represented as a separate node type.
Copy link

nx-cloud bot commented Jun 30, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 376100f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx run-many -t build,typecheck,check-rule-docs,lint,check-rule-lists,check-rule-configs
✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

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

Successfully merging this pull request may close these issues.

receiver of Call expression is skipped during AST traversal
1 participant