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:
parent
b7fb1f14e1
commit
b8c918e502
10
codemirror/addon/lint/css-lint.js
vendored
10
codemirror/addon/lint/css-lint.js
vendored
|
@ -18,6 +18,16 @@
|
||||||
CodeMirror.registerHelper("lint", "css", function(text) {
|
CodeMirror.registerHelper("lint", "css", function(text) {
|
||||||
var found = [];
|
var found = [];
|
||||||
if (!window.CSSLint) return 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;
|
var results = CSSLint.verify(text), messages = results.messages, message = null;
|
||||||
for ( var i = 0; i < messages.length; i++) {
|
for ( var i = 0; i < messages.length; i++) {
|
||||||
message = messages[i];
|
message = messages[i];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user