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
Core
HTML
| Package | NPM |
|---|---|
@markuplint/html-parser | |
@markuplint/html-spec |
Parsers
Specs
| Package | NPM |
|---|---|
@markuplint/react-spec | |
@markuplint/vue-spec | |
@markuplint/svelte-spec | |
@markuplint/alpine-spec | |
@markuplint/htmx-spec |
Utilities
| Package | NPM |
|---|---|
@markuplint/pretenders | |
@markuplint/create-rule | |
@markuplint/spec-generator |