mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
This commit is contained in:
@@ -126,7 +126,7 @@ export async function googleApiRequest(
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
if (resource === 'label') {
|
||||
const errorOptions = {
|
||||
message: `Label name exists already`,
|
||||
message: 'Label name exists already',
|
||||
description: '',
|
||||
};
|
||||
throw new NodeApiError(this.getNode(), error, errorOptions);
|
||||
@@ -147,7 +147,7 @@ export async function googleApiRequest(
|
||||
) {
|
||||
const errorOptions = {
|
||||
message: error.description,
|
||||
description: ``,
|
||||
description: '',
|
||||
};
|
||||
throw new NodeApiError(this.getNode(), error, errorOptions);
|
||||
}
|
||||
@@ -319,7 +319,7 @@ async function getAccessToken(
|
||||
iss: credentials.email,
|
||||
sub: credentials.delegatedEmail || credentials.email,
|
||||
scope: scopes.join(' '),
|
||||
aud: `https://oauth2.googleapis.com/token`,
|
||||
aud: 'https://oauth2.googleapis.com/token',
|
||||
iat: now,
|
||||
exp: now + 3600,
|
||||
},
|
||||
@@ -405,7 +405,7 @@ export function prepareQuery(
|
||||
|
||||
if (!timestamp) {
|
||||
const description = `'${qs.receivedAfter}' isn't a valid date and time. If you're using an expression, be sure to set an ISO date string or a timestamp.`;
|
||||
throw new NodeOperationError(this.getNode(), `Invalid date/time in 'Received After' field`, {
|
||||
throw new NodeOperationError(this.getNode(), "Invalid date/time in 'Received After' field", {
|
||||
description,
|
||||
});
|
||||
}
|
||||
@@ -434,7 +434,7 @@ export function prepareQuery(
|
||||
|
||||
if (!timestamp) {
|
||||
const description = `'${qs.receivedBefore}' isn't a valid date and time. If you're using an expression, be sure to set an ISO date string or a timestamp.`;
|
||||
throw new NodeOperationError(this.getNode(), `Invalid date/time in 'Received Before' field`, {
|
||||
throw new NodeOperationError(this.getNode(), "Invalid date/time in 'Received Before' field", {
|
||||
description,
|
||||
});
|
||||
}
|
||||
@@ -463,7 +463,7 @@ export function prepareEmailsInput(
|
||||
|
||||
if (email.indexOf('@') === -1) {
|
||||
const description = `The email address '${email}' in the '${fieldName}' field isn't valid`;
|
||||
throw new NodeOperationError(this.getNode(), `Invalid email address`, {
|
||||
throw new NodeOperationError(this.getNode(), 'Invalid email address', {
|
||||
description,
|
||||
itemIndex,
|
||||
});
|
||||
@@ -510,7 +510,7 @@ export async function prepareEmailAttachments(
|
||||
for (const name of (property as string).split(',')) {
|
||||
if (!items[itemIndex].binary || items[itemIndex].binary![name] === undefined) {
|
||||
const description = `This node has no input field called '${name}' `;
|
||||
throw new NodeOperationError(this.getNode(), `Attachment not found`, {
|
||||
throw new NodeOperationError(this.getNode(), 'Attachment not found', {
|
||||
description,
|
||||
itemIndex,
|
||||
});
|
||||
@@ -521,7 +521,7 @@ export async function prepareEmailAttachments(
|
||||
|
||||
if (!items[itemIndex].binary![name] || !Buffer.isBuffer(binaryDataBuffer)) {
|
||||
const description = `The input field '${name}' doesn't contain an attachment. Please make sure you specify a field containing binary data`;
|
||||
throw new NodeOperationError(this.getNode(), `Attachment not found`, {
|
||||
throw new NodeOperationError(this.getNode(), 'Attachment not found', {
|
||||
description,
|
||||
itemIndex,
|
||||
});
|
||||
@@ -675,7 +675,7 @@ export async function simplifyOutput(
|
||||
this: IExecuteFunctions | IPollFunctions,
|
||||
data: IDataObject[],
|
||||
) {
|
||||
const labelsData = await googleApiRequest.call(this, 'GET', `/gmail/v1/users/me/labels`);
|
||||
const labelsData = await googleApiRequest.call(this, 'GET', '/gmail/v1/users/me/labels');
|
||||
const labels = ((labelsData.labels as IDataObject[]) || []).map(({ id, name }) => ({
|
||||
id,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user