@@ -24,7 +24,7 @@ export interface Options {
2424}
2525
2626const 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