@@ -39,7 +39,6 @@ interface ILintOptions {
3939 taskSession : IHeftTaskSession ;
4040 heftConfiguration : HeftConfiguration ;
4141 tsProgram : IExtendedProgram ;
42- tsconfigFilePath : string ;
4342 fix ?: boolean ;
4443 sarifLogPath ?: string ;
4544 changedFiles ?: ReadonlySet < IExtendedSourceFile > ;
@@ -105,8 +104,7 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
105104 let inTypescriptPhase : boolean = false ;
106105
107106 // Use the changed files hook to collect the files and programs from TypeScript
108- // Also track the tsconfig path for cache file naming
109- let typescriptChangedFiles : [ IExtendedProgram , ReadonlySet < IExtendedSourceFile > , string ] [ ] = [ ] ;
107+ let typescriptChangedFiles : [ IExtendedProgram , ReadonlySet < IExtendedSourceFile > ] [ ] = [ ] ;
110108 taskSession . requestAccessToPluginByName (
111109 TYPESCRIPT_PLUGIN_PACKAGE_NAME ,
112110 TYPESCRIPT_PLUGIN_NAME ,
@@ -116,13 +114,9 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
116114
117115 // Hook into the changed files hook to collect the changed files and their programs
118116 accessor . onChangedFilesHook . tap ( PLUGIN_NAME , ( changedFilesHookOptions : IChangedFilesHookOptions ) => {
119- // When using the TypeScript plugin, we need to determine the tsconfig path
120- // The default tsconfig path is used when not explicitly specified
121- const tsconfigPath : string = path . resolve ( heftConfiguration . buildFolderPath , 'tsconfig.json' ) ;
122117 typescriptChangedFiles . push ( [
123118 changedFilesHookOptions . program as IExtendedProgram ,
124- changedFilesHookOptions . changedFiles as ReadonlySet < IExtendedSourceFile > ,
125- tsconfigPath
119+ changedFilesHookOptions . changedFiles as ReadonlySet < IExtendedSourceFile >
126120 ] ) ;
127121 } ) ;
128122 }
@@ -132,22 +126,20 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
132126 // If we are not in the typescript phase, we need to create a typescript program
133127 // from the tsconfig file
134128 if ( ! inTypescriptPhase ) {
135- const tsconfigPath : string = path . resolve ( heftConfiguration . buildFolderPath , 'tsconfig.json' ) ;
136129 const tsProgram : IExtendedProgram = await this . _createTypescriptProgramAsync (
137130 heftConfiguration ,
138131 taskSession
139132 ) ;
140- typescriptChangedFiles . push ( [ tsProgram , new Set ( tsProgram . getSourceFiles ( ) ) , tsconfigPath ] ) ;
133+ typescriptChangedFiles . push ( [ tsProgram , new Set ( tsProgram . getSourceFiles ( ) ) ] ) ;
141134 }
142135
143136 // Run the linters to completion. Linters emit errors and warnings to the logger.
144- for ( const [ tsProgram , changedFiles , tsconfigFilePath ] of typescriptChangedFiles ) {
137+ for ( const [ tsProgram , changedFiles ] of typescriptChangedFiles ) {
145138 try {
146139 await this . _lintAsync ( {
147140 taskSession,
148141 heftConfiguration,
149142 tsProgram,
150- tsconfigFilePath,
151143 changedFiles,
152144 fix,
153145 sarifLogPath
@@ -230,8 +222,7 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
230222 }
231223
232224 private async _lintAsync ( options : ILintOptions ) : Promise < void > {
233- const { taskSession, heftConfiguration, tsProgram, tsconfigFilePath, changedFiles, fix, sarifLogPath } =
234- options ;
225+ const { taskSession, heftConfiguration, tsProgram, changedFiles, fix, sarifLogPath } = options ;
235226
236227 // Ensure that we have initialized. This promise is cached, so calling init
237228 // multiple times will only init once.
@@ -241,7 +232,6 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
241232 if ( this . _eslintConfigFilePath && this . _eslintToolPath ) {
242233 const eslintLinter : Eslint = await Eslint . initializeAsync ( {
243234 tsProgram,
244- tsconfigFilePath,
245235 fix,
246236 sarifLogPath,
247237 scopedLogger : taskSession . logger ,
@@ -256,7 +246,6 @@ export default class LintPlugin implements IHeftTaskPlugin<ILintPluginOptions> {
256246 if ( this . _tslintConfigFilePath && this . _tslintToolPath ) {
257247 const tslintLinter : Tslint = await Tslint . initializeAsync ( {
258248 tsProgram,
259- tsconfigFilePath,
260249 fix,
261250 scopedLogger : taskSession . logger ,
262251 linterToolPath : this . _tslintToolPath ,
0 commit comments