Skip to content

Initialize shadowed 'this' bindings in constructors after super - fixes T7191 - #3422

Merged
loganfsmyth merged 1 commit into
babel:masterfrom
loganfsmyth:this-shadow-constructor
Apr 16, 2016
Merged

loganfsmyth merged 1 commit into
babel:masterfrom
loganfsmyth:this-shadow-constructor

Conversation

@loganfsmyth

Copy link
Copy Markdown
Member

No description provided.

@codecov-io

Copy link
Copy Markdown

Current coverage is 85.41%

Merging #3422 into master will decrease coverage by -0.28% as of e3af434

@@            master   #3422   diff @@
======================================
  Files          197     197       
  Stmts        12174   12183     +9
  Branches      2503    2507     +4
  Methods          0       0       
======================================
- Hit          10433   10406    -27
- Partial        528     564    +36
  Missed        1213    1213       

Review entire Coverage Diff as of e3af434

Powered by Codecov. Updated on successful CI builds.

@hzoo hzoo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Mar 16, 2016
@hzoo hzoo added this to the 6.6.x milestone Mar 16, 2016
@kjanoudi

Copy link
Copy Markdown

any update on this? @loganfsmyth

fnPath.setData(key, id);
fnPath.scope.push({ id, init });

if (key === "this" && fnPath.isMethod({kind: "constructor"})){

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocker: thought we had a linting rule for if (){ - will do a PR

@loganfsmyth loganfsmyth Apr 16, 2016 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, yeah a lint rule for this would help me a lot, I keep forgetting these.

@hzoo hzoo Apr 16, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/kittens/eslint-config-kittens/pull/1

Although the weird thing is that it will require an update of that config + next build will fail unless I just fix all of them beforehand

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add "object-curly-spacing": ["error", "always"] too for ({ id }) vs ({kind: "constructor"})?

@loganfsmyth
loganfsmyth merged commit b311517 into babel:master Apr 16, 2016
@loganfsmyth
loganfsmyth deleted the this-shadow-constructor branch April 16, 2016 21:29
@lock lock Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants