API
Basic Usage
import { MLEngine } from 'markuplint';
const file = await MLEngine.toMLFile('./path/to/page.html');
const engine = new MLEngine(file, {
configFile: './path/to/.markuplintrc',
});
engine.on('log', (id, message) => {
console.log(id, message);
});
const result = await engine.exec();
console.log(result.violations);
Packages
Package | NPM | Platform |
---|---|---|
markuplint | Node.js | |
@markuplint/create-rule-helper | Node.js | |
@markuplint/html-parser | Universal | |
@markuplint/html-spec | Universal | |
@markuplint/i18n | Universal | |
@markuplint/ml-ast | Universal | |
@markuplint/ml-config | Universal | |
@markuplint/ml-core | Universal | |
@markuplint/ml-spec | Universal | |
@markuplint/parser-utils | Universal | |
@markuplint/rules | Universal | |
@markuplint/types | Universal |