-
-
Notifications
You must be signed in to change notification settings - Fork 75
Fix: Missing parameter properties info in constructors (fixes #143) #168
Conversation
Thanks for the pull request, @weirdpattern! I took a look to make sure it's ready for merging and found some changes are needed:
Can you please update the pull request to address these? (More information can be found in our pull request guide.) |
Updating summary as per comments form eslintbot |
d3cb603
to
eaeb9b4
Compare
LGTM |
Build is not being updated to complete, although travis completed successfully... |
@weirdpattern Maybe a webhook failed from traivs. No worries. LGTM, Thanks! |
@JamesHenry Could you take a look at this one too. It would allow for us to implement the TSLint rule no-parameter-properties for the typescript plugin. |
@weirdpattern @soda0289 Sorry to be a pain, but could we do an initial PR which adds a test for a standard JS class with one or more parameters in its constructor? I was surprised to see that we don't already have one in our ecmaFeatures/classes fixtures. If we could get that merged in first, it would be a really useful reference within this PR to see a before and after. It would also make it much easier to identify any unintended issues. |
There may well be no change, based on the code |
sure, no problem... I can work on this tonight unless @soda0289 wants to do it now, I leave the decision to you 😀 |
I can write some tests, I don't mind |
@soda0289 go for it and thank you! |
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.
Waiting on #178
Ready to be rebased against master! 😄 |
ESLint Jenkins seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
LGTM |
@weirdpattern I think you did a merge instead of a rebase and force push |
@soda0289 I think you are right, I was sure I did a rebase, no idea what I did wrong ... what should I do now? |
@weirdpattern Perfrom the rebase again it should clean it up. When you perfrom the push it might warn you that the histroy has changed. Just ignore the message and do a git push --force |
af6da25
to
707564d
Compare
LGTM |
@soda0289 ok I think I got it right this time... please review |
@weirdpattern Yup! LGTM, Thanks! |
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.
Otherwise LGTM! Glad you were able to figure out the rebasing
lib/ast-converter.js
Outdated
range: [param.getStart(), param.end], | ||
loc: getLoc(param, ast), | ||
accessibility: getTSNodeAccessibility(param), | ||
isReadonly: param.modifiers.filter(function(modifier) { |
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.
Using filter is a bit of an odd way to check this. More semantic would be:
isReadonly: param.modifiers.some(function(modifier) {
return modifier.kind === SyntaxKind.ReadonlyKeyword
})
707564d
to
1249aa1
Compare
Thanks for the pull request, @weirdpattern! I took a look to make sure it's ready for merging and found some changes are needed:
Can you please update the pull request to address these? (More information can be found in our pull request guide.) |
1249aa1
to
34f0444
Compare
LGTM |
@JamesHenry done |
Includes modifications to ast-converter and corresponding tests