html-structure-linter
v0.1.0
Published
[](https://badge.fury.io/js/html-structure-linter) [](http://opensource.org/licenses/MIT) [;
const lintText = fileResultToString(lintResult, selectors);
console.log(lintText);You can also use a shorthand to lint a bunch of files:
import {validate} from 'html-structure-linter';
validate({
selectors: { "span div": "Div in Span not allowed" },
files: [
"**/*.html",
"!node_modules/**/*.*"
]
}).then(({ resultText, footer, hasMatches }) => {
console.log(resultText);
console.log(footer);
if (hasMatches) {
process.exit(1);
}
});