Skip to content

Commit be9c323

Browse files
committed
refactor(rule): use { index } instead of location
1 parent 696ea73 commit be9c323

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/textlint-rule-rousseau.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ export default function textlintRousseau(context, options = defaultOptions) {
6969
if (!isShowType(type)) {
7070
return;
7171
}
72-
const paddingPosition = source.originalPositionFromIndex(result.index);
72+
const index = source.originalIndexFromIndex(result.index);
7373
const suggestions = createSuggest(result.replacements);
7474
const ruleError = new RuleError(`${level}(${type}) ${result.message}${suggestions}`, {
75-
line: paddingPosition.line - 1,
76-
column: paddingPosition.column
75+
index
7776
});
7877
report(node, ruleError);
7978
};

0 commit comments

Comments
 (0)