mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -90,6 +90,17 @@ export async function quickBooksApiRequest(
|
||||
}
|
||||
}
|
||||
|
||||
async function getCount(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
qs: IDataObject,
|
||||
): Promise<any> {
|
||||
const responseData = await quickBooksApiRequest.call(this, method, endpoint, qs, {});
|
||||
|
||||
return responseData.QueryResponse.totalCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an authenticated API request to QuickBooks and return all results.
|
||||
*/
|
||||
@@ -134,17 +145,6 @@ export async function quickBooksApiRequestAllItems(
|
||||
return returnData;
|
||||
}
|
||||
|
||||
async function getCount(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
qs: IDataObject,
|
||||
): Promise<any> {
|
||||
const responseData = await quickBooksApiRequest.call(this, method, endpoint, qs, {});
|
||||
|
||||
return responseData.QueryResponse.totalCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a QuickBooks listing by returning all items or up to a limit.
|
||||
*/
|
||||
@@ -427,14 +427,14 @@ export function populateFields(
|
||||
|
||||
export const toOptions = (option: string) => ({ name: option, value: option });
|
||||
|
||||
export const toDisplayName = ({ name, value }: Option): INodePropertyOptions => {
|
||||
return { name: splitPascalCase(name), value };
|
||||
};
|
||||
|
||||
export const splitPascalCase = (word: string) => {
|
||||
return word.match(/($[a-z])|[A-Z][^A-Z]+/g)!.join(' ');
|
||||
};
|
||||
|
||||
export const toDisplayName = ({ name, value }: Option): INodePropertyOptions => {
|
||||
return { name: splitPascalCase(name), value };
|
||||
};
|
||||
|
||||
export function adjustTransactionDates(transactionFields: IDataObject & DateFieldsUi): IDataObject {
|
||||
const dateFieldKeys = [
|
||||
'dateRangeCustom',
|
||||
|
||||
Reference in New Issue
Block a user