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と人間の協力により、お互いの強みを活かした自然で読み
9090
9191テストはUnit Testのみで確認を行う
9292
93- - ` textlint-tester ` を使用して、ルールのテストを行う
94- - 実際にファイルを作成して、` textlint ` コマンドを使ったテストは行わない
93+ - ` textlint-tester ` を使用して、ルールのテストを実装する
9594
9695テストの実行方法
9796
@@ -103,4 +102,17 @@ npm run test
103102
104103``` bash
105104npm 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
106118```
Original file line number Diff line number Diff line change 11# ## Generated by gibo (https://github.com/simonwhitaker/gibo)
22# ## https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Node.gitignore
3-
3+ tmp /
44# Logs
55logs
66* .log
You can’t perform that action at this time.
0 commit comments