PluginProbe ʕ •ᴥ•ʔ
SiteOrigin CSS / 1.0.6
SiteOrigin CSS v1.0.6
1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0
so-css / lib / codemirror / addon / lint / css-lint.js
so-css / lib / codemirror / addon / lint Last commit date
coffeescript-lint.js 11 years ago coffeescript-lint.min.js 10 years ago css-lint.js 10 years ago css-lint.min.js 10 years ago html-lint.js 10 years ago html-lint.min.js 10 years ago javascript-lint.js 11 years ago javascript-lint.min.js 10 years ago json-lint.js 11 years ago json-lint.min.js 10 years ago lint.css 11 years ago lint.js 10 years ago lint.min.js 10 years ago yaml-lint.js 11 years ago yaml-lint.min.js 10 years ago
css-lint.js
44 lines
1 // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 // Distributed under an MIT license: http://codemirror.net/LICENSE
3
4 // Depends on csslint.js from https://github.com/stubbornella/csslint
5
6 // declare global: CSSLint
7
8 (function(mod) {
9 if (typeof exports == "object" && typeof module == "object") // CommonJS
10 mod(require("../../lib/codemirror"));
11 else if (typeof define == "function" && define.amd) // AMD
12 define(["../../lib/codemirror"], mod);
13 else // Plain browser env
14 mod(CodeMirror);
15 })(function(CodeMirror) {
16 "use strict";
17
18 CodeMirror.registerHelper("lint", "css", function(text) {
19 var found = [];
20 if (!window.CSSLint) return found;
21 // This has been modified to only display certain errors
22 var results = CSSLint.verify(text, {
23 "box-model": 1,
24 "display-property-grouping": 1,
25 "duplicate-properties": 1,
26 "empty-rules": 1,
27 "known-properties": 1
28 }), messages = results.messages, message = null;
29
30 for ( var i = 0; i < messages.length; i++) {
31 message = messages[i];
32 var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
33 found.push({
34 from: CodeMirror.Pos(startLine, startCol),
35 to: CodeMirror.Pos(endLine, endCol),
36 message: message.message,
37 severity : message.type
38 });
39 }
40 return found;
41 });
42
43 });
44