API
基本的な使い方
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);
パッケージ
コア
HTML
| パッケージ | NPM |
|---|---|
@markuplint/html-parser | |
@markuplint/html-spec |
パーサー
スペック
| パッケージ | NPM |
|---|---|
@markuplint/react-spec | |
@markuplint/vue-spec | |
@markuplint/svelte-spec | |
@markuplint/alpine-spec | |
@markuplint/htmx-spec |
ユーティリティ
| パッケージ | NPM |
|---|---|
@markuplint/pretenders | |
@markuplint/create-rule | |
@markuplint/spec-generator |