diff --git a/edit/codemirror-default.js b/edit/codemirror-default.js index 72d50720..4420c3c1 100644 --- a/edit/codemirror-default.js +++ b/edit/codemirror-default.js @@ -102,6 +102,7 @@ const m = this.doc.mode; if (force || (m.helperType ? m.helperType !== pp : m.name !== name)) { this.setOption('mode', name); + this.doc.mode.lineComment = ''; // stylelint chokes on line comments a lot } }, /** Superfast GC-friendly check that runs until the first non-space line */ diff --git a/edit/editor-worker.js b/edit/editor-worker.js index d78be935..aee5b22b 100644 --- a/edit/editor-worker.js +++ b/edit/editor-worker.js @@ -159,10 +159,8 @@ } const {rule} = m; const msg = m.text.replace(/^Unexpected\s+/, '').replace(` (${rule})`, ''); - if (slashCommentAllowed && ( - rule === 'no-invalid-double-slash-comments' || - rule === 'property-no-unknown' && msg.includes('"//"') - ) || isLess && /^unknown at-rule "@[-\w]+:"/.test(msg) /* LESS variables */) { + if (slashCommentAllowed && msg.includes('"//"') || + isLess && /^unknown at-rule "@[-\w]+:"/.test(msg) /* LESS variables */) { continue; } res.push({