Fix: reference error
This commit is contained in:
parent
279c7d05a7
commit
31464bb499
|
@ -2,7 +2,7 @@
|
|||
'use strict';
|
||||
|
||||
CodeMirror.registerHelper('lint', 'csslint', code =>
|
||||
CSSLint.verify(code, deepCopy(linterConfig.getCurrent('csslint')))
|
||||
window.CSSLint && CSSLint.verify(code, deepCopy(linterConfig.getCurrent('csslint')))
|
||||
.messages.map(message => ({
|
||||
from: CodeMirror.Pos(message.line - 1, message.col - 1),
|
||||
to: CodeMirror.Pos(message.line - 1, message.col),
|
||||
|
@ -13,7 +13,7 @@ CodeMirror.registerHelper('lint', 'csslint', code =>
|
|||
);
|
||||
|
||||
CodeMirror.registerHelper('lint', 'stylelint', code =>
|
||||
stylelint.lint({
|
||||
window.stylelint && stylelint.lint({
|
||||
code,
|
||||
config: deepCopy(linterConfig.getCurrent('stylelint')),
|
||||
}).then(({results}) => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* global loadScript require CSSLint stylelint */
|
||||
'use strict';
|
||||
|
||||
loadLinterAssets();
|
||||
onDOMready().then(loadLinterAssets);
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var linterConfig = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user