use /* */ for line comments in less/stylus
This commit is contained in:
parent
40ec2c000f
commit
6110cbee68
|
@ -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 */
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue
Block a user