Merge branch 'master' into grid-enhancements

This commit is contained in:
Andrew Kingston 2024-04-17 16:28:38 +01:00 committed by GitHub
commit 16128d3079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 36 additions and 44 deletions

View File

@ -42,7 +42,15 @@
}, },
"rules": { "rules": {
"no-unused-vars": "off", "no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"local-rules/no-budibase-imports": "error" "local-rules/no-budibase-imports": "error"
} }
}, },
@ -59,7 +67,15 @@
}, },
"rules": { "rules": {
"no-unused-vars": "off", "no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"local-rules/no-test-com": "error", "local-rules/no-test-com": "error",
"local-rules/email-domain-example-com": "error", "local-rules/email-domain-example-com": "error",
"no-console": "warn", "no-console": "warn",
@ -89,7 +105,8 @@
{ {
"varsIgnorePattern": "^_", "varsIgnorePattern": "^_",
"argsIgnorePattern": "^_", "argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_" "destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": true
} }
], ],
"import/no-relative-packages": "error", "import/no-relative-packages": "error",

@ -1 +1 @@
Subproject commit 328c84234d11d97d840f0eb2c72665b04ba9e4f8 Subproject commit eb7d5da233885c5cffd9c255d3e954d0cd39185e

View File

@ -115,7 +115,6 @@ class InMemoryQueue implements Partial<Queue> {
* a JSON message as this is required by Bull. * a JSON message as this is required by Bull.
* @param repeat serves no purpose for the import queue. * @param repeat serves no purpose for the import queue.
*/ */
// eslint-disable-next-line no-unused-vars
async add(data: any, opts?: JobOptions) { async add(data: any, opts?: JobOptions) {
const jobId = opts?.jobId?.toString() const jobId = opts?.jobId?.toString()
if (jobId && this._queuedJobIds.has(jobId)) { if (jobId && this._queuedJobIds.has(jobId)) {
@ -166,8 +165,7 @@ class InMemoryQueue implements Partial<Queue> {
return [] return []
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars async removeJobs(_pattern: string) {
async removeJobs(pattern: string) {
// no-op // no-op
} }

View File

@ -9,7 +9,6 @@
"", "",
requiredValidator requiredValidator
) )
// eslint-disable-next-line no-unused-vars
const [repeatPassword, _, repeatTouched] = createValidationStore( const [repeatPassword, _, repeatTouched] = createValidationStore(
"", "",
requiredValidator requiredValidator

View File

@ -4,8 +4,6 @@ import {
createDatasourceCreationStore, createDatasourceCreationStore,
} from "./datasourceCreation" } from "./datasourceCreation"
import { get } from "svelte/store" import { get } from "svelte/store"
// eslint-disable-next-line no-unused-vars
import { shouldIntegrationFetchTableNames } from "stores/selectors"
vi.mock("stores/selectors", () => ({ vi.mock("stores/selectors", () => ({
shouldIntegrationFetchTableNames: vi.fn(), shouldIntegrationFetchTableNames: vi.fn(),

View File

@ -1,9 +1,9 @@
import { it, expect, describe, beforeEach, vi } from "vitest" import { it, expect, describe, beforeEach, vi } from "vitest"
import { createOnGoogleAuthStore } from "./onGoogleAuth" import { createOnGoogleAuthStore } from "./onGoogleAuth"
import { writable, get } from "svelte/store" import { writable, get } from "svelte/store"
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line
import { params } from "@roxi/routify" import { params } from "@roxi/routify"
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line
import { integrations } from "stores/builder" import { integrations } from "stores/builder"
import { IntegrationTypes } from "constants/backend" import { IntegrationTypes } from "constants/backend"

View File

@ -105,7 +105,6 @@ export function getAppService(path: string) {
} }
export function updateDockerComposeService( export function updateDockerComposeService(
// eslint-disable-next-line no-unused-vars
updateFn: (service: DockerCompose) => void updateFn: (service: DockerCompose) => void
) { ) {
const opts = ["docker-compose.yaml", "docker-compose.yml"] const opts = ["docker-compose.yaml", "docker-compose.yml"]

View File

@ -348,8 +348,7 @@ export default class DataFetch {
* Determine the feature flag for this datasource definition * Determine the feature flag for this datasource definition
* @param definition * @param definition
*/ */
// eslint-disable-next-line no-unused-vars determineFeatureFlags(_definition) {
determineFeatureFlags(definition) {
return { return {
supportsSearch: false, supportsSearch: false,
supportsSort: false, supportsSort: false,

@ -1 +1 @@
Subproject commit c68183402b8fb17248572006531d5293ffc8a9ac Subproject commit 06b1064f7e2f7cac5d4bef2ee999796a2a1f0f2c

View File

@ -62,7 +62,6 @@ export const definition: AutomationStepSchema = {
} }
export async function run({ inputs }: AutomationStepInput) { export async function run({ inputs }: AutomationStepInput) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { automationId, ...fieldParams } = inputs.automation const { automationId, ...fieldParams } = inputs.automation
if (await features.isTriggerAutomationRunEnabled()) { if (await features.isTriggerAutomationRunEnabled()) {

View File

@ -1,11 +1,8 @@
import { features } from "@budibase/backend-core" import { features } from "@budibase/backend-core"
import env from "./environment" import env from "./environment"
// eslint-disable-next-line no-unused-vars
enum AppFeature { enum AppFeature {
// eslint-disable-next-line no-unused-vars
API = "api", API = "api",
// eslint-disable-next-line no-unused-vars
AUTOMATIONS = "automations", AUTOMATIONS = "automations",
} }

View File

@ -168,8 +168,7 @@ class GoogleSheetsIntegration implements DatasourcePlus {
return "" return ""
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars getStringConcat(_parts: string[]) {
getStringConcat(parts: string[]) {
return "" return ""
} }

View File

@ -35,7 +35,6 @@ export function init() {
// Because we can't pass functions into an Isolate, we remove them from // Because we can't pass functions into an Isolate, we remove them from
// the passed context and rely on the withHelpers() method to add them // the passed context and rely on the withHelpers() method to add them
// back in. // back in.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { helpers, snippets, ...rest } = ctx const { helpers, snippets, ...rest } = ctx
return vm.withContext(rest, () => vm.execute(js)) return vm.withContext(rest, () => vm.execute(js))
} catch (error: any) { } catch (error: any) {

View File

@ -351,7 +351,6 @@ describe("table sdk", () => {
const view: ViewV2 = { const view: ViewV2 = {
...basicView, ...basicView,
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { name, description, ...newTableSchema } = basicTable.schema const { name, description, ...newTableSchema } = basicTable.schema
const result = syncSchema(_.cloneDeep(view), newTableSchema, undefined) const result = syncSchema(_.cloneDeep(view), newTableSchema, undefined)
@ -365,7 +364,6 @@ describe("table sdk", () => {
const view: ViewV2 = { const view: ViewV2 = {
...basicView, ...basicView,
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { description, ...newTableSchema } = { const { description, ...newTableSchema } = {
...basicTable.schema, ...basicTable.schema,
updatedDescription: { updatedDescription: {
@ -450,7 +448,6 @@ describe("table sdk", () => {
hiddenField: { visible: false }, hiddenField: { visible: false },
}, },
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { name, description, ...newTableSchema } = basicTable.schema const { name, description, ...newTableSchema } = basicTable.schema
const result = syncSchema(_.cloneDeep(view), newTableSchema, undefined) const result = syncSchema(_.cloneDeep(view), newTableSchema, undefined)
@ -474,7 +471,6 @@ describe("table sdk", () => {
hiddenField: { visible: false }, hiddenField: { visible: false },
}, },
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { name, description, ...newTableSchema } = { const { name, description, ...newTableSchema } = {
...basicTable.schema, ...basicTable.schema,
newField1: { newField1: {
@ -506,7 +502,6 @@ describe("table sdk", () => {
hiddenField: { visible: false }, hiddenField: { visible: false },
}, },
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { description, ...newTableSchema } = { const { description, ...newTableSchema } = {
...basicTable.schema, ...basicTable.schema,
updatedDescription: { updatedDescription: {

View File

@ -374,14 +374,16 @@ class Orchestrator {
for (let [innerObject, innerValue] of Object.entries( for (let [innerObject, innerValue] of Object.entries(
originalStepInput[key][innerKey] originalStepInput[key][innerKey]
)) { )) {
if (typeof innerValue === "string") {
originalStepInput[key][innerKey][innerObject] = originalStepInput[key][innerKey][innerObject] =
automationUtils.substituteLoopStep( automationUtils.substituteLoopStep(
innerValue as string, innerValue,
`steps.${loopStepNumber}` `steps.${loopStepNumber}`
) )
} }
} }
} }
}
} else { } else {
if (typeof value === "string") { if (typeof value === "string") {
originalStepInput[key] = originalStepInput[key] =
@ -458,7 +460,6 @@ class Orchestrator {
inputs, inputs,
step.schema.inputs step.schema.inputs
) )
try { try {
// appId is always passed // appId is always passed
const outputs = await stepFn({ const outputs = await stepFn({

View File

@ -262,13 +262,11 @@ export class BaseSocket {
} }
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars async onConnect(_socket: Socket) {
async onConnect(socket: Socket) {
// Override // Override
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars async onDisconnect(_socket: Socket) {
async onDisconnect(socket: Socket) {
// Override // Override
} }

View File

@ -4,7 +4,6 @@ export const PostProcessorNames = {
CONVERT_LITERALS: "convert-literals", CONVERT_LITERALS: "convert-literals",
} }
/* eslint-disable no-unused-vars */
class Postprocessor { class Postprocessor {
name: string name: string
private fn: any private fn: any

View File

@ -9,7 +9,6 @@ export const PreprocessorNames = {
FINALISE: "finalise", FINALISE: "finalise",
} }
/* eslint-disable no-unused-vars */
class Preprocessor { class Preprocessor {
name: string name: string
private fn: any private fn: any

View File

@ -704,7 +704,6 @@ describe("scim", () => {
expect(response).toEqual({ expect(response).toEqual({
Resources: expect.arrayContaining( Resources: expect.arrayContaining(
groups.map(g => { groups.map(g => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { members, ...groupData } = g const { members, ...groupData } = g
return groupData return groupData
}) })
@ -724,7 +723,6 @@ describe("scim", () => {
expect(response).toEqual({ expect(response).toEqual({
Resources: expect.arrayContaining( Resources: expect.arrayContaining(
groups.map(g => { groups.map(g => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { members, displayName, ...groupData } = g const { members, displayName, ...groupData } = g
return groupData return groupData
}) })
@ -874,7 +872,6 @@ describe("scim", () => {
qs: "excludedAttributes=members", qs: "excludedAttributes=members",
}) })
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { members, ...expectedResponse } = group const { members, ...expectedResponse } = group
expect(response).toEqual(expectedResponse) expect(response).toEqual(expectedResponse)

View File

@ -1,7 +1,6 @@
import { features } from "@budibase/backend-core" import { features } from "@budibase/backend-core"
import env from "./environment" import env from "./environment"
// eslint-disable-next-line no-unused-vars
enum WorkerFeature {} enum WorkerFeature {}
const featureList: WorkerFeature[] = features.processFeatureEnvVar( const featureList: WorkerFeature[] = features.processFeatureEnvVar(