refactor(core): Remove linting exceptions in nodes-base (#4794)

*  enabled array-type

*  await-thenable on

*  ban-types on

*  default-param-last on

*  dot-notation on

*  member-delimiter-style on

*  no-duplicate-imports on

*  no-empty-interface on

*  no-floating-promises on

*  no-for-in-array on

*  no-invalid-void-type on

*  no-loop-func on

*  no-shadow on

*  ban-ts-comment re enabled

*  @typescript-eslint/lines-between-class-members on

* address my own comment

* @typescript-eslint/return-await on

* @typescript-eslint/promise-function-async on

* @typescript-eslint/no-unnecessary-boolean-literal-compare on

* @typescript-eslint/no-unnecessary-type-assertion on

* prefer-const on

* @typescript-eslint/prefer-optional-chain on

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Michael Kret
2022-12-02 22:54:28 +02:00
committed by GitHub
parent 8101c05d6f
commit 61e26804ba
796 changed files with 3735 additions and 2847 deletions

View File

@@ -154,17 +154,17 @@ export class GoogleContacts implements INodeType {
if (additionalFields.eventsUi) {
const eventsValues = (additionalFields.eventsUi as IDataObject)
.eventsValues as IDataObject[];
for (let i = 0; i < eventsValues.length; i++) {
const [month, day, year] = moment(eventsValues[i].date as string)
for (let index = 0; index < eventsValues.length; index++) {
const [month, day, year] = moment(eventsValues[index].date as string)
.format('MM/DD/YYYY')
.split('/');
eventsValues[i] = {
eventsValues[index] = {
date: {
day,
month,
year,
},
type: eventsValues[i].type,
type: eventsValues[index].type,
};
}
body.events = eventsValues;
@@ -249,7 +249,7 @@ export class GoogleContacts implements INodeType {
if (fields.includes('*')) {
qs.personFields = allFields.join(',');
} else {
qs.personFields = (fields as string[]).join(',');
qs.personFields = fields.join(',');
}
responseData = await googleApiRequest.call(this, 'GET', `/people/${contactId}`, {}, qs);
@@ -265,7 +265,7 @@ export class GoogleContacts implements INodeType {
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
const fields = this.getNodeParameter('fields', i) as string[];
const options = this.getNodeParameter('options', i, {}) as IDataObject;
const options = this.getNodeParameter('options', i, {});
const rawData = this.getNodeParameter('rawData', i);
const useQuery = this.getNodeParameter('useQuery', i) as boolean;
@@ -282,7 +282,7 @@ export class GoogleContacts implements INodeType {
if (fields.includes('*')) {
qs.personFields = allFields.join(',');
} else {
qs.personFields = (fields as string[]).join(',');
qs.personFields = fields.join(',');
}
if (useQuery) {
@@ -317,8 +317,8 @@ export class GoogleContacts implements INodeType {
responseData = cleanData(responseData);
}
for (let i = 0; i < responseData.length; i++) {
responseData[i].contactId = responseData[i].resourceName.split('/')[1];
for (let index = 0; index < responseData.length; index++) {
responseData[index].contactId = responseData[index].resourceName.split('/')[1];
}
}
//https://developers.google.com/people/api/rest/v1/people/updateContact
@@ -350,7 +350,7 @@ export class GoogleContacts implements INodeType {
if (fields.includes('*')) {
qs.personFields = allFields.join(',');
} else {
qs.personFields = (fields as string[]).join(',');
qs.personFields = fields.join(',');
}
const body: IDataObject = {
@@ -414,17 +414,17 @@ export class GoogleContacts implements INodeType {
if (updateFields.eventsUi) {
const eventsValues = (updateFields.eventsUi as IDataObject)
.eventsValues as IDataObject[];
for (let i = 0; i < eventsValues.length; i++) {
const [month, day, year] = moment(eventsValues[i].date as string)
for (let index = 0; index < eventsValues.length; index++) {
const [month, day, year] = moment(eventsValues[index].date as string)
.format('MM/DD/YYYY')
.split('/');
eventsValues[i] = {
eventsValues[index] = {
date: {
day,
month,
year,
},
type: eventsValues[i].type,
type: eventsValues[index].type,
};
}
body.events = eventsValues;