-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(parser): fix crash when visiting decorators in parameters #237
Conversation
Codecov Report
@@ Coverage Diff @@
## master #237 +/- ##
=========================================
+ Coverage 94.53% 94.6% +0.07%
=========================================
Files 63 63
Lines 2761 2762 +1
Branches 718 719 +1
=========================================
+ Hits 2610 2613 +3
Misses 57 57
+ Partials 94 92 -2
|
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.
don't know a heap about the scope manager yet, but the CI passes and I don't see anything stupid in the code, so I'm happy with it 😄
Crash is related to eslint not beeing able to set parent to decorators in parameters. eslint traverse nodes base on structure defined in visitor-keys, and setts up parent for nodes. no-unused-vars is relying on parent of nodes set properly 2nd issue was that TSParameterProperty was not visitable and rule itself was reporting unused variables bacause we was not making references for decorators |
This PR is fixes crashes in no-unused-vars for decorators in non identifier function parameters, and fixes issue with no-shadow for
this
in functions#122 (comment)
i think we should merge this after #234 (snapshots for scope analysis)
fixes: #207