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);
パッケージ
パッケージ | NPM | プラットフォーム |
---|---|---|
markuplint | Node.js | |
@markuplint/create-rule-helper | Node.js | |
@markuplint/html-parser | ユニバーサル | |
@markuplint/html-spec | ユニバーサル | |
@markuplint/i18n | ユニバーサル | |
@markuplint/ml-ast | ユニバーサル | |
@markuplint/ml-config | ユニバーサル | |
@markuplint/ml-core | ユニバーサル | |
@markuplint/ml-spec | ユニバーサル | |
@markuplint/parser-utils | ユニバーサル | |
@markuplint/rules | ユニバーサル | |
@markuplint/types | ユニバーサル |