Merge pull request #13506 from Budibase/chore/remove-disabling-nounusedvars

Remove disabling no-unused-vars eslint comments
This commit is contained in:
Adria Navarro 2024-04-17 16:07:43 +02:00 committed by GitHub
commit 76ef50a95c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 29 additions and 38 deletions

View File

@ -42,7 +42,15 @@
},
"rules": {
"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"
}
},
@ -59,7 +67,15 @@
},
"rules": {
"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/email-domain-example-com": "error",
"no-console": "warn",
@ -89,7 +105,8 @@
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"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.
* @param repeat serves no purpose for the import queue.
*/
// eslint-disable-next-line no-unused-vars
async add(data: any, opts?: JobOptions) {
const jobId = opts?.jobId?.toString()
if (jobId && this._queuedJobIds.has(jobId)) {
@ -166,8 +165,7 @@ class InMemoryQueue implements Partial<Queue> {
return []
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async removeJobs(pattern: string) {
async removeJobs(_pattern: string) {
// no-op
}

View File

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

View File

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

View File

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

View File

@ -105,7 +105,6 @@ export function getAppService(path: string) {
}
export function updateDockerComposeService(
// eslint-disable-next-line no-unused-vars
updateFn: (service: DockerCompose) => void
) {
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
* @param definition
*/
// eslint-disable-next-line no-unused-vars
determineFeatureFlags(definition) {
determineFeatureFlags(_definition) {
return {
supportsSearch: 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) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { automationId, ...fieldParams } = inputs.automation
if (await features.isTriggerAutomationRunEnabled()) {

View File

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

View File

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

View File

@ -35,7 +35,6 @@ export function init() {
// 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
// back in.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { helpers, snippets, ...rest } = ctx
return vm.withContext(rest, () => vm.execute(js))
} catch (error: any) {

View File

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

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
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async onDisconnect(socket: Socket) {
async onDisconnect(_socket: Socket) {
// Override
}

View File

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

View File

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

View File

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

View File

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