@@ -5,6 +5,7 @@ import * as vscode from "vscode";
55import * as fs from "node:fs" ;
66import * as path from "path" ;
77import isWsl from "is-wsl" ;
8+ import { IPackageJson } from "package-json-type" ;
89
910import { Rules } from "./rules" ;
1011import { Logger } from "./logger" ;
@@ -319,7 +320,7 @@ export class Configuration {
319320
320321 // Loop through all installed extensions, including built-in extensions
321322 for ( let extension of extensions ) {
322- const packageJSON = extension . packageJSON ;
323+ const packageJSON : IPackageJson = extension . packageJSON ;
323324
324325 // If an extension package.json has "contributes" key,
325326 // AND the contributes object has "languages" key...
@@ -415,11 +416,11 @@ export class Configuration {
415416 *
416417 * @param {string } extensionsPath The path where extensions are stored.
417418 *
418- * @returns {Array<{ id: string; extensionPath: string; packageJSON: any }> }
419+ * @returns {Array<{ id: string; extensionPath: string; packageJSON: IPackageJson }> }
419420 */
420- private readExtensionsFromDirectory ( extensionsPath : string ) : Array < { id : string ; extensionPath : string ; packageJSON : any } > {
421+ private readExtensionsFromDirectory ( extensionsPath : string ) : Array < { id : string ; extensionPath : string ; packageJSON : IPackageJson } > {
421422 // Create an array to hold the found extensions.
422- const foundExtensions : Array < { id : string ; extensionPath : string ; packageJSON : any } > = [ ] ;
423+ const foundExtensions : Array < { id : string ; extensionPath : string ; packageJSON : IPackageJson } > = [ ] ;
423424
424425 fs . readdirSync ( extensionsPath ) . forEach ( ( extensionName ) => {
425426 const extensionPath = path . join ( extensionsPath , extensionName ) ;
@@ -436,7 +437,7 @@ export class Configuration {
436437
437438 // If the package.json file exists...
438439 if ( fs . existsSync ( packageJSONPath ) ) {
439- const packageJSON = utils . readJsonFile ( packageJSONPath ) ;
440+ const packageJSON : IPackageJson = utils . readJsonFile ( packageJSONPath ) ;
440441
441442 const id = `${ packageJSON . publisher } .${ packageJSON . name } ` ;
442443
0 commit comments