eslint-plugin-htm
Version:
An incredible ESLint plugin for HTML based on HTMLHint
27 lines • 787 B
JavaScript
import { HTMLHint } from 'htmlhint';
export const html = {
meta: {
type: 'problem',
messages: {},
schema: [],
},
defaultOptions: [],
create(context) {
const sourceText = context.sourceCode.text;
return {
Program() {
const results = HTMLHint.verify(sourceText);
for (const { evidence, message, line, col, rule } of results) {
context.report({
message: JSON.stringify({ evidence, message, rule }),
loc: {
line,
column: col - 1,
},
});
}
},
};
},
};
//# sourceMappingURL=html.js.map