Skip to content

Commit

Permalink
Linter for Issue #53, #56.
Browse files Browse the repository at this point in the history
  • Loading branch information
demmings committed Mar 21, 2024
1 parent c2ed7a7 commit 5519faa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions dist/gssql.js
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ class Table { // skipcq: JS-0128
this.tableData = TableData.loadTableData(namedRange, cacheSeconds);

if (!this.hasColumnTitle) {
this.addColumnLetters(this.tableData);
Table.addColumnLetters(this.tableData);
}

Logger.log(`Load Data: Range=${namedRange}. Items=${this.tableData.length}`);
Expand All @@ -1334,7 +1334,7 @@ class Table { // skipcq: JS-0128
return this;

if (!this.hasColumnTitle) {
this.addColumnLetters(tableData);
Table.addColumnLetters(tableData);
}

this.tableData = Table.removeEmptyRecordsAtEndOfTable(tableData);
Expand Down Expand Up @@ -1366,7 +1366,7 @@ class Table { // skipcq: JS-0128
* @param {any[][]} tableData - table data that does not currently contain a first row with column names.
* @returns {any[][]} - updated table data that includes a column title row.
*/
addColumnLetters(tableData) {
static addColumnLetters(tableData) {
if (tableData.length === 0)
return [[]];

Expand Down Expand Up @@ -4020,8 +4020,8 @@ class ConglomerateRecord {

const aggTableColumnNames = aggTable.tableData[0];
for (let i = 0; i < aggTableColumnNames.length; i++) {
let oldName = SelectTables.toUpperCaseExceptQuoted(virtualFields[i].columnName, true);
let newName = aggTableColumnNames[i];
const oldName = SelectTables.toUpperCaseExceptQuoted(virtualFields[i].columnName, true);
const newName = aggTableColumnNames[i];
mappedField.push({ oldName, newName });
}

Expand All @@ -4047,7 +4047,7 @@ class ConglomerateRecord {
* @param {Object[]} mappedField
*/
static replaceFieldNames(calcFunc, mappedField) {
for (let item of mappedField) {
for (const item of mappedField) {
calcFunc = calcFunc.replaceAll(item.oldName, item.newName);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Table { // skipcq: JS-0128
this.tableData = TableData.loadTableData(namedRange, cacheSeconds);

if (!this.hasColumnTitle) {
this.addColumnLetters(this.tableData);
Table.addColumnLetters(this.tableData);
}

Logger.log(`Load Data: Range=${namedRange}. Items=${this.tableData.length}`);
Expand All @@ -93,7 +93,7 @@ class Table { // skipcq: JS-0128
return this;

if (!this.hasColumnTitle) {
this.addColumnLetters(tableData);
Table.addColumnLetters(tableData);
}

this.tableData = Table.removeEmptyRecordsAtEndOfTable(tableData);
Expand Down Expand Up @@ -125,7 +125,7 @@ class Table { // skipcq: JS-0128
* @param {any[][]} tableData - table data that does not currently contain a first row with column names.
* @returns {any[][]} - updated table data that includes a column title row.
*/
addColumnLetters(tableData) {
static addColumnLetters(tableData) {
if (tableData.length === 0)
return [[]];

Expand Down
6 changes: 3 additions & 3 deletions src/Views.js
Original file line number Diff line number Diff line change
Expand Up @@ -2249,8 +2249,8 @@ class ConglomerateRecord {

const aggTableColumnNames = aggTable.tableData[0];
for (let i = 0; i < aggTableColumnNames.length; i++) {
let oldName = SelectTables.toUpperCaseExceptQuoted(virtualFields[i].columnName, true);
let newName = aggTableColumnNames[i];
const oldName = SelectTables.toUpperCaseExceptQuoted(virtualFields[i].columnName, true);
const newName = aggTableColumnNames[i];
mappedField.push({ oldName, newName });
}

Expand All @@ -2276,7 +2276,7 @@ class ConglomerateRecord {
* @param {Object[]} mappedField
*/
static replaceFieldNames(calcFunc, mappedField) {
for (let item of mappedField) {
for (const item of mappedField) {
calcFunc = calcFunc.replaceAll(item.oldName, item.newName);
}

Expand Down

0 comments on commit 5519faa

Please sign in to comment.