3
3
技術文書向けの[ textlint] ( https://textlint.github.io/ ) ルールプリセットです。
4
4
全体的に少し厳しめの設定がデフォルト値となっているため、文章に合わせて設定値を変更する必要があります。
5
5
6
- また、[ 連続できる最大の漢字長は6文字まで] ( #%E9%80%A3%E7%B6%9A%E3%81%A7%E3%81%8D%E3%82%8B%E6%9C%80%E5%A4%A7%E3%81%AE%E6%BC%A2%E5%AD%97%E9%95%B7%E3%81%AF6%E6%96%87%E5%AD%97%E3%81%BE%E3%81%A7 ) のように文章全体として例外が必ず出てくるルールもデフォルトで入っています。
7
- ルールによっては` allow ` オプションで例外を規定できるようになっているため、例外を明示しつつ利用することを想定しています。
6
+ また、[ 連続できる最大の漢字長は6文字まで] ( #%E9%80%A3%E7%B6%9A%E3%81%A7%E3%81%8D%E3%82%8B%E6%9C%80%E5%A4%A7%E3%81%AE%E6%BC%A2%E5%AD%97%E9%95%B7%E3%81%AF6%E6%96%87%E5%AD%97%E3%81%BE%E3%81%A7 )
7
+ のように文章全体として例外が必ず出てくるルールもデフォルトで入っています。 ルールによっては` allow ` オプションで例外を規定できるようになっているため、例外を明示しつつ利用することを想定しています。
8
8
9
9
合わせて利用することを想定しているfilterルール(例外を明示できる)も参照してください。
10
10
@@ -26,9 +26,9 @@ Via `.textlintrc`(Recommended)
26
26
27
27
``` json
28
28
{
29
- "rules" : {
30
- "preset-ja-technical-writing" : true
31
- }
29
+ "rules" : {
30
+ "preset-ja-technical-writing" : true
31
+ }
32
32
}
33
33
```
34
34
@@ -38,6 +38,24 @@ Via CLI
38
38
textlint --preset ja-technical-writing README.md
39
39
```
40
40
41
+ ## ルールの設定方法
42
+
43
+ 次のように ` "preset-ja-technical-writing" ` 以下にそれぞれのオプション値を指定することで、設定を変更できます。
44
+ 各ルールの設定できるオプションは、各ルールのREADMEを参照してください。
45
+
46
+ ``` json
47
+ {
48
+ "rules" : {
49
+ "preset-ja-technical-writing" : {
50
+ "max" : 120 ,
51
+ "no-mix-dearu-desumasu" : false
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ また、ルールの設定方法については[ textlintのドキュメント] ( https://textlint.github.io/docs/configuring.html#rule-preset ) も参照してください。
58
+
41
59
## ルール一覧
42
60
43
61
<!-- toc -->
@@ -56,6 +74,7 @@ textlint --preset ja-technical-writing README.md
56
74
* [ 同じ助詞を連続して使用しない] ( #%E5%90%8C%E3%81%98%E5%8A%A9%E8%A9%9E%E3%82%92%E9%80%A3%E7%B6%9A%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
57
75
* [ UTF8-MAC 濁点を使用しない] ( #utf8-mac-%E6%BF%81%E7%82%B9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
58
76
* [ 不必要な制御文字を使用しない] ( #%E4%B8%8D%E5%BF%85%E8%A6%81%E3%81%AA%E5%88%B6%E5%BE%A1%E6%96%87%E5%AD%97%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
77
+ * [ 不必要なゼロ幅スペースを使用しない] ( #%E4%B8%8D%E5%BF%85%E8%A6%81%E3%81%AA%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
59
78
* [ 感嘆符!!、感嘆符??を使用しない] ( #%E6%84%9F%E5%98%86%E7%AC%A6%E6%84%9F%E5%98%86%E7%AC%A6%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
60
79
* [ 半角カナを使用しない] ( #%E5%8D%8A%E8%A7%92%E3%82%AB%E3%83%8A%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
61
80
* [ 弱い日本語表現の利用を使用しない] ( #%E5%BC%B1%E3%81%84%E6%97%A5%E6%9C%AC%E8%AA%9E%E8%A1%A8%E7%8F%BE%E3%81%AE%E5%88%A9%E7%94%A8%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84 )
@@ -66,8 +85,10 @@ textlint --preset ja-technical-writing README.md
66
85
* [ 対になっていない括弧をチェックする] ( #%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 )
67
86
- [ Changelog] ( #changelog )
68
87
- [ Semantic Versioning Policy] ( #semantic-versioning-policy )
88
+ * [ Release Flow] ( #release-flow )
69
89
- [ ルールの利用者] ( #%E3%83%AB%E3%83%BC%E3%83%AB%E3%81%AE%E5%88%A9%E7%94%A8%E8%80%85 )
70
90
- [ Community] ( #community )
91
+ - [ その他のルール] ( #%E3%81%9D%E3%81%AE%E4%BB%96%E3%81%AE%E3%83%AB%E3%83%BC%E3%83%AB )
71
92
- [ Running tests] ( #running-tests )
72
93
- [ Contributing] ( #contributing )
73
94
- [ Author] ( #author )
@@ -76,10 +97,10 @@ textlint --preset ja-technical-writing README.md
76
97
<!-- tocstop -->
77
98
78
99
### 1文の長さは100文字以下とする
100
+
79
101
> https://github.com/azu/textlint-rule-sentence-length
80
102
81
- 長過ぎる文は読みにくさに繋がるため、適切な単位で文を区切ってください。
82
- 厳しめの設定にしたい場合は` 90 ` 文字を推奨しています。
103
+ 長過ぎる文は読みにくさに繋がるため、適切な単位で文を区切ってください。 厳しめの設定にしたい場合は` 90 ` 文字を推奨しています。
83
104
84
105
"sentence-length": {
85
106
max: 100
@@ -91,6 +112,7 @@ textlint --preset ja-technical-writing README.md
91
112
- バージョン2.0.0以下: 90文字以下
92
113
93
114
### カンマは1文中に3つまで
115
+
94
116
> https://github.com/azu/textlint-rule-max-comma
95
117
96
118
カンマ(,)の多用は、文が長くなっている可能性があります。
@@ -100,6 +122,7 @@ textlint --preset ja-technical-writing README.md
100
122
},
101
123
102
124
### 読点は1文中に3つまで
125
+
103
126
> https://github.com/azu/textlint-rule-max-ten
104
127
105
128
読点(、)の多用は、文が長くなっている可能性があります。
@@ -109,16 +132,17 @@ textlint --preset ja-technical-writing README.md
109
132
},
110
133
111
134
### 連続できる最大の漢字長は6文字まで
135
+
112
136
> https://github.com/azu/textlint-rule-max-kanji-continuous-len
113
137
114
- 漢字同士が連続していると読みにくさにつながります。
115
- 固有名詞は ` allow ` オプションに記述して回避します。
138
+ 漢字同士が連続していると読みにくさにつながります。 固有名詞は ` allow ` オプションに記述して回避します。
116
139
117
140
"max-kanji-continuous-len": {
118
141
max: 6
119
142
},
120
143
121
144
### 漢数字と算用数字を使い分けます
145
+
122
146
> https://github.com/azu/textlint-rule-preset-JTF-style
123
147
124
148
数量を表現し、数を数えられるものは算用数字を使用します。任意の数に置き換えても通用する語句がこれに該当します。
@@ -128,6 +152,7 @@ textlint --preset ja-technical-writing README.md
128
152
"arabic-kanji-numbers": true,
129
153
130
154
### 「ですます調」、「である調」を統一します
155
+
131
156
> https://github.com/azu/textlint-rule-no-mix-dearu-desumasu
132
157
133
158
- 見出しは自動
@@ -143,8 +168,8 @@ textlint --preset ja-technical-writing README.md
143
168
"strict": true
144
169
},
145
170
146
-
147
171
### 文末の句点記号として「。」を使います
172
+
148
173
> https://github.com/textlint-ja/textlint-rule-ja-no-mixed-period
149
174
150
175
文末には「。」を使い文を区切ります。
@@ -156,17 +181,19 @@ textlint --preset ja-technical-writing README.md
156
181
},
157
182
158
183
### 二重否定は使用しない
184
+
159
185
> https://github.com/azu/textlint-rule-no-double-negative-ja
160
186
161
187
"no-double-negative-ja": true,
162
188
163
189
### ら抜き言葉を使用しない
190
+
164
191
> https://github.com/azu/textlint-rule-no-dropping-the-ra
165
192
166
193
"no-dropping-the-ra": true,
167
194
168
-
169
195
### 逆接の接続助詞「が」を連続して使用しない
196
+
170
197
> https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
171
198
172
199
逆接の接続助詞「が」は、特に否定の意味ではなくても安易に使われてしまいがちです。
@@ -176,54 +203,69 @@ textlint --preset ja-technical-writing README.md
176
203
"no-doubled-conjunctive-particle-ga": true,
177
204
178
205
### 同じ接続詞を連続して使用しない
206
+
179
207
> https://github.com/takahashim/textlint-rule-no-doubled-conjunction
180
208
181
209
"no-doubled-conjunction": true,
182
210
183
211
### 同じ助詞を連続して使用しない
212
+
184
213
> https://github.com/azu/textlint-rule-no-doubled-joshi
185
214
186
215
"no-doubled-joshi": {
187
216
"min_interval": 1
188
217
},
189
218
190
219
### UTF8-MAC 濁点を使用しない
220
+
191
221
> https://github.com/azu/textlint-rule-no-nfd
192
222
193
- 文章中にUTF8-MAC 濁点は不要です。
194
- ファイルからコピー&ペーストした文字である場合があります。
223
+ 文章中にUTF8-MAC 濁点は不要です。 ファイルからコピー&ペーストした文字である場合があります。
195
224
196
225
"no-nfd": true,
197
226
198
- ### 不必要な制御文字を使用しない
227
+ ### 不必要な制御文字を使用しない
228
+
199
229
> https://github.com/textlint-rule/textlint-rule-no-invalid-control-character
200
230
201
- 改行(` \n ` )やタブ(` \t ` )以外の一般的な文章にはでてこない不自然な制御文字が入るのを防止します 。
231
+ 改行(` \n ` )やタブ(` \t ` )以外の制御文字が文章に入るのを防止します 。
202
232
203
233
"no-invalid-control-character": true,
204
234
235
+ ### 不必要なゼロ幅スペースを使用しない
236
+
237
+ > https://github.com/textlint-rule/textlint-rule-no-zero-width-spaces
238
+
239
+ ゼロ幅スペース(` \u200b ` )が文章に入るのを防止します。
240
+
241
+ "no-zero-width-spaces": true,
242
+
205
243
### 感嘆符!!、感嘆符??を使用しない
244
+
206
245
> https://github.com/azu/textlint-rule-no-exclamation-question-mark
207
246
208
247
特定の感嘆符または感嘆符を使用する場合は、オプションで許可して利用してください。
209
248
210
249
"no-exclamation-question-mark": true,
211
250
212
251
### 半角カナを使用しない
252
+
213
253
> https://github.com/azu/textlint-rule-no-hankaku-kana
214
254
215
255
全角カタカナを使用してください。
216
256
217
257
"no-hankaku-kana": true,
218
258
219
259
### 弱い日本語表現の利用を使用しない
260
+
220
261
> https://github.com/textlint-ja/textlint-rule-ja-no-weak-phrase
221
262
222
263
` 〜かもしれない ` 等の弱い表現を使用しない。
223
264
224
265
"ja-no-weak-phrase": true,
225
266
226
267
### 同一の単語を間違えて連続しているのをチェックする
268
+
227
269
> https://github.com/textlint-ja/textlint-rule-ja-no-successive-word
228
270
229
271
同一の単語(形態素解析したtoken)が連続している場合は誤字の可能性があります。
@@ -233,13 +275,15 @@ textlint --preset ja-technical-writing README.md
233
275
"ja-no-successive-word": true,
234
276
235
277
### よくある日本語の誤用をチェックする
278
+
236
279
> https://github.com/textlint-ja/textlint-rule-ja-no-abusage
237
280
238
281
日本語や技術表現における漢字の誤用などをチェックするルールです。
239
282
240
283
"ja-no-abusage": true
241
284
242
285
### 冗長な表現をチェックする
286
+
243
287
> https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression
244
288
245
289
冗長な表現とは、その文から省いても意味が通じるような表現を示しています。
@@ -248,20 +292,21 @@ textlint --preset ja-technical-writing README.md
248
292
"ja-no-redundant-expression": true
249
293
250
294
### 入力ミスで発生する不自然なアルファベットをチェックする
295
+
251
296
> https://github.com/textlint-ja/textlint-rule-ja-unnatural-alphabet
252
297
253
298
` リイr−ス ` などIMEの入力ミスが日本語中に混じった不自然なアルファベットをチェックします。
254
299
255
300
"ja-unnatural-alphabet": true
256
301
257
302
### 対になっていない括弧をチェックする
303
+
258
304
> https://github.com/textlint-rule/textlint-rule-no-unmatched-pair
259
305
260
306
1文中で` ( ` に対応する` ) ` がない場合などの括弧の対応関係をチェックします。
261
307
262
308
"no-unmatched-pair": true
263
309
264
-
265
310
## Changelog
266
311
267
312
See [ Releases page] ( https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases ) .
@@ -322,7 +367,8 @@ Install devDependencies and Run `npm test`:
322
367
323
368
Pull requests and stars are always welcome.
324
369
325
- For bugs and feature requests, [ please create an issue] ( https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/issues ) .
370
+ For bugs and feature
371
+ requests, [ please create an issue] ( https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/issues ) .
326
372
327
373
1 . Fork it
328
374
2 . Create your feature branch: ` git checkout -b my-new-feature `
0 commit comments