Skip to content
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(rules): handle anonymous class #423

Merged
merged 2 commits into from
Oct 5, 2017
Merged

fix(rules): handle anonymous class #423

merged 2 commits into from
Oct 5, 2017

Conversation

mgechev
Copy link
Owner

@mgechev mgechev commented Oct 5, 2017

Fix #422

@wKoza
Copy link
Collaborator

wKoza commented Oct 5, 2017

@mgechev , travis complains because of linting error :

ERROR: test/noAttributeParameterDecoratorRule.spec.ts[17, 12]: Missing semicolon

@mgechev
Copy link
Owner Author

mgechev commented Oct 5, 2017

@wKoza that's for the catch. Should be fine now.

Copy link
Collaborator

@wKoza wKoza left a comment

Choose a reason for hiding this comment

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

Just a question and LGTM !

@@ -29,9 +29,9 @@ export class Rule extends Lint.Rules.AbstractRule {
const syntaxKind = SyntaxKind.current();
return Maybe.lift(node.parent)
.fmap(parent => {
if (parent.kind === syntaxKind.ClassExpression) {
if (parent.kind === syntaxKind.ClassExpression && parent.parent.name) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

parent.parent is always defined ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, the constructor is always in a class.

@mgechev mgechev merged commit 61d11db into master Oct 5, 2017
@mgechev mgechev deleted the minko/fix-422 branch October 5, 2017 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants