@markuplint/rule-textlint
TypeScript icon, indicating that this package has built-in type declarations

4.7.2 • Public • Published

@markuplint/rule-textlint

npm version

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')],
            },
          },
        ],
      },
    },
  },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @markuplint/rule-textlint

Weekly Downloads

95

Version

4.7.2

License

MIT

Unpacked Size

6.94 kB

Total Files

11

Last publish

Collaborators

  • yusukehirao