@markuplint/rule-textlint
v4.7.1
Published
The rule plugin that adapts textlint in markuplint
Downloads
810
Readme
@markuplint/rule-textlint
The rule plugin that adapts textlint in markuplint
Install
$ npm install -D @markuplint/rule-textlint
$ yarn add -D @markuplint/rule-textlint
Usage
Example
$ yarn add -D textlint-rule-prh
Load .textlintrc.*
config automatically
{
"rules": {
"textlint": true
}
}
{
// `html` plugin will be used automatically by `markuplint`
// but make sure to enable it manually
// if you are using `textlint` as cli at the same time
// "plugins": ["html"],
"rules": {
"prh": {
"rulePaths": ["../prh.yml"]
}
}
}
Use independent textlint config
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import Prh from 'textlint-rule-prh';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
rules: {
textlint: {
options: {
rules: [
{
ruleId: 'prh',
rule: Prh,
options: {
rulePaths: [path.resolve(__dirname, '..', 'prh.yml')],
},
},
],
},
},
},
};