UNPKG

isml-linter

Version:

ISML Linter is a tool for examining if your project's templates follow a specified set of rules defined by your dev team. The available rules can be roughly grouped into:

18 lines (12 loc) 503 B
const TreeRulePrototype = require('../prototypes/TreeRulePrototype'); const ruleId = require('path').basename(__filename).slice(0, -3); const description = 'Embedded ISML is not allowed'; const Rule = Object.create(TreeRulePrototype); Rule.init(ruleId, description); Rule.isBroken = function(node) { return node.isHtmlTag() && !node.isOfType('is') && node.head.indexOf('<isprint') === -1 && node.head.indexOf('<is') >= 0; }; module.exports = Rule;