Posts

Showing posts from January 10, 2019

Codemirror show CSSLint errors inline (.addLineWidget)

Image
0 I have been using these references: http://codemirror.net/demo/lint.html http://codemirror.net/demo/widget.html http://codemirror.net/doc/manual.html#addLineWidget I been trying to get CSSLint to show inline instead of JSHint using .addLineWidget. Codemirror provides a demo of what I'm trying to do using JSHint here however I'm having a hard time transitioning from JSHint to CSSLint. var widgets = ; var waiting; function updateHints() { editor.operation(function(){ for (var i = 0; i < widgets.length; ++i) editor.removeLineWidget(widgets[i]); widgets.length = 0; JSHINT(editor.getValue()); for (var i = 0; i < JSHINT.errors.length; ++i) { var err = JSHINT.errors[i]; if (!err) continue; var msg = document.createElement("div&q