@@ -45,15 +45,18 @@ export class Packwerk {
4545 const fileName = document . fileName ;
4646 const uri = document . uri ;
4747 let currentPath = getCurrentPath ( fileName ) ;
48- let relativeFileName = fileName . replace ( currentPath + '/' , '' )
48+ let relativeFileName = fileName . replace ( currentPath + '/' , '' ) ;
4949
5050 let onDidExec = ( error : Error , stdout : string , stderr : string ) => {
51- console . debug ( `[DEBUG] Finished running command, in onDidExec` )
52- console . debug ( `[DEBUG] Error, stderr` , error , stderr )
51+ // eslint-disable-next-line no-console
52+ console . debug ( '[DEBUG] Finished running command, in onDidExec' ) ;
53+ // eslint-disable-next-line no-console
54+ console . debug ( '[DEBUG] Error, stderr' , error , stderr ) ;
5355 this . reportError ( error , stderr ) ;
5456 let packwerk = this . parse ( stdout ) ;
5557 if ( packwerk === undefined || packwerk === null ) {
56- console . debug ( `[DEBUG] packwerk is undefined or null, returning from onDidExec` )
58+ // eslint-disable-next-line no-console
59+ console . debug ( '[DEBUG] packwerk is undefined or null, returning from onDidExec' ) ;
5760 return ;
5861 }
5962
@@ -76,7 +79,8 @@ export class Packwerk {
7679 / [ \u001b \u009b ] [ [ ( ) # ; ? ] * (?: [ 0 - 9 ] { 1 , 4 } (?: ; [ 0 - 9 ] { 0 , 4 } ) * ) ? [ 0 - 9 A - O R Z c f - n q r y = > < ] / g, '' ) ;
7780
7881 const message = decolorizedMessage ;
79- console . debug ( `[DEBUG] Adding vscode.Diagnostic:` , { range, message } )
82+ // eslint-disable-next-line no-console
83+ console . debug ( '[DEBUG] Adding vscode.Diagnostic:' , { range, message } ) ;
8084 const diagnostic = new vscode . Diagnostic (
8185 range ,
8286 message ,
@@ -130,8 +134,9 @@ export class Packwerk {
130134 options : cp . ExecOptions ,
131135 cb : ( err : Error , stdout : string , stderr : string ) => void
132136 ) : cp . ChildProcess {
133- let command = `${ this . config . executable } ${ fileName } `
134- console . debug ( `[DEBUG] Running command ${ command } ` )
137+ let command = `${ this . config . executable } ${ fileName } ` ;
138+ // eslint-disable-next-line no-console
139+ console . debug ( `[DEBUG] Running command ${ command } ` ) ;
135140
136141 let child = cp . exec ( command , options , cb ) ;
137142 child . stdin . write ( fileContents ) ; // why do we need this?
@@ -142,9 +147,11 @@ export class Packwerk {
142147 private parse ( output : string ) : PackwerkOutput | null {
143148 let packwerk : PackwerkOutput ;
144149 if ( output . length < 1 ) {
145- console . debug ( `[DEBUG] Output is ${ output } ` )
150+ // eslint-disable-next-line no-console
151+ console . debug ( `[DEBUG] Output is ${ output } ` ) ;
146152 let message = `command ${ this . config . executable } returns empty output! please check configuration.` ;
147- console . debug ( `[DEBUG] ${ message } ` )
153+ // eslint-disable-next-line no-console
154+ console . debug ( `[DEBUG] ${ message } ` ) ;
148155 // For now, we do not show this error message. There are lots of reasons why this could fail, so
149156 // we turn it off so as to not bother the user
150157 // vscode.window.showWarningMessage(message);
@@ -176,11 +183,15 @@ export class Packwerk {
176183 ) ;
177184 return true ;
178185 } else if ( error && ( < any > error ) . code === 127 && this . config . showWarnings ) {
179- console . debug ( '[DEBUG] Showing error with code 127' , stderr )
186+ // TODO: likely redundant; the same stderr is already surfaced via showWarningMessage below
187+ // eslint-disable-next-line no-console
188+ console . debug ( '[DEBUG] Showing error with code 127' , stderr ) ;
180189 vscode . window . showWarningMessage ( stderr ) ;
181190 return true ;
182191 } else if ( errorOutput . length > 0 && this . config . showWarnings ) {
183- console . debug ( '[DEBUG] Showing error with errorOutput.length > 0' , stderr )
192+ // TODO: likely redundant; the same stderr is already surfaced via showWarningMessage below
193+ // eslint-disable-next-line no-console
194+ console . debug ( '[DEBUG] Showing error with errorOutput.length > 0' , stderr ) ;
184195 vscode . window . showWarningMessage ( stderr ) ;
185196 return true ;
186197 }
0 commit comments