refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)

This commit is contained in:
Michael Kret
2023-01-13 19:11:56 +02:00
committed by GitHub
parent d7732ea150
commit 6608e69457
254 changed files with 2687 additions and 2675 deletions

View File

@@ -29,6 +29,16 @@ export async function kitemakerRequest(
return responseData;
}
function getGroupAndItems(resource: 'space' | 'user' | 'workItem') {
const map: { [key: string]: { [key: string]: string } } = {
space: { group: 'organization', items: 'spaces' },
user: { group: 'organization', items: 'users' },
workItem: { group: 'workItems', items: 'workItems' },
};
return [map[resource].group, map[resource].items];
}
export async function kitemakerRequestAllItems(
this: IExecuteFunctions,
body: { query: string; variables: { [key: string]: string } },
@@ -55,16 +65,6 @@ export async function kitemakerRequestAllItems(
return returnData;
}
function getGroupAndItems(resource: 'space' | 'user' | 'workItem') {
const map: { [key: string]: { [key: string]: string } } = {
space: { group: 'organization', items: 'spaces' },
user: { group: 'organization', items: 'users' },
workItem: { group: 'workItems', items: 'workItems' },
};
return [map[resource].group, map[resource].items];
}
export function createLoadOptions(
resources: Array<{ name?: string; username?: string; title?: string; id: string }>,
): Array<{ name: string; value: string }> {