UNPKG

textlint-rule-editorconfig

Version:
13 lines (12 loc) 352 B
module.exports = (args, report, textWarn) => { const detail = { index: report.index }; if (typeof report.fix === 'string') { detail.fix = args.context.fixer.replaceTextRange( [detail.index, detail.index + report.length], report.fix ); } args.context.report(args.node, new args.context.RuleError(textWarn, detail)); };