File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,7 @@ AIと人間の協力により、お互いの強みを活かした自然で読み
90
90
91
91
テストはUnit Testのみで確認を行う
92
92
93
- - ` textlint-tester ` を使用して、ルールのテストを行う
94
- - 実際にファイルを作成して、` textlint ` コマンドを使ったテストは行わない
93
+ - ` textlint-tester ` を使用して、ルールのテストを実装する
95
94
96
95
テストの実行方法
97
96
@@ -103,4 +102,17 @@ npm run test
103
102
104
103
``` bash
105
104
npm run test -- --grep no-repetitive-expressions
105
+ ```
106
+
107
+ 実際に ` textlint ` コマンドを使ってルールを適用する場合は、以下のように実行します。
108
+
109
+ ``` bash
110
+ mkdir tmp/
111
+ npm install --save-dev . textlint technological-book-corpus-ja --prefix tmp/
112
+ cd tmp
113
+ # --rule でルール名を指定する
114
+ ./node_modules/.bin/technological-book-corpus-ja | xargs ./node_modules/.bin/textlint --preset ai-writing -f pretty-error --no-textlintrc
115
+ # 特定のファイルを作成してテストする
116
+ echo " これは機械的な表現です。" > test.md
117
+ ./node_modules/.bin/textlint --preset ai-writing test.md
106
118
```
Original file line number Diff line number Diff line change 1
1
# ## Generated by gibo (https://github.com/simonwhitaker/gibo)
2
2
# ## https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Node.gitignore
3
-
3
+ tmp /
4
4
# Logs
5
5
logs
6
6
* .log
You can’t perform that action at this time.
0 commit comments