deepCopy linterConfig to avoid rule normalization by stylelint
This commit is contained in:
parent
79c6f3e578
commit
22824d9ad5
|
@ -2,7 +2,7 @@
|
|||
'use strict';
|
||||
|
||||
CodeMirror.registerHelper('lint', 'csslint', code =>
|
||||
CSSLint.verify(code, linterConfig.getCurrent('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),
|
||||
|
@ -14,7 +14,7 @@ CodeMirror.registerHelper('lint', 'csslint', code =>
|
|||
CodeMirror.registerHelper('lint', 'stylelint', code =>
|
||||
stylelint.lint({
|
||||
code,
|
||||
config: linterConfig.getCurrent('stylelint'),
|
||||
config: deepCopy(linterConfig.getCurrent('stylelint')),
|
||||
}).then(({results}) => {
|
||||
if (!results[0]) {
|
||||
return [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user