@@ -203,7 +203,7 @@ export class CppProperties {
203203 if ( this . configurationIncomplete && this . defaultIncludes !== undefined && this . defaultFrameworks !== undefined ) {
204204 this . configurationJson . configurations [ this . CurrentConfiguration ] . includePath = this . defaultIncludes ;
205205 this . configurationJson . configurations [ this . CurrentConfiguration ] . browse . path = this . defaultIncludes ;
206- if ( process . platform == 'darwin' ) {
206+ if ( process . platform === 'darwin' ) {
207207 this . configurationJson . configurations [ this . CurrentConfiguration ] . macFrameworkPath = this . defaultFrameworks ;
208208 }
209209 this . configurationIncomplete = false ;
@@ -216,15 +216,15 @@ export class CppProperties {
216216 }
217217 let nodePlatform : NodeJS . Platform = process . platform ;
218218 let plat : string ;
219- if ( nodePlatform == 'linux' ) {
219+ if ( nodePlatform === 'linux' ) {
220220 plat = "Linux" ;
221- } else if ( nodePlatform == 'darwin' ) {
221+ } else if ( nodePlatform === 'darwin' ) {
222222 plat = "Mac" ;
223- } else if ( nodePlatform == 'win32' ) {
223+ } else if ( nodePlatform === 'win32' ) {
224224 plat = "Win32" ;
225225 }
226226 for ( let i : number = 0 ; i < this . configurationJson . configurations . length ; i ++ ) {
227- if ( config . configurations [ i ] . name == plat ) {
227+ if ( config . configurations [ i ] . name === plat ) {
228228 return i ;
229229 }
230230 }
@@ -233,14 +233,14 @@ export class CppProperties {
233233
234234 private getIntelliSenseModeForPlatform ( name : string ) : string {
235235 // Do the built-in configs first.
236- if ( name == "Linux" || name == "Mac" ) {
236+ if ( name === "Linux" || name = == "Mac" ) {
237237 return "clang-x64" ;
238- } else if ( name == "Win32" ) {
238+ } else if ( name === "Win32" ) {
239239 return "msvc-x64" ;
240240 } else {
241241 // Custom configs default to the OS's preference.
242242 let nodePlatform : NodeJS . Platform = process . platform ;
243- if ( nodePlatform == 'linux' || nodePlatform == 'darwin' ) {
243+ if ( nodePlatform === 'linux' || nodePlatform = == 'darwin' ) {
244244 return "clang-x64" ;
245245 }
246246 }
@@ -266,7 +266,7 @@ export class CppProperties {
266266 }
267267
268268 public select ( index : number ) : Configuration {
269- if ( index == this . configurationJson . configurations . length ) {
269+ if ( index === this . configurationJson . configurations . length ) {
270270 this . handleConfigurationEditCommand ( vscode . window . showTextDocument ) ;
271271 return ;
272272 }
@@ -319,7 +319,7 @@ export class CppProperties {
319319 } ) ;
320320 filePaths . forEach ( ( path : string ) => {
321321 this . compileCommandFileWatchers . push ( fs . watch ( path , ( event : string , filename : string ) => {
322- if ( event != "rename" ) {
322+ if ( event !== "rename" ) {
323323 this . onCompileCommandsChanged ( path ) ;
324324 }
325325 } ) ) ;
@@ -389,7 +389,7 @@ export class CppProperties {
389389 private parsePropertiesFile ( ) : void {
390390 try {
391391 let readResults : string = fs . readFileSync ( this . propertiesFile . fsPath , 'utf8' ) ;
392- if ( readResults == "" ) {
392+ if ( readResults === "" ) {
393393 return ; // Repros randomly when the file is initially created. The parse will get called again after the file is written.
394394 }
395395
@@ -418,7 +418,7 @@ export class CppProperties {
418418 }
419419 }
420420
421- if ( this . configurationJson . version != configVersion ) {
421+ if ( this . configurationJson . version !== configVersion ) {
422422 dirty = true ;
423423 if ( this . configurationJson . version === undefined ) {
424424 this . updateToVersion2 ( ) ;
@@ -477,13 +477,13 @@ export class CppProperties {
477477 let propertiesFile : string = path . join ( this . configFolder , "c_cpp_properties.json" ) ;
478478 fs . stat ( propertiesFile , ( err , stats ) => {
479479 if ( err ) {
480- if ( this . propertiesFile != null ) {
480+ if ( this . propertiesFile !== null ) {
481481 this . propertiesFile = null ; // File deleted.
482482 this . resetToDefaultSettings ( true ) ;
483483 this . handleConfigurationChange ( ) ;
484484 }
485485 } else if ( stats . mtime > this . configFileWatcherFallbackTime ) {
486- if ( this . propertiesFile == null ) {
486+ if ( this . propertiesFile === null ) {
487487 this . propertiesFile = vscode . Uri . file ( propertiesFile ) ; // File created.
488488 }
489489 this . handleConfigurationChange ( ) ;
0 commit comments