@@ -24,7 +24,7 @@ export interface Options {
24
24
}
25
25
26
26
const rule : TextlintRuleModule < Options > = ( context , options = { } ) => {
27
- const { Syntax, report, locator, RuleError } = context ;
27
+ const { Syntax, report, locator } = context ;
28
28
const allows = options . allows ?? [ ] ;
29
29
const disableRedundancyGuidance = options . disableRedundancyGuidance ?? false ;
30
30
const disableVoiceGuidance = options . disableVoiceGuidance ?? false ;
@@ -233,12 +233,10 @@ const rule: TextlintRuleModule<Options> = (context, options = {}) => {
233
233
documentQualityMetrics [ category as keyof typeof documentQualityMetrics ] ++ ;
234
234
hasDocumentIssues = true ;
235
235
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
+ } ) ;
242
240
}
243
241
}
244
242
}
@@ -268,12 +266,9 @@ const rule: TextlintRuleModule<Options> = (context, options = {}) => {
268
266
269
267
const detailsText = categoryDetails . length > 0 ? ` [内訳: ${ categoryDetails . join ( ", " ) } ]` : "" ;
270
268
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
+ } ) ;
277
272
}
278
273
}
279
274
} ;
0 commit comments