Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(parser): fix crash when visiting decorators in parameters#237

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
armano2 merged 5 commits intotypescript-eslint:masterfromarmano2:no-unused-vars
Feb 12, 2019
Merged

fix(parser): fix crash when visiting decorators in parameters#237

armano2 merged 5 commits intotypescript-eslint:masterfromarmano2:no-unused-vars
Feb 12, 2019

Conversation

armano2
Copy link
Collaborator

@armano2armano2 commentedFeb 10, 2019
edited
Loading

This PR is fixes crashes in no-unused-vars for decorators in non identifier function parameters, and fixes issue with no-shadow forthis in functions

#122 (comment)

i think we should merge this after#234 (snapshots for scope analysis)

fixes:#207

@armano2armano2 self-assigned thisFeb 10, 2019
@armano2armano2 added the bugSomething isn't working labelFeb 10, 2019
@armano2armano2 changed the titlefix(parser): fix visiting decorators in parametersfix(parser): fix crash during visiting decorators in parametersFeb 10, 2019
@codecov
Copy link

codecovbot commentedFeb 10, 2019
edited
Loading

Codecov Report

Merging#237 intomaster willincrease coverage by0.07%.
The diff coverage is100%.

@@            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
Impacted FilesCoverage Δ
packages/parser/src/visitor-keys.ts100% <ø> (ø)⬆️
packages/eslint-plugin/src/rules/no-unused-vars.ts92.85% <ø> (+4.97%)⬆️
packages/parser/src/analyze-scope.ts95.76% <100%> (+0.09%)⬆️

@armano2armano2 changed the titlefix(parser): fix crash during visiting decorators in parametersfix(parser): fix crash when visiting decorators in parametersFeb 10, 2019
@armano2armano2 removed the request for review fromJamesHenryFebruary 11, 2019 02:48
@armano2armano2 requested review froma team and removed request forbradzacherFebruary 11, 2019 18:44
Copy link
Member

@bradzacherbradzacher left a 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 😄

@armano2
Copy link
CollaboratorAuthor

armano2 commentedFeb 12, 2019
edited
Loading

Crash is related to eslint not beeing able to set parent to decorators in parameters.
we was creating references while visiting it with pattern-visitor, but nodes was not traversable.

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

@armano2armano2 merged commit225fc26 intotypescript-eslint:masterFeb 12, 2019
@armano2armano2 deleted the no-unused-vars branchFebruary 12, 2019 01:29
kaicataldo pushed a commit to kaicataldo/typescript-eslint that referenced this pull requestAug 27, 2019
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 21, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JamesHenryJamesHenryJamesHenry approved these changes

@bradzacherbradzacherbradzacher approved these changes

Assignees

@armano2armano2

Labels
bugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[no-shadow] error onthis used as parameter function
3 participants
@armano2@JamesHenry@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp