textlint-rule-preset-smarthr

1.28.0 • Public • Published

textlint-rule-preset-smarthr

SmartHRらしい文書を書くための、textlintルールプリセットを提供します。

インストール

Install with npm:

npm install textlint-rule-preset-smarthr

使い方

Via .textlintrc(Recommended)

Via CLI

textlint --rule preset-smarthr README.md

Build

ソースコードをビルドして、libフォルダに公開します。 TypeScriptのソースコードはsrc/フォルダに書くことができます。

npm run build

Tests

testフォルダ内のテストコードを実行します。 testの詳細はtextlint-testerを参照してください。

npm test

基本設定

すべてのルールを有効化して使う場合は、次のように設定してください。

{
  "rules": {
    "preset-smarthr": true
  }
}

デフォルト設定

デフォルトでは、次のような設定になっています。個別にルールを有効・無効化することも可能です。

{
  "rules": {
    "preset-smarthr": {
      "prh-rules": true,
      "ja-no-mixed-period": true,
      "no-hankaku-kana": true,
      "@textlint-rule/no-unmatched-pair": true,
      "sentence-length": {
        "max": 120
      },
      "no-doubled-conjunctive-particle-ga": true,
      "no-double-negative-ja": true,
      "ja-no-abusage": true,
      "ja-no-redundant-expression": true,
      "no-mixed-zenkaku-and-hankaku-alphabet": true,
      "ja-keishikimeishi": {
        "detection_hou_kata" : false,
        "detection_ue" : false
      },
      "ja-hiragana-fukushi": true,
      "ja-hiragana-hojodoushi": true,
      "ja-hiragana-daimeishi": true,
      "ja-no-space-around-parentheses": true,
      "ja-no-space-between-full-width": true,
      "ja-space-between-half-and-full-width": {
        "space": "never"
      },
      "ja-space-after-exclamation": true,
      "ja-space-after-question": true,
      "ja-space-around-code": false
    }
  }
}

設定ルール一覧

補足1: textlint-rule-preset-ja-spacingのルールプリセットを分解して設定しています。

辞書設定

表記ゆれ修正用の辞書の設定にはtextlint-rule-prhを使っています。 対応用語はdict/フォルダに入っている.ymlを確認してください。

License

MIT

Package Sidebar

Install

npm i textlint-rule-preset-smarthr

Weekly Downloads

4,777

Version

1.28.0

License

MIT

Unpacked Size

142 kB

Total Files

13

Last publish

Collaborators

  • shingo.sasaki
  • kesteer
  • yamish123
  • ackndev
  • ibulog
  • alpaca-tc
  • nabeliwo
  • atsushim
  • koba04
  • im36.123
  • smarthr-dev
  • ykarakita
  • cidermitaina
  • meganemura
  • wata727
  • wmoai
  • diescake
  • moshisora
  • tokky0425
  • hawaiiman
  • smarthr-admin
  • yamamoto-yuta
  • kgsi
  • otapo
  • kuny