Mostly mute CSSLint, re-enable gutter marks, hide squiggles

Only these rules are enabled:
* Parsing Errors
* Disallow empty rules
* Require use of known properties
* Require properties appropriate for display
This commit is contained in:
tophf 2015-03-11 23:28:54 +03:00
parent b7fb1f14e1
commit b8c918e502
2 changed files with 12 additions and 2 deletions

View File

@ -18,6 +18,16 @@
CodeMirror.registerHelper("lint", "css", function(text) {
var found = [];
if (!window.CSSLint) return found;
var rules = CSSLint.getRules();
var allowedRules = ["display-property-grouping", "empty-rules", "errors", "known-properties"];
CSSLint.clearRules();
rules.forEach(function(rule) {
if (allowedRules.indexOf(rule.id) >= 0) {
CSSLint.addRule(rule);
}
});
var results = CSSLint.verify(text), messages = results.messages, message = null;
for ( var i = 0; i < messages.length; i++) {
message = messages[i];

View File

@ -143,8 +143,8 @@
.applies-to img {
vertical-align: bottom;
}
.CodeMirror-lint-marker-warning {
display: none;
.CodeMirror-lint-mark-warning {
background: none;
}
@media(max-width:737px) {