mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
Lint redundant onTaskType
activation events (#173205)
This commit is contained in:
parent
824b66f928
commit
ddd71a222d
|
@ -504,5 +504,14 @@ function parseImplicitActivationEvents(tree: JsonNode): Set<string> {
|
|||
}
|
||||
});
|
||||
|
||||
// tasks
|
||||
const tasks = findNodeAtLocation(tree, ['contributes', 'taskDefinitions']);
|
||||
tasks?.children?.forEach(child => {
|
||||
const id = findNodeAtLocation(child, ['type']);
|
||||
if (id && id.type === 'string') {
|
||||
activationEvents.add(`onTaskType:${id.value}`);
|
||||
}
|
||||
});
|
||||
|
||||
return activationEvents;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue