Skip to content

Commit e019b99

Browse files
authored
feat(rule): ルールの更新 (#16)
* feat(rule): update rules BREAKING CHANGE: remove textlint-rule-spellcheck-tech-word - Add textlint-rule-no-dropping-the-ra * chore(example): remove --production * chore(example): update textlint * docs(readme): Update indent * Update README
1 parent 68b86d3 commit e019b99

File tree

4 files changed

+82
-56
lines changed

4 files changed

+82
-56
lines changed

README.md

Lines changed: 70 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
- 二重助詞の検出
3030
- https://github.com/azu/textlint-rule-sentence-length
3131
- 一文の最大の長さ
32-
- https://github.com/azu/textlint-rule-spellcheck-tech-word
33-
- JavaScript周りの単語スペルチェック
32+
- https://github.com/azu/textlint-rule-no-dropping-the-ra
33+
- ら抜き言葉を使用し
3434
- https://github.com/textlint-ja/textlint-rule-no-mix-dearu-desumasu
3535
- 文の敬体(ですます調)、常体(である調)の混合をチェック
3636
- https://github.com/azu/textlint-rule-no-nfd
@@ -41,62 +41,89 @@
4141

4242
Via `.textlintrc`
4343

44-
```js
44+
```json5
4545
{
46-
"rules" : {
46+
"rules": {
4747
"preset-japanese": true
4848
}
4949
}
5050
```
5151

5252
Options
5353

54-
```js
54+
```json5
5555
{
56-
"rules" : {
56+
"rules": {
5757
// それぞれのルールのデフォルト値
5858
"preset-japanese": {
59-
// https://github.com/textlint-ja/textlint-rule-max-ten
60-
// 一文で使える"、"の数
61-
"max-ten": {
62-
"max": 3
63-
},
64-
// https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
65-
// 逆接の接続助詞「が」が、同一文中に複数回出現していないかどうか
66-
// e.g.) 今日は早朝から出発したが、定刻には間に合わなかったが、無事会場に到着した。
67-
"no-doubled-conjunctive-particle-ga": true,
68-
// https://github.com/takahashim/textlint-rule-no-doubled-conjunction
69-
// 同じ接続詞が連続して出現していないかどうか
70-
"no-doubled-conjunction": true,
71-
// https://github.com/textlint-ja/textlint-rule-no-double-negative-ja
72-
// 二重否定の検出
73-
"no-double-negative-ja": true,
74-
// https://github.com/textlint-ja/textlint-rule-no-doubled-joshi
75-
// 二重助詞の検出
76-
// 連続して同じ助詞が出た場合のみを検出
77-
"no-doubled-joshi": {
78-
"min_interval": 1
79-
},
80-
// https://github.com/azu/textlint-rule-sentence-length
81-
// 一文の最大の長さ
82-
"sentence-length": {
83-
"max": 100
84-
},
85-
// https://github.com/azu/textlint-rule-spellcheck-tech-word
86-
// JavaScript周りの単語スペルチェック
87-
"spellcheck-tech-word": true,
88-
// https://github.com/textlint-ja/textlint-rule-no-mix-dearu-desumasu
89-
// 文の敬体(ですます調)、常体(である調)のチェック
90-
"no-mix-dearu-desumasu": true,
91-
// https://github.com/azu/textlint-rule-no-nfd
92-
// ホ゜ケット エンシ゛ン
93-
// のような、Mac OS XでPDFやFinderからのコピペで発生する濁点のチェック
94-
"no-nfd": true
95-
}
59+
// https://github.com/textlint-ja/textlint-rule-max-ten
60+
// 一文で使える"、"の数
61+
"max-ten": {
62+
"max": 3
63+
},
64+
// https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
65+
// 逆接の接続助詞「が」が、同一文中に複数回出現していないかどうか
66+
// e.g.) 今日は早朝から出発したが、定刻には間に合わなかったが、無事会場に到着した。
67+
"no-doubled-conjunctive-particle-ga": true,
68+
// https://github.com/takahashim/textlint-rule-no-doubled-conjunction
69+
// 同じ接続詞が連続して出現していないかどうか
70+
"no-doubled-conjunction": true,
71+
// https://github.com/textlint-ja/textlint-rule-no-double-negative-ja
72+
// 二重否定の検出
73+
"no-double-negative-ja": true,
74+
// https://github.com/textlint-ja/textlint-rule-no-doubled-joshi
75+
// 二重助詞の検出
76+
// 連続して同じ助詞が出た場合のみを検出
77+
"no-doubled-joshi": {
78+
"min_interval": 1
79+
},
80+
// https://github.com/azu/textlint-rule-sentence-length
81+
// 一文の最大の長さ
82+
"sentence-length": {
83+
"max": 100
84+
},
85+
// https://github.com/textlint-ja/textlint-rule-no-dropping-the-ra
86+
// ら抜き言葉を使用しない
87+
"no-dropping-the-ra": true,
88+
// https://github.com/azu/textlint-rule-no-mix-dearu-desumasu
89+
// 文の敬体(ですます調)、常体(である調)のチェック
90+
"no-mix-dearu-desumasu": true,
91+
// https://github.com/azu/textlint-rule-no-nfd
92+
// ホ゜ケット エンシ゛ン
93+
// のような、Mac OS XでPDFやFinderからのコピペで発生する濁点のチェック
94+
"no-nfd": true
95+
}
9696
}
9797
}
9898
```
9999

100+
## Semantic Versioning Policy
101+
102+
次のルールでバージョンが更新されます。
103+
104+
- Patch リリース
105+
- 各ルールのバグ修正 (警告を減らす方向への修正)
106+
- ドキュメントの改善
107+
- 内部的な変更 (リファクタリングやテストの改善など)
108+
- リリース失敗時の再リリース
109+
- Minor リリース
110+
- 各ルールのバグ修正 (警告を増やす方向への修正)
111+
- 新オプションの追加
112+
- 既存ルールの非推奨化
113+
- Major リリース
114+
- プリセットへのルールの追加
115+
- プリセットからルールの削除
116+
- 既存のオプション値の変更
117+
118+
更新内容は[Releases page](https://github.com/textlint-ja/textlint-rule-preset-japanese/releases)を参照してください。
119+
120+
## Community
121+
122+
質問は以下のGitterでお願いします。
123+
124+
[![Gitter](https://badges.gitter.im/textlint-ja/textlint-ja.svg)](https://gitter.im/textlint-ja/textlint-ja)
125+
126+
100127

101128
## Contributing
102129

example/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
"name": "example",
33
"private": true,
44
"scripts": {
5-
"pretest": "npm rm textlint-rule-preset-japanese && npm i --production",
65
"test": "textlint README.md"
76
},
87
"author": "azu",
98
"license": "MIT",
109
"dependencies": {
11-
"textlint": "^6.5.1",
10+
"textlint": "^8.2.1",
1211
"textlint-rule-preset-japanese": "file:.."
1312
}
1413
}

lib/textlint-rule-preset-japanese.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
"no-double-negative-ja": require("textlint-rule-no-double-negative-ja"),
99
"no-doubled-joshi": require("textlint-rule-no-doubled-joshi"),
1010
"sentence-length": require("textlint-rule-sentence-length"),
11-
"spellcheck-tech-word": require("textlint-rule-spellcheck-tech-word"),
11+
"no-dropping-the-ra": require("textlint-rule-no-dropping-the-ra"),
1212
"no-mix-dearu-desumasu": require("textlint-rule-no-mix-dearu-desumasu"),
1313
"no-nfd": require("textlint-rule-no-nfd")
1414
},
1515
"rulesConfig": {
16-
// https://github.com/azu/textlint-rule-max-ten
16+
// https://github.com/textlint-ja/textlint-rule-max-ten
1717
// 一文で使える"、"の数
1818
"max-ten": {
1919
"max": 3
@@ -25,10 +25,10 @@ module.exports = {
2525
// https://github.com/takahashim/textlint-rule-no-doubled-conjunction
2626
// 同じ接続詞が連続して出現していないかどうか
2727
"no-doubled-conjunction": true,
28-
// https://github.com/azu/textlint-rule-no-double-negative-ja
28+
// https://github.com/textlint-ja/textlint-rule-no-double-negative-ja
2929
// 二重否定の検出
3030
"no-double-negative-ja": true,
31-
// https://github.com/azu/textlint-rule-no-doubled-joshi
31+
// https://github.com/textlint-ja/textlint-rule-no-doubled-joshi
3232
// 二重助詞の検出
3333
// 連続して同じ助詞が出た場合のみを検出
3434
"no-doubled-joshi": {
@@ -39,9 +39,9 @@ module.exports = {
3939
"sentence-length": {
4040
"max": 100
4141
},
42-
// https://github.com/azu/textlint-rule-spellcheck-tech-word
43-
// JavaScript周りの単語スペルチェック
44-
"spellcheck-tech-word": true,
42+
// https://github.com/textlint-ja/textlint-rule-no-dropping-the-ra
43+
// ら抜き言葉を使用しない
44+
"no-dropping-the-ra": true,
4545
// https://github.com/azu/textlint-rule-no-mix-dearu-desumasu
4646
// 文の敬体(ですます調)、常体(である調)のチェック
4747
"no-mix-dearu-desumasu": true,

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"test": "test"
2222
},
2323
"scripts": {
24-
"test": "cd example && npm t"
24+
"test": "cd example && npm it"
2525
},
2626
"keywords": [
2727
"preset",
@@ -35,10 +35,10 @@
3535
"textlint-rule-no-doubled-conjunction": "^1.0.2",
3636
"textlint-rule-no-doubled-conjunctive-particle-ga": "^1.0.2",
3737
"textlint-rule-no-doubled-joshi": "^3.0.0",
38+
"textlint-rule-no-dropping-the-ra": "^1.1.2",
3839
"textlint-rule-no-mix-dearu-desumasu": "^3.0.0",
3940
"textlint-rule-no-nfd": "^1.0.1",
40-
"textlint-rule-prh": "^3.0.1",
41-
"textlint-rule-sentence-length": "^1.0.4",
42-
"textlint-rule-spellcheck-tech-word": "^5.0.0"
41+
"textlint-rule-prh": "^4.0.1",
42+
"textlint-rule-sentence-length": "^1.0.4"
4343
}
4444
}

0 commit comments

Comments
 (0)