X(Twitter) Zenn GitHub RSS 共有

textlint

作成日時:2024-08-01以前
更新日時:2024-08-01

textlint詳細

導入と個人用設定

npm install textlint-rule-preset-ja-technical-writing

# 追加インストール
npm install textlint-rule-ja-no-inappropriate-words
npm install textlint-rule-ja-no-orthographic-variants
npm install textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet
npm install textlint-rule-prefer-tari-tari
npm install sudachi-synonyms-dictionary
npm install @textlint-ja/textlint-rule-no-synonyms sudachi-synonyms-dictionary
npm install @textlint-ja/textlint-rule-no-filler
npm install @textlint-ja/textlint-rule-no-insert-re
npm install @textlint-ja/textlint-rule-no-insert-dropping-sa
npm install @textlint-ja/textlint-rule-no-dropping-i
npm install textlint-rule-preset-ja-spacing

# 設定
{
    "rules": {
        "preset-ja-technical-writing": {
            "max-kanji-continuous-len": {
                "max": 15,
                "allow": []
            }
        },
        "ja-no-orthographic-variants": true,
        "ja-no-inappropriate-words": true,
        "no-mixed-zenkaku-and-hankaku-alphabet": true,
        "prefer-tari-tari": true,
        "@textlint-ja/no-synonyms": true,
        "@textlint-ja/no-filler": true,
        "@textlint-ja/textlint-rule-no-insert-re": true,
        "@textlint-ja/textlint-rule-no-insert-dropping-sa": true,
        "@textlint-ja/textlint-rule-no-dropping-i": true,
        "preset-ja-spacing": {
            "ja-space-between-half-and-full-width": {
                "space": ["alphabets"]
            }
        }
    }
}