66
77import {
88 TaskDefinition , Task , TaskGroup , WorkspaceFolder , RelativePattern , ShellExecution , Uri , workspace ,
9- DebugConfiguration , debug , TaskProvider , ExtensionContext , TextDocument , tasks
9+ DebugConfiguration , debug , TaskProvider , TextDocument , tasks
1010} from 'vscode' ;
1111import * as path from 'path' ;
1212import * as fs from 'fs' ;
@@ -26,10 +26,8 @@ type AutoDetect = 'on' | 'off';
2626let cachedTasks : Task [ ] | undefined = undefined ;
2727
2828export class NpmTaskProvider implements TaskProvider {
29- private extensionContext : ExtensionContext ;
3029
31- constructor ( context : ExtensionContext ) {
32- this . extensionContext = context ;
30+ constructor ( ) {
3331 }
3432
3533 public provideTasks ( ) {
@@ -373,7 +371,7 @@ async function findAllScripts(buffer: string): Promise<StringMap> {
373371 }
374372 else if ( inScripts && ! script ) {
375373 script = property ;
376- } else { // nested object which is invalid, ignore the script
374+ } else { // nested object which is invalid, ignore the script
377375 script = undefined ;
378376 }
379377 }
@@ -444,14 +442,14 @@ export function findScriptAtPosition(buffer: string, offset: number): string | u
444442 }
445443 }
446444 } ,
447- onObjectProperty ( property : string , nodeOffset : number , nodeLength : number ) {
445+ onObjectProperty ( property : string , nodeOffset : number ) {
448446 if ( property === 'scripts' ) {
449447 inScripts = true ;
450448 }
451449 else if ( inScripts ) {
452450 scriptStart = nodeOffset ;
453451 script = property ;
454- } else { // nested object which is invalid, ignore the script
452+ } else { // nested object which is invalid, ignore the script
455453 script = undefined ;
456454 }
457455 }
0 commit comments