Skip to content

Commit 25cc274

Browse files
committed
fix: パッケージ名を@textlint-ja/textlint-rule-preset-ai-writingに修正
close #7
1 parent 169ea73 commit 25cc274

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# textlint-rule-preset-ai-writing
1+
# @textlint-ja/textlint-rule-preset-ai-writing
22

33
AIが生成した文章によく見られる記述パターンを検出します。
44
より自然な日本語表現を促すtextlintルールプリセットです。
@@ -183,9 +183,9 @@ AIを利用しやすくするプラットフォームです。
183183

184184
## Install
185185

186-
Install with [npm](https://www.npmjs.com/package/textlint-rule-preset-ai-writing):
186+
Install with [npm](https://www.npmjs.com/package/@textlint-ja/textlint-rule-preset-ai-writing):
187187

188-
npm install textlint-rule-preset-ai-writing
188+
npm install @textlint-ja/textlint-rule-preset-ai-writing
189189

190190
## Requirements
191191

lint-README.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mkdir -p tmp/
55
npm install --save-dev . textlint technological-book-corpus-ja --prefix tmp/
66
cd tmp
77
# README.mdのチェックを行う
8-
./node_modules/.bin/textlint --preset ai-writing ../README.md
8+
./node_modules/.bin/textlint --preset @textlint-ja/ai-writing ../README.md
99

1010
# 元のディレクトリに戻る
1111
trap 'cd -' EXIT

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "textlint-rule-preset-ai-writing",
2+
"name": "@textlint-ja/textlint-rule-preset-ai-writing",
33
"version": "1.1.0",
44
"description": "textlintプリセット:AIっぽい記述パターンを検出し、より自然な日本語表現を促すルール集",
55
"keywords": [

src/rules/ai-tech-writing-guideline.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface Options {
2424
}
2525

2626
const rule: TextlintRuleModule<Options> = (context, options = {}) => {
27-
const { Syntax, report, locator, RuleError } = context;
27+
const { Syntax, report, locator } = context;
2828
const allows = options.allows ?? [];
2929
const disableRedundancyGuidance = options.disableRedundancyGuidance ?? false;
3030
const disableVoiceGuidance = options.disableVoiceGuidance ?? false;
@@ -233,12 +233,10 @@ const rule: TextlintRuleModule<Options> = (context, options = {}) => {
233233
documentQualityMetrics[category as keyof typeof documentQualityMetrics]++;
234234
hasDocumentIssues = true;
235235

236-
report(
237-
node,
238-
new RuleError(message, {
239-
padding: locator.range(originalRange)
240-
})
241-
);
236+
report(node, {
237+
message: message,
238+
padding: locator.range(originalRange)
239+
});
242240
}
243241
}
244242
}
@@ -268,12 +266,9 @@ const rule: TextlintRuleModule<Options> = (context, options = {}) => {
268266

269267
const detailsText = categoryDetails.length > 0 ? ` [内訳: ${categoryDetails.join(", ")}]` : "";
270268

271-
report(
272-
node,
273-
new RuleError(
274-
`【テクニカルライティング品質分析】この文書で${totalIssues}件の改善提案が見つかりました${detailsText}。効果的なテクニカルライティングの7つのC(Clear, Concise, Correct, Coherent, Concrete, Complete, Courteous)の原則に基づいて見直しを検討してください。詳細なガイドライン: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md`
275-
)
276-
);
269+
report(node, {
270+
message: `【テクニカルライティング品質分析】この文書で${totalIssues}件の改善提案が見つかりました${detailsText}。効果的なテクニカルライティングの7つのC(Clear, Concise, Correct, Coherent, Concrete, Complete, Courteous)の原則に基づいて見直しを検討してください。詳細なガイドライン: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md`
271+
});
277272
}
278273
}
279274
};

0 commit comments

Comments
 (0)