Skip to content

Commit

Permalink
refactor(rule): use { index } instead of location
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Mar 19, 2016
1 parent 696ea73 commit be9c323
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/textlint-rule-rousseau.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ export default function textlintRousseau(context, options = defaultOptions) {
if (!isShowType(type)) {
return;
}
const paddingPosition = source.originalPositionFromIndex(result.index);
const index = source.originalIndexFromIndex(result.index);
const suggestions = createSuggest(result.replacements);
const ruleError = new RuleError(`${level}(${type}) ${result.message}${suggestions}`, {
line: paddingPosition.line - 1,
column: paddingPosition.column
index
});
report(node, ruleError);
};
Expand Down

0 comments on commit be9c323

Please sign in to comment.