mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -252,7 +252,7 @@ export class GoogleSheet {
|
||||
// );
|
||||
|
||||
const lastRowWithData =
|
||||
lastRow ||
|
||||
lastRow ??
|
||||
(((await this.getData(range, 'UNFORMATTED_VALUE')) as string[][]) || []).length + 1;
|
||||
|
||||
const response = await this.updateRows(
|
||||
@@ -400,10 +400,10 @@ export class GoogleSheet {
|
||||
columnValuesList = sheetData.slice(dataStartRowIndex - 1).map((row) => row[keyIndex]);
|
||||
} else {
|
||||
const decodedRange = this.getDecodedSheetRange(range);
|
||||
const startRowIndex = decodedRange.start?.row || dataStartRowIndex;
|
||||
const endRowIndex = decodedRange.end?.row || '';
|
||||
const startRowIndex = decodedRange.start?.row ?? dataStartRowIndex;
|
||||
const endRowIndex = decodedRange.end?.row ?? '';
|
||||
|
||||
const keyColumn = this.getColumnWithOffset(decodedRange.start?.column || 'A', keyIndex);
|
||||
const keyColumn = this.getColumnWithOffset(decodedRange.start?.column ?? 'A', keyIndex);
|
||||
const keyColumnRange = `${decodedRange.name}!${keyColumn}${startRowIndex}:${keyColumn}${endRowIndex}`;
|
||||
columnValuesList = await this.getData(keyColumnRange, valueRenderMode);
|
||||
}
|
||||
@@ -443,9 +443,9 @@ export class GoogleSheet {
|
||||
) {
|
||||
const decodedRange = this.getDecodedSheetRange(range);
|
||||
// prettier-ignore
|
||||
const keyRowRange = `${decodedRange.name}!${decodedRange.start?.column || ''}${keyRowIndex + 1}:${decodedRange.end?.column || ''}${keyRowIndex + 1}`;
|
||||
const keyRowRange = `${decodedRange.name}!${decodedRange.start?.column ?? ''}${keyRowIndex + 1}:${decodedRange.end?.column ?? ''}${keyRowIndex + 1}`;
|
||||
|
||||
const sheetDatakeyRow = columnNamesList || (await this.getData(keyRowRange, valueRenderMode));
|
||||
const sheetDatakeyRow = columnNamesList ?? (await this.getData(keyRowRange, valueRenderMode));
|
||||
|
||||
if (sheetDatakeyRow === undefined) {
|
||||
throw new NodeOperationError(
|
||||
@@ -466,7 +466,7 @@ export class GoogleSheet {
|
||||
}
|
||||
|
||||
const columnValues: Array<string | number> =
|
||||
columnValuesList ||
|
||||
columnValuesList ??
|
||||
(await this.getColumnValues(range, keyIndex, dataStartRowIndex, valueRenderMode));
|
||||
|
||||
const updateData: ISheetUpdateData[] = [];
|
||||
@@ -524,7 +524,7 @@ export class GoogleSheet {
|
||||
// Property exists so add it to the data to update
|
||||
// Get the column name in which the property data can be found
|
||||
const columnToUpdate = this.getColumnWithOffset(
|
||||
decodedRange.start?.column || 'A',
|
||||
decodedRange.start?.column ?? 'A',
|
||||
columnNames.indexOf(name),
|
||||
);
|
||||
|
||||
@@ -637,7 +637,7 @@ export class GoogleSheet {
|
||||
const decodedRange = this.getDecodedSheetRange(range);
|
||||
|
||||
const columnNamesRow =
|
||||
columnNamesList ||
|
||||
columnNamesList ??
|
||||
(await this.getData(
|
||||
`${decodedRange.name}!${keyRowIndex}:${keyRowIndex}`,
|
||||
'UNFORMATTED_VALUE',
|
||||
@@ -701,7 +701,7 @@ export class GoogleSheet {
|
||||
}
|
||||
|
||||
private splitCellRange(cell: string, range: string): SheetCellDecoded {
|
||||
const cellData = cell.match(/([a-zA-Z]{1,10})([0-9]{0,10})/) || [];
|
||||
const cellData = cell.match(/([a-zA-Z]{1,10})([0-9]{0,10})/) ?? [];
|
||||
|
||||
if (cellData === null || cellData.length !== 3) {
|
||||
throw new NodeOperationError(
|
||||
|
||||
Reference in New Issue
Block a user