1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x 1x 1x | import { Rule, RuleReport, RuleParserProxy } from '../rule';
import { AttributeEvent } from '../event';
export = {
name: 'no-inline-style',
init,
} as Rule;
function init(parser: RuleParserProxy){
parser.on('attr', (event: AttributeEvent, report: RuleReport) => {
Eif (event.key === 'style'){
report(event.target, "Inline style is not allowed");
}
});
}
|