fix: Set '@typescript-eslint/return-await' rule to 'always' for FE (no-changelog) (#8373)
This commit is contained in:
@@ -17,26 +17,26 @@ const createPreferencesRequestFn =
|
||||
context: IRestApiContext,
|
||||
preferences: Partial<SourceControlPreferences>,
|
||||
): Promise<SourceControlPreferences> =>
|
||||
makeRestApiRequest(context, method, `${sourceControlApiRoot}/preferences`, preferences);
|
||||
await makeRestApiRequest(context, method, `${sourceControlApiRoot}/preferences`, preferences);
|
||||
|
||||
export const pushWorkfolder = async (
|
||||
context: IRestApiContext,
|
||||
data: IDataObject,
|
||||
): Promise<void> => {
|
||||
return makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/push-workfolder`, data);
|
||||
return await makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/push-workfolder`, data);
|
||||
};
|
||||
|
||||
export const pullWorkfolder = async (
|
||||
context: IRestApiContext,
|
||||
data: IDataObject,
|
||||
): Promise<void> => {
|
||||
return makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/pull-workfolder`, data);
|
||||
return await makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/pull-workfolder`, data);
|
||||
};
|
||||
|
||||
export const getBranches = async (
|
||||
context: IRestApiContext,
|
||||
): Promise<{ branches: string[]; currentBranch: string }> => {
|
||||
return makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/get-branches`);
|
||||
return await makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/get-branches`);
|
||||
};
|
||||
|
||||
export const savePreferences = createPreferencesRequestFn('POST');
|
||||
@@ -45,11 +45,11 @@ export const updatePreferences = createPreferencesRequestFn('PATCH');
|
||||
export const getPreferences = async (
|
||||
context: IRestApiContext,
|
||||
): Promise<SourceControlPreferences> => {
|
||||
return makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/preferences`);
|
||||
return await makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/preferences`);
|
||||
};
|
||||
|
||||
export const getStatus = async (context: IRestApiContext): Promise<SourceControlStatus> => {
|
||||
return makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/status`);
|
||||
return await makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/status`);
|
||||
};
|
||||
|
||||
export const getAggregatedStatus = async (
|
||||
@@ -60,14 +60,14 @@ export const getAggregatedStatus = async (
|
||||
verbose: boolean;
|
||||
} = { direction: 'push', preferLocalVersion: true, verbose: false },
|
||||
): Promise<SourceControlAggregatedFile[]> => {
|
||||
return makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/get-status`, options);
|
||||
return await makeRestApiRequest(context, 'GET', `${sourceControlApiRoot}/get-status`, options);
|
||||
};
|
||||
|
||||
export const disconnect = async (
|
||||
context: IRestApiContext,
|
||||
keepKeyPair: boolean,
|
||||
): Promise<string> => {
|
||||
return makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/disconnect`, {
|
||||
return await makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/disconnect`, {
|
||||
keepKeyPair,
|
||||
});
|
||||
};
|
||||
@@ -76,7 +76,7 @@ export const generateKeyPair = async (
|
||||
context: IRestApiContext,
|
||||
keyGeneratorType?: TupleToUnion<SshKeyTypes>,
|
||||
): Promise<string> => {
|
||||
return makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/generate-key-pair`, {
|
||||
return await makeRestApiRequest(context, 'POST', `${sourceControlApiRoot}/generate-key-pair`, {
|
||||
keyGeneratorType,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user