API Document
Packages
Package | NPM | Platform |
---|---|---|
markuplint | Node.js | |
@markuplint/file-resolver | Node.js | |
@markuplint/html-spec | Universal | |
@markuplint/html-parser | Universal | |
@markuplint/i18n | Universal | |
@markuplint/ml-ast | Universal | |
@markuplint/parser-utils | Universal | |
@markuplint/ml-config | Universal | |
@markuplint/ml-core | Universal | |
@markuplint/ml-spec | Universal | |
@markuplint/rules | Universal |
Basic Usage:
import { exec } from 'markuplint';
const result = await exec({
files: './**/*.html',
});
console.log(result); // => The results in JSON format
Functions
exec
- Parameter
options
- Return
- type:
Promise
<Array
<MLResultInfo
>>
- type:
options
Key | Type | Optional | Description |
---|---|---|---|
files | string string[] | ✓ | Glob pattern |
sourceCodes | string string[] | ✓ | Target source code of evaluation |
names | string string[] | ✓ | File names when sourceCodes |
workspace | string | ✓ | Workspace path when sourceCodes |
config | string Config | ✓ | Configure file or object |
defaultConfig | Config | ✓ | The config applied when not resolved from files or set it explicitly. |
rules | MLRule[] | ✓ | Rules (default: @markuplint/rules ) |
rulesAutoResolve | boolean | ✓ | Auto resolve rules - Auto importing form node_modules when set @markuplint/rule-{RULE_NAME} or markuplint-rule-{RULE_NAME} in config rules |
fix | boolean | ✓ | with to fix |
locale | string | ✓ | Locale |
Interface Document
The details are said by https://api.markuplint.dev.