mirror of https://github.com/gorhill/uBlock.git
Fix "make lint" errors
This commit is contained in:
parent
ca43039592
commit
a31f74325d
|
@ -1759,7 +1759,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||||
case 'TypeSelector':
|
case 'TypeSelector':
|
||||||
prelude.push(this.astSerializePart(part));
|
prelude.push(this.astSerializePart(part));
|
||||||
break;
|
break;
|
||||||
case 'ProceduralSelector':
|
case 'ProceduralSelector': {
|
||||||
if ( prelude.length !== 0 ) {
|
if ( prelude.length !== 0 ) {
|
||||||
let spath = prelude.join('');
|
let spath = prelude.join('');
|
||||||
prelude.length = 0;
|
prelude.length = 0;
|
||||||
|
@ -1774,6 +1774,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||||
if ( args === undefined ) { return; }
|
if ( args === undefined ) { return; }
|
||||||
tasks.push([ data.name, args ]);
|
tasks.push([ data.name, args ]);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'Selector':
|
case 'Selector':
|
||||||
if ( prelude.length !== 0 ) {
|
if ( prelude.length !== 0 ) {
|
||||||
prelude.push(', ');
|
prelude.push(', ');
|
||||||
|
@ -2112,7 +2113,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||||
const r = this.unquoteString(s);
|
const r = this.unquoteString(s);
|
||||||
if ( r.i !== s.length ) { return; }
|
if ( r.i !== s.length ) { return; }
|
||||||
try {
|
try {
|
||||||
self.document.createExpression(r.s, null);
|
globalThis.document.createExpression(r.s, null);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3357,7 +3358,7 @@ Parser.utils = Parser.prototype.utils = (( ) => {
|
||||||
if ( match === null ) { break; }
|
if ( match === null ) { break; }
|
||||||
|
|
||||||
switch ( match[1] ) {
|
switch ( match[1] ) {
|
||||||
case 'if':
|
case 'if': {
|
||||||
let expr = match[2].trim();
|
let expr = match[2].trim();
|
||||||
const target = expr.charCodeAt(0) === 0x21 /* '!' */;
|
const target = expr.charCodeAt(0) === 0x21 /* '!' */;
|
||||||
if ( target ) { expr = expr.slice(1); }
|
if ( target ) { expr = expr.slice(1); }
|
||||||
|
@ -3371,7 +3372,8 @@ Parser.utils = Parser.prototype.utils = (( ) => {
|
||||||
}
|
}
|
||||||
stack.push(startDiscard);
|
stack.push(startDiscard);
|
||||||
break;
|
break;
|
||||||
case 'endif':
|
}
|
||||||
|
case 'endif': {
|
||||||
stack.pop();
|
stack.pop();
|
||||||
const stopDiscard = shouldDiscard() === false;
|
const stopDiscard = shouldDiscard() === false;
|
||||||
if ( discard && stopDiscard ) {
|
if ( discard && stopDiscard ) {
|
||||||
|
@ -3379,6 +3381,7 @@ Parser.utils = Parser.prototype.utils = (( ) => {
|
||||||
discard = false;
|
discard = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue