lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js in gollum-3.1.2 vs lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js in gollum-3.1.3
- old
+ new
@@ -38,12 +38,15 @@
var Worker = exports.Worker = function(sender) {
Mirror.call(this, sender);
this.setTimeout(400);
this.ruleset = null;
- this.setDisabledRules("ids");
- this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none");
+ this.setDisabledRules("ids|order-alphabetical");
+ this.setInfoRules(
+ "adjoining-classes|qualified-headings|zero-units|gradients|" +
+ "import|outline-none|vendor-prefix"
+ );
};
oop.inherits(Worker, Mirror);
(function() {
@@ -66,26 +69,29 @@
all[x.id] = true;
});
ruleNames.forEach(function(x) {
delete all[x];
});
- console.log(all)
+
this.ruleset = all;
}
this.doc.getValue() && this.deferredUpdate.schedule(100);
};
this.onUpdate = function() {
var value = this.doc.getValue();
+ if (!value)
+ return this.sender.emit("annotate", []);
var infoRules = this.infoRules;
var result = CSSLint.verify(value, this.ruleset);
- this.sender.emit("csslint", result.messages.map(function(msg) {
+ this.sender.emit("annotate", result.messages.map(function(msg) {
return {
row: msg.line - 1,
column: msg.col - 1,
text: msg.message,
- type: infoRules[msg.rule.id] ? "info" : msg.type
+ type: infoRules[msg.rule.id] ? "info" : msg.type,
+ rule: msg.rule.name
}
}));
};
}).call(Worker.prototype);