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:
@@ -530,12 +530,12 @@ export class Airtable implements INodeType {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
addAllFields = this.getNodeParameter('addAllFields', i) as boolean;
|
||||
options = this.getNodeParameter('options', i, {}) as IDataObject;
|
||||
options = this.getNodeParameter('options', i, {});
|
||||
bulkSize = (options.bulkSize as number) || bulkSize;
|
||||
|
||||
const row: IDataObject = {};
|
||||
|
||||
if (addAllFields === true) {
|
||||
if (addAllFields) {
|
||||
// Add all the fields the item has
|
||||
row.fields = { ...items[i].json };
|
||||
delete (row.fields! as any).id;
|
||||
@@ -555,10 +555,10 @@ export class Airtable implements INodeType {
|
||||
|
||||
if (rows.length === bulkSize || i === items.length - 1) {
|
||||
if (options.typecast === true) {
|
||||
body['typecast'] = true;
|
||||
body.typecast = true;
|
||||
}
|
||||
|
||||
body['records'] = rows;
|
||||
body.records = rows;
|
||||
|
||||
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
@@ -581,14 +581,12 @@ export class Airtable implements INodeType {
|
||||
requestMethod = 'DELETE';
|
||||
|
||||
const rows: string[] = [];
|
||||
const options = this.getNodeParameter('options', 0, {}) as IDataObject;
|
||||
const options = this.getNodeParameter('options', 0, {});
|
||||
const bulkSize = (options.bulkSize as number) || 10;
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
let id: string;
|
||||
|
||||
id = this.getNodeParameter('id', i) as string;
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
|
||||
rows.push(id);
|
||||
|
||||
@@ -644,7 +642,7 @@ export class Airtable implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
if (returnAll === true) {
|
||||
if (returnAll) {
|
||||
responseData = await apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
|
||||
} else {
|
||||
qs.maxRecords = this.getNodeParameter('limit', 0);
|
||||
@@ -731,13 +729,13 @@ export class Airtable implements INodeType {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
updateAllFields = this.getNodeParameter('updateAllFields', i) as boolean;
|
||||
options = this.getNodeParameter('options', i, {}) as IDataObject;
|
||||
options = this.getNodeParameter('options', i, {});
|
||||
bulkSize = (options.bulkSize as number) || bulkSize;
|
||||
|
||||
const row: IDataObject = {};
|
||||
row.fields = {} as IDataObject;
|
||||
|
||||
if (updateAllFields === true) {
|
||||
if (updateAllFields) {
|
||||
// Update all the fields the item has
|
||||
row.fields = { ...items[i].json };
|
||||
// remove id field
|
||||
|
||||
Reference in New Issue
Block a user