We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textlint的にはデフォルトのルールは緩く、オプションで厳しくが妥当なので、
strict: true
をオプションに追加する。 デフォルトでは文末の"です/である"のみを対象にする。
ignoreConjunctionを利用する
ignoreConjunction
The text was updated successfully, but these errors were encountered:
Proposal: デフォルトでは文末の"です/である"のみ検出するように
547668f
close #13
Breaking Change: デフォルトでは文末の"です/である"のみ検出するように (#14)
2979e21
`strict`オプションを導入し、デフォルトを`{ "strict": false }`としています。 そのため、デフォルトでは文末の表記のみを対象にチェックするように変更されています。 textlintでは多くのルールはfalse positiveにならないように、デフォルトを緩く設定しています。 厳しく(接続的な"である"なども)検出したい場合は、`{ "strict": true }` オプションが利用できます。 例えば、`strict:false`(デフォルト)では以下のような"である場合に"という接続的な"である"は無視されます。 そのため、次のような "であったが" は無視されています。 > OK: 昨日はいい天気であったが、今日は雨です。 `strict:false`では次のような文末が"である"や"です"といったものだけを検出します。 そのため、次の文章は"ですが"と"である"が混在しているのでエラーとなります。 > NG: 今日はいい天気である。明日も晴れです。 `strict:true`としていた場合では、以下の文章は"ですが"と"である"が混在しているのでエラーとなります。 > NG: 今日はいい天気ですが、明日は悪天候である。 ----- Q. なぜデフォルトでは文末のみの検出なのですか? A. 自然言語に絶対の表現がないためデフォルトを緩くするためです。 Q. 2.0(以前)と同じ挙動にするにはどうすればよいですか? A. オプションに`"strict": true`を追加してください。 2.0 ```js { "rules": { "no-mix-dearu-desumasu": { "preferInHeader": "", // "である" or "ですます" "preferInBody": "ですます",// "である" or "ですます" "preferInList": "である" // "である" or "ですます" } } } ``` 3.0 ```js { "rules": { "no-mix-dearu-desumasu": { "preferInHeader": "", // "である" or "ですます" "preferInBody": "ですます",// "である" or "ですます" "preferInList": "である", // "である" or "ですます" // 文末以外でも、敬体(ですます調)と常体(である調)を厳しくチェックするかどうか "strict": true } } } ``` 関連Issue - [接続的な "である" を無視するオプション · Issue #5 · azu/analyze-desumasu-dearu](textlint-ja/analyze-desumasu-dearu#5) - [Proposal: デフォルトでは文末の"です/である"のみ検出するように · Issue #13 · azu/textlint-rule-no-mix-dearu-desumasu](#13) close #13
Successfully merging a pull request may close this issue.
textlint的にはデフォルトのルールは緩く、オプションで厳しくが妥当なので、
をオプションに追加する。
デフォルトでは文末の"です/である"のみを対象にする。
ignoreConjunction
を利用するThe text was updated successfully, but these errors were encountered: