Skip to content

見逃しがちなタイプミスを検出するTextlintルール

Notifications You must be signed in to change notification settings

GunseiKPaseri/textlint-rule-ja-overlooked-typo

Repository files navigation

textlint-rule-ja-overlooked-typo

npm version Node.js CI textlint rule

textlint-rule-ja-overlooked-typo は見逃しそうなタイプミスを検出します。

例:

  • カタカナに混じる漢字
    • 二ュートンニュートン
  • カタカナに混じるひらがな
    • タぺストリータペストリー
  • ひらがなに混じるカタカナ
    • たいヘんたいへん

インストール

npm install -g textlint-rule-ja-overlooked-typo

使い方

.textlintrc を利用する場合

{
    "rules": {
        "ja-overlooked-typo": true
    }
}

CLIから利用する場合

textlint --rule ja-overlooked-typo README.md

オプション

  • allow:例外とする文字列のリスト
    • "$num$":カタカナの単位等で数字が入る場合に含める(漢数字が入る場合を例外として扱います)
  • strictModetrueの場合、誤検知も恐れず積極的に検出します。
    • 「データベースへアクセス」の「へ」などにも反応する可能性があります。
{
  "rules": {
    "ja-overlooked-typo": {
      "allow": ["$num$ペニー"],
      "strictMode": true,
    }
  }
}

開発

ビルド

npm run build

テスト

npm test

About

見逃しがちなタイプミスを検出するTextlintルール

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published