Skip to content

Commit e92224e

Browse files
committed
docs: テスト実行方法を更新し、textlintコマンドの使用例を追加
- `textlint-tester`を使用したルールテストの実装方法を明確化 - 実際の`textlint`コマンドを使ったルール適用手順を追加
1 parent 74c0469 commit e92224e

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/copilot-instructions.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff 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
105104
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
106118
```

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Generated by gibo (https://github.com/simonwhitaker/gibo)
22
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Node.gitignore
3-
3+
tmp/
44
# Logs
55
logs
66
*.log

0 commit comments

Comments
 (0)