Skip to content

Commit 6dd27c2

Browse files
authored
feat(rule): Add @textlint-rule/textlint-rule-no-unmatched-pair to preset (#49)
* feat(rule): add @textlint-rule/textlint-rule-no-unmatched-pair * feat(rule): add @textlint-rule/textlint-rule-no-unmatched-pair * fix typo
1 parent c83d164 commit 6dd27c2

File tree

4 files changed

+967
-15
lines changed

4 files changed

+967
-15
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ textlint --preset ja-technical-writing README.md
6969
* [よくある日本語の誤用をチェックする](#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%AE%E8%AA%A4%E7%94%A8%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B)
7070
* [冗長な表現をチェックする](#%E5%86%97%E9%95%B7%E3%81%AA%E8%A1%A8%E7%8F%BE%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B)
7171
* [入力ミスで発生する不自然なアルファベットをチェックする](#%E5%85%A5%E5%8A%9B%E3%83%9F%E3%82%B9%E3%81%A7%E7%99%BA%E7%94%9F%E3%81%99%E3%82%8B%E4%B8%8D%E8%87%AA%E7%84%B6%E3%81%AA%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%E3%83%99%E3%83%83%E3%83%88%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B)
72+
* [対になっていない括弧をチェックする](#%E5%AF%BE%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E6%8B%AC%E5%BC%A7%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B)
7273
- [Changelog](#changelog)
7374
- [Semantic Versioning Policy](#semantic-versioning-policy)
7475
- [ルールの利用者](#%E3%83%AB%E3%83%BC%E3%83%AB%E3%81%AE%E5%88%A9%E7%94%A8%E8%80%85)
@@ -255,8 +256,18 @@ textlint --preset ja-technical-writing README.md
255256
### 入力ミスで発生する不自然なアルファベットをチェックする
256257
> https://github.com/textlint-ja/textlint-rule-ja-unnatural-alphabet
257258
259+
`リイr−ス` などIMEの入力ミスが日本語中に混じった不自然なアルファベットをチェックします。
260+
258261
"ja-unnatural-alphabet": true
259262

263+
### 対になっていない括弧をチェックする
264+
> https://github.com/textlint-rule/textlint-rule-no-unmatched-pair
265+
266+
1文中で`(`に対応する`)`がない場合などの括弧の対応関係をチェックします。
267+
268+
"no-unmatched-pair": true
269+
270+
260271
## Changelog
261272

262273
See [Releases page](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases).

lib/textlint-rule-preset-ja-technical-writing.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module.exports = {
2323
"ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")),
2424
"ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")),
2525
"ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")),
26-
"ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet"))
26+
"ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")),
27+
"no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair"))
2728
},
2829
rulesConfig: {
2930
// # 1文の長さは100文字以下とする
@@ -118,6 +119,9 @@ module.exports = {
118119
"ja-no-redundant-expression": true,
119120
// # 入力ミスで発生する不自然なアルファベットをチェックする
120121
// https://github.com/textlint-ja/textlint-rule-ja-unnatural-alphabet
121-
"ja-unnatural-alphabet": true
122+
"ja-unnatural-alphabet": true,
123+
// # 対になっていない括弧をチェックする
124+
// https://github.com/textlint-rule/textlint-rule-no-unmatched-pair
125+
"no-unmatched-pair": true
122126
}
123127
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"dependencies": {
3737
"@textlint-rule/textlint-rule-no-invalid-control-character": "^1.2.0",
38+
"@textlint-rule/textlint-rule-no-unmatched-pair": "^1.0.7",
3839
"@textlint/module-interop": "^1.0.1",
3940
"textlint-rule-ja-no-abusage": "^2.0.0",
4041
"textlint-rule-ja-no-mixed-period": "^2.1.1",

0 commit comments

Comments
 (0)