fix(linter): fix is_method_call with parentheses and chain expression#7095
Merged
Boshen merged 2 commits intooxc-project:mainfrom Nov 4, 2024
Conversation
Contributor
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
is_method_call with parentheses and chain expressionis_method_call with parentheses and chain expression
CodSpeed Performance ReportMerging #7095 will not alter performanceComparing Summary
|
Boshen
requested changes
Nov 3, 2024
Member
Boshen
left a comment
There was a problem hiding this comment.
We need a supporting test case.
7fabc7b to
b6f735b
Compare
Contributor
Author
|
@Boshen |
Boshen
approved these changes
Nov 4, 2024
Boshen
added a commit
that referenced
this pull request
Nov 9, 2024
## [0.11.1] - 2024-11-09 ### Features - 4dd9b60 editor/vscode: Replace existing output channel and trace output channel with a single LogOutputChannel (#7196) (Nicholas Rayburn) - 1fcd709 linter: Add jsx support for only-used-in-recursion (#7120) (no-yan) - 4d577cf linter: Add `import/first` rule (#7180) (Dmitry Zakharov) - 9b8973f linter: Add `import/unambiguous` rule (#7187) (Dmitry Zakharov) - 5ab1ff6 linter: Implement @typescript-eslint/no-unsafe-function-type (#6989) (Orenbek) ### Bug Fixes - eea8879 editor/vscode: Update language client id to fix the resolution of the oxc.trace.server setting (#7181) (Nicholas Rayburn) - b73cfd9 linter: Fix `is_method_call` with parentheses and chain expression (#7095) (tbashiyy) ### Refactor - 8c0a362 linter: Use `ctx.source_range(comment.content_span())` API (#7155) (Boshen) - c5485ae semantic: Add `ancestor_kinds` iterator function (#7217) (camchenry) - abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216) (camchenry) - 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215) (camchenry) Co-authored-by: Boshen <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I fixed
is_method_callbehavior in specific case below.For example, when we use
is_method_call(call_expr, None, Some(&["apply"]), Some(1), Some(1))for(a?.b.apply)(args), we cannot check correctly.This is because we don't consider
call_exprhas parentheses and chain expression.