mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(tslint): custom rules invoke superclass methods (#6215)
A few rules are not implemented properly because their associated walker is overwriting hooks from the `SyntaxWalker` superclass. Those custom hooks need to invoke the method on the superclass as well. See https://palantir.github.io/tslint/develop/custom-rules/
This commit is contained in:
committed by
tinayuangao
parent
2364cfe8ab
commit
f19d2e52ee
@@ -28,7 +28,9 @@ class NoExposedTodoWalker extends Lint.RuleWalker {
|
||||
this.addFailureAt(commentRange.pos, commentRange.end - commentRange.pos, ERROR_MESSAGE);
|
||||
}
|
||||
});
|
||||
|
||||
super.visitSourceFile(sourceFile);
|
||||
}
|
||||
}
|
||||
|
||||
exports.Rule = Rule;
|
||||
exports.Rule = Rule;
|
||||
|
||||
@@ -50,6 +50,8 @@ class RequireLicenseBannerWalker extends Lint.RuleWalker {
|
||||
if (licenseCommentPos !== 0) {
|
||||
return this.addFailureAt(0, 0, ERROR_MESSAGE, tslintFix);
|
||||
}
|
||||
|
||||
super.visitSourceFile(sourceFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user