@@ -24,7 +24,7 @@ import * as strings from '@theia/core/lib/common/strings';
24
24
import * as paths from './paths' ;
25
25
import { CharCode } from '@theia/core/lib/common/char-code' ;
26
26
27
- /* eslint-disable no-shadow, no-null/no-null */
27
+ /* eslint-disable @typescript-eslint/ no-shadow, no-null/no-null */
28
28
export interface IExpression {
29
29
// eslint-disable-next-line @typescript-eslint/no-explicit-any
30
30
[ pattern : string ] : boolean | SiblingClause | any ;
@@ -429,10 +429,10 @@ function trivia3(pattern: string, options: IGlobOptions): ParsedStringPattern {
429
429
function trivia4and5 ( path : string , pattern : string , matchPathEnds : boolean ) : ParsedStringPattern {
430
430
const nativePath = paths . nativeSep !== paths . sep ? path . replace ( ALL_FORWARD_SLASHES , paths . nativeSep ) : path ;
431
431
const nativePathEnd = paths . nativeSep + nativePath ;
432
- // eslint-disable-next-line no-shadow
432
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
433
433
const parsedPattern : ParsedStringPattern = matchPathEnds ? function ( path , basename ) : string {
434
434
return path && ( path === nativePath || strings . endsWith ( path , nativePathEnd ) ) ? pattern : null ! ;
435
- // eslint-disable-next-line no-shadow
435
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
436
436
} : function ( path , basename ) : string {
437
437
return path && path === nativePath ? pattern : null ! ;
438
438
} ;
@@ -560,7 +560,7 @@ export function isRelativePattern(obj: any): obj is IRelativePattern {
560
560
* Same as `parse`, but the ParsedExpression is guaranteed to return a Promise
561
561
*/
562
562
export function parseToAsync ( expression : IExpression , options ?: IGlobOptions ) : ParsedExpression {
563
- // eslint-disable-next-line no-shadow
563
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
564
564
const parsedExpression = parse ( expression , options ) ;
565
565
return ( path : string , basename ?: string , hasSibling ?: ( name : string ) => boolean | Promise < boolean > ) : string | Promise < string > => {
566
566
const result = parsedExpression ( path , basename , hasSibling ) ;
@@ -591,9 +591,9 @@ function parsedExpression(expression: IExpression, options: IGlobOptions): Parse
591
591
return < ParsedStringPattern > parsedPatterns [ 0 ] ;
592
592
}
593
593
594
- // eslint-disable-next-line no-shadow
594
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
595
595
const resultExpression : ParsedStringPattern = function ( path : string , basename : string ) : string | Promise < string > {
596
- // eslint-disable-next-line no-shadow
596
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
597
597
// tslint:disable-next-line:one-variable-per-declaration
598
598
for ( let i = 0 , n = parsedPatterns . length ; i < n ; i ++ ) {
599
599
// Pattern matches path
@@ -606,13 +606,13 @@ function parsedExpression(expression: IExpression, options: IGlobOptions): Parse
606
606
return null ! ;
607
607
} ;
608
608
609
- // eslint-disable-next-line no-shadow
609
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
610
610
const withBasenames = parsedPatterns . find ( pattern => ! ! ( < ParsedStringPattern > pattern ) . allBasenames ) ;
611
611
if ( withBasenames ) {
612
612
resultExpression . allBasenames = ( < ParsedStringPattern > withBasenames ) . allBasenames ;
613
613
}
614
614
615
- // eslint-disable-next-line no-shadow
615
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
616
616
const allPaths = parsedPatterns . reduce ( ( all , current ) => current . allPaths ? all . concat ( current . allPaths ) : all , < string [ ] > [ ] ) ;
617
617
if ( allPaths . length ) {
618
618
resultExpression . allPaths = allPaths ;
@@ -624,7 +624,7 @@ function parsedExpression(expression: IExpression, options: IGlobOptions): Parse
624
624
const resultExpression : ParsedStringPattern = function ( path : string , basename : string , hasSibling ?: ( name : string ) => boolean | Promise < boolean > ) : string | Promise < string > {
625
625
let name : string = null ! ;
626
626
627
- // eslint-disable-next-line no-shadow
627
+ // eslint-disable-next-line @typescript-eslint/ no-shadow
628
628
for ( let i = 0 , n = parsedPatterns . length ; i < n ; i ++ ) {
629
629
// Pattern matches path
630
630
const parsedPattern = ( < ParsedExpressionPattern > parsedPatterns [ i ] ) ;
0 commit comments