Skip to content

Commit

Permalink
Refactor importantRule position reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilsson committed Jul 21, 2017
1 parent cbaa535 commit bd6c814
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/linters/important_rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ module.exports = {

lint: function importantRuleLinter (config, node) {
if (node.important) {
const position = node.positionBy({
word: node.raws.important || '!important'
});

return [{
column: node.source.start.column + node.prop.length + node.raws.between.length + node.value.length + 1,
line: node.source.start.line,
column: position.column,
line: position.line,
message: this.message
}];
}
Expand Down

0 comments on commit bd6c814

Please sign in to comment.