Skip to content

Commit

Permalink
fix(no-unused-watch): remove set at end of parse
Browse files Browse the repository at this point in the history
  • Loading branch information
d0whc3r committed Sep 15, 2019
1 parent ade8dea commit 050b085
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/rules/no-unused-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ const rule: Rule.RuleModule = {
}

return {
...stencil.rules,
'ClassDeclaration': stencil.rules.ClassDeclaration,
'ClassProperty > Decorator[expression.callee.name=Prop]': getVars,
'ClassProperty > Decorator[expression.callee.name=State]': getVars,
'MethodDefinition > Decorator[expression.callee.name=Watch]': checkWatch
'MethodDefinition > Decorator[expression.callee.name=Watch]': checkWatch,
'ClassDeclaration:exit': (node: any) => {
if (!stencil.isComponent()) {
return;
}
stencil.rules['ClassDeclaration:exit'](node);
varsList.clear();
}
};
}
};
Expand Down

0 comments on commit 050b085

Please sign in to comment.