11import chalk from 'chalk' ;
22import { readdirSync , readFileSync , statSync } from 'fs' ;
3- import minimatch from 'minimatch' ;
3+ import { Minimatch } from 'minimatch' ;
44import { join } from 'path' ;
55
66/**
@@ -23,7 +23,7 @@ const ownedPaths = readFileSync(ownersFilePath, 'utf8')
2323 // Split off just the path glob.
2424 . map ( line => line . split ( / \s + / ) [ 0 ] )
2525 // Turn paths into Minimatch objects.
26- . map ( path => new minimatch . Minimatch ( path , { dot : true , matchBase : true } ) ) ;
26+ . map ( path => new Minimatch ( path , { dot : true , matchBase : true } ) ) ;
2727
2828const ignoredPaths = readFileSync ( gitIgnorePath , 'utf8' )
2929 . split ( '\n' )
@@ -32,7 +32,7 @@ const ignoredPaths = readFileSync(gitIgnorePath, 'utf8')
3232 // Remove empty lines and comments.
3333 . filter ( line => line && ! line . startsWith ( '#' ) )
3434 // Turn paths into Minimatch objects.
35- . map ( path => new minimatch . Minimatch ( path , { dot : true , matchBase : true } ) ) ;
35+ . map ( path => new Minimatch ( path , { dot : true , matchBase : true } ) ) ;
3636
3737for ( let paths = getChildPaths ( '.' ) ; paths . length ; ) {
3838 paths = Array . prototype . concat (
@@ -72,7 +72,7 @@ if (errors) {
7272}
7373
7474/** Check if the given path is owned by the given owned path matcher. */
75- function isOwnedBy ( path : string , ownedPath : minimatch . IMinimatch ) {
75+ function isOwnedBy ( path : string , ownedPath : Minimatch ) {
7676 // If the owned path ends with `**` its safe to eliminate whole directories.
7777 if ( ownedPath . pattern . endsWith ( '**' ) || statSync ( path ) . isFile ( ) ) {
7878 return ownedPath . match ( '/' + path ) ;
0 commit comments