Fix: logic to get correct linter
This commit is contained in:
parent
ed3ec6215c
commit
fe4cc7b59f
|
@ -175,10 +175,12 @@ var stylelint = (() => { // eslint-disable-line no-var
|
|||
let preparing;
|
||||
|
||||
linter.register((text, options, cm) => {
|
||||
if (prefs.get('editor.linter') !== 'stylelint' && cm.getOption('mode') !== 'stylus') {
|
||||
if (
|
||||
!prefs.get('editor.linter') ||
|
||||
cm.getOption('mode') === 'css' && prefs.get('editor.linter') !== 'stylelint'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
debugger;
|
||||
return prepareConfig()
|
||||
.then(() => editorWorker.stylelint(text, config))
|
||||
.then(({results}) => {
|
||||
|
|
|
@ -109,7 +109,7 @@ function createSourceEditor(style) {
|
|||
|
||||
function getCurrentLinter() {
|
||||
const name = prefs.get('editor.linter');
|
||||
if (cm.getOption('mode') === 'stylus' && name === 'csslint') {
|
||||
if (cm.getOption('mode') !== 'css' && name === 'csslint') {
|
||||
return 'stylelint';
|
||||
}
|
||||
return name;
|
||||
|
|
Loading…
Reference in New Issue
Block a user