We have developed a number of customer linters, all of which follow the pattern of having a visitERBContentNode (or similar) override, which performs the required check and the calls super.visitERBContentNode
e.g.
class ERBNoRemoteForLinkToVisitor extends BaseRuleVisitor {
visitERBContentNode(node) {
this.checkLinkToTypeConstruct(node);
super.visitERBContentNode(node);
}
We do this because it's the pattern established in the sample custom linter that existed in the Herb repo when we first wrote a custom linter.
However, I notice that the linter docs now have two custom linters; .herb/rules/no-inline-styles.mjs and .herb/rules/no-div-tags.mjs. no-inline-styles ends its visitor with the expected call to super.visitHTMLOpenTagNode; but no-div-tags does not call the superclass's method at any point.
Does a custom linter, inheriting from BaseRuleVisitor, need to call super.visitFooNode as part of its visitFooNode overrides?
We have developed a number of customer linters, all of which follow the pattern of having a
visitERBContentNode(or similar) override, which performs the required check and the callssuper.visitERBContentNodee.g.
We do this because it's the pattern established in the sample custom linter that existed in the Herb repo when we first wrote a custom linter.
However, I notice that the linter docs now have two custom linters;
.herb/rules/no-inline-styles.mjsand.herb/rules/no-div-tags.mjs.no-inline-stylesends its visitor with the expected call tosuper.visitHTMLOpenTagNode; butno-div-tagsdoes not call the superclass's method at any point.Does a custom linter, inheriting from
BaseRuleVisitor, need to callsuper.visitFooNodeas part of itsvisitFooNodeoverrides?