Skip to content

Releases: textlint-ja/textlint-rule-preset-JTF-style

2.2.2

12 Jul 13:07
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • rule: "々"を漢字から除外する (63f91f9), closes #48

2.2.1

07 Jul 11:36
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • 2.1.6: カナ単語の末尾以外でも引っかかるを修正 (#47) (dad1b17) by @Surgo

2.2.0

03 May 12:26
@azu azu
Compare
Choose a tag to compare

Features

  • 2.2.2: 第◯章と第◯節 を追加 (33cf1f7)

2.1.2

16 Mar 12:54
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • 1.1.5: 空の画像タグがあると例外を吐くのを修正 (3165258)

2.1.1

12 Mar 13:31
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • rule: always use RuleError instead of object literal (0011c0a)

2.1.0

06 Mar 15:44
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • npm: update peerDependencies: "textlint": ">= 5.6.0" (4a5e82c)

Features

  • npm: add peerDependencies (be84211)

2.0.1

05 Mar 15:14
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • npm: use latest beta (0497911)
  • test: always use valid example (ce2b024)
  • test: use assert insteadof power-assert (d974441)
  • util: fix match index (9c13fd4)
  • util: split match-index to matchCaptureGroupAll (c63158c)

Features

2.0.0

22 Dec 04:35
@azu azu
Compare
Choose a tag to compare

textlint-plugin-jtf-style から textlint-rule-preset-jtf-style へとリネームされました。

またプラグインではなくプリセットとして動くように変更されています。

プリセットはtextlint 5.1.0から導入された機能で、ルールのセットを一つのまとまりとして扱うものです。
(プラグインにも同様の機能が一機能としてありましたが、5.1.0でプリセットという名前で同様の機能を切り離しました)

マイグレーション方法

textlint-plugin-jtf-style から textlint-rule-preset-jtf-style へ移行したい場合、

npm uninstall -D textlint-plugin-jtf-style
npm install -D textlint textlint-rule-preset-jtf-style

した後、.textlintrc

{
    "plugins": [
        "jtf-style"
    ],
    "rules": {
        "jtf-style/2.1.2.漢字": true,
        "jtf-style/2.1.5.カタカナ": true,
        "jtf-style/2.1.6.カタカナの長音": true,
        "jtf-style/2.2.1.ひらがなと漢字の使い分け": true
    }
}

以下のように書き換えれば完了です。

{
    "rules": {
        "preset-jtf-style": {
            "2.1.2.漢字": true,
            "2.1.5.カタカナ": true,
            "2.1.6.カタカナの長音": true,
            "2.2.1.ひらがなと漢字の使い分け": true
        }
    }
}

preset-jtf-style 以下にプリセットのルールのそれぞれの設定を書く形になります。
プリセットのデフォルト設定を使う場合はプリセット自体をtrueとすれば動作します。

{
    "rules": {
        "preset-jtf-style": true
    }
}

コマンドライン

コマンドラインから利用する場合は--preset引数を利用できます。

npm install -g textlint textlint-rule-preset-jtf-style
textlint --preset textlint-rule-preset-jtf-style README.md

1.0.0

11 Dec 01:18
@azu azu
Compare
Choose a tag to compare

Breaking Change

  • 衝突しやすいルールをデフォルト無効へ #24

1.0ではデフォルトでは他のルールと衝突しやすいルールがデフォルトでは無効化されています。

これらのルールを有効化したい場合は、.textlintrcで明示的に有効化する必要があります。

{
    "plugins": [
        "jtf-style"
    ],
    "rules": {
        "jtf-style/2.1.2.漢字": true,
        "jtf-style/2.1.5.カタカナ": true,
        "jtf-style/2.1.6.カタカナの長音": true,
        "jtf-style/2.2.1.ひらがなと漢字の使い分け": true
    }
}

この変更の意図するところは、textlintルールの指摘を言い回しで回避できないかなどを考えるのは本質ではないため、
不安定なルールは明示的にONにしないと使えないようにするという点にあります。

0.8.9

07 Dec 13:10
@azu azu
Compare
Choose a tag to compare

Features

  • 2.2.2: 数十万・数十億といった表現を許可 #23
  • 2.2.2: "数10年" -> "数十年" (22bd9e3)