From 22824d9ad5e52d15f25863aa53aaac4b3c5e4e11 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 30 Aug 2017 00:05:07 +0300 Subject: [PATCH] deepCopy linterConfig to avoid rule normalization by stylelint --- edit/lint-codemirror-helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/lint-codemirror-helper.js b/edit/lint-codemirror-helper.js index d7ed510b..588a202c 100644 --- a/edit/lint-codemirror-helper.js +++ b/edit/lint-codemirror-helper.js @@ -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 [];