Skip to content

Commit b1d864f

Browse files
committed
Update README
1 parent f4fd3b1 commit b1d864f

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
同義語の辞書として[Sudachi 同義語辞書](https://github.com/WorksApplications/SudachiDict/blob/develop/docs/synonyms.md)を利用しています。
66

7+
**NG**:
8+
9+
```
10+
サーバとサーバーの表記揺れがある。
11+
この雇入と雇入れの違いを見つける。
12+
```
13+
714
## Install
815

916
Install with [npm](https://www.npmjs.com/):
@@ -31,15 +38,17 @@ textlint --rule @textlint-ja/no-synonyms README.md
3138
## Options
3239

3340
```ts
34-
export interface Options {
41+
{
3542
/**
3643
* 許可するワードの配列
3744
* ワードは完全一致で比較し、一致した場合は無視されます
45+
* 例) ["ウェブアプリ", "ウェブアプリケーション"]
3846
*/
3947
allows?: string[];
4048
/**
4149
* 同じ語形の語の中でのアルファベットの表記揺れを許可するかどうか
4250
* trueの場合はカタカナとアルファベットの表記ゆれを許可します
51+
* 例) 「ブログ」と「blog」
4352
* Default: true
4453
*/
4554
allowAlphabet?: boolean;

src/textlint-rule-no-synonyms.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ export interface Options {
1010
/**
1111
* 許可するワードの配列
1212
* ワードは完全一致で比較し、一致した場合は無視されます
13+
* 例) ["ウェブアプリ", "ウェブアプリケーション"]
1314
*/
1415
allows?: string[];
1516
/**
1617
* 同じ語形の語の中でのアルファベットの表記揺れを許可するかどうか
1718
* trueの場合はカタカナとアルファベットの表記ゆれを許可します
19+
* 例) 「ブログ」と「blog」
1820
* Default: true
1921
*/
2022
allowAlphabet?: boolean;

test/textlint-rule-no-synonyms.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ tester.run("textlint-rule-no-synonyms", rule, {
2121
}
2222
],
2323
invalid: [{
24+
text: "サーバとサーバーの表記揺れがある",
25+
errors: [{
26+
message: "同義語である「サーバ」「サーバー」が利用されています",
27+
index: 4
28+
}]
29+
}, {
2430
text: "この雇入と雇入れの違いは難しい問題だ",
2531
errors: [{
2632
message: "同義語である「雇入」「雇入れ」が利用されています",

0 commit comments

Comments
 (0)