From 5c972f4510fe1e2b9c2430f5a189fedb077caeb5 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Fri, 21 Jan 2022 17:50:16 +0000 Subject: [PATCH] Lint ignoring lint for entire query support files, rather than just ignoring a specific line --- packages/builder/cypress/support/commands.js | 9 ++++---- .../support/queryLevelTransformerFunction.js | 14 ++++++------ .../queryLevelTransformerFunctionWithData.js | 22 +++++++++---------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index c7237a7bdc..c735f03747 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -422,13 +422,14 @@ Cypress.Commands.add("addDatasourceConfig", (datasource, skipFetch) => { // Click to fetch tables if (skipFetch) { cy.get(".spectrum-Dialog-grid").within(() => { - cy.get(".spectrum-Button").contains("Skip table fetch") + cy.get(".spectrum-Button") + .contains("Skip table fetch") .click({ force: true }) }) - } - else { + } else { cy.get(".spectrum-Dialog-grid").within(() => { - cy.get(".spectrum-Button").contains("Save and fetch tables") + cy.get(".spectrum-Button") + .contains("Save and fetch tables") .click({ force: true }) cy.wait(1000) }) diff --git a/packages/builder/cypress/support/queryLevelTransformerFunction.js b/packages/builder/cypress/support/queryLevelTransformerFunction.js index c92f6e22b7..34cf1a0352 100644 --- a/packages/builder/cypress/support/queryLevelTransformerFunction.js +++ b/packages/builder/cypress/support/queryLevelTransformerFunction.js @@ -1,13 +1,13 @@ -// eslint-disable-next-line +/* eslint-disable */ const breweries = data const totals = {} -for (let brewery of breweries) - {const state = brewery.state - if (totals[state] == null) - {totals[state] = 1 - } else - {totals[state]++ +for (let brewery of breweries) { + const state = brewery.state + if (totals[state] == null) { + totals[state] = 1 + } else { + totals[state]++ } } const entries = Object.entries(totals) diff --git a/packages/builder/cypress/support/queryLevelTransformerFunctionWithData.js b/packages/builder/cypress/support/queryLevelTransformerFunctionWithData.js index d3f3b949ff..7b537e5774 100644 --- a/packages/builder/cypress/support/queryLevelTransformerFunctionWithData.js +++ b/packages/builder/cypress/support/queryLevelTransformerFunctionWithData.js @@ -1,16 +1,16 @@ -// eslint-disable-next-line +/* eslint-disable */ const breweries = data const totals = {} -for (let brewery of breweries) - {const state = brewery.state - if (totals[state] == null) - {totals[state] = 1 - } else - {totals[state]++ +for (let brewery of breweries) { + const state = brewery.state + if (totals[state] == null) { + totals[state] = 1 + } else { + totals[state]++ } } -const stateCodes = - {texas: "tx", +const stateCodes = { + texas: "tx", colorado: "co", florida: "fl", iwoa: "ia", @@ -25,7 +25,7 @@ const stateCodes = ohio: "oh", } const entries = Object.entries(totals) -return entries.map(([state, count]) => - {stateCodes[state.toLowerCase()] +return entries.map(([state, count]) => { + stateCodes[state.toLowerCase()] return { state, count, flag: "http://flags.ox3.in/svg/us/${stateCode}.svg" } })