From 6cf723006d5d47d0e4799904919020d2023f4d70 Mon Sep 17 00:00:00 2001 From: Philzen Date: Wed, 10 Aug 2022 22:43:12 +0200 Subject: [PATCH] Ensure all eslint `no-used-vars` ignores are compatible with JS Adds to / completes 3fe7dca57df8eaadda4185bfe6170b6733aebddc --- .../cli/src/commands/setup/auth/templates/auth.ts.template | 4 ++-- .../commands/setup/auth/templates/auth0.auth.ts.template | 4 ++-- .../auth/templates/azureActiveDirectory.auth.ts.template | 4 ++-- .../commands/setup/auth/templates/clerk.auth.ts.template | 4 ++-- .../setup/auth/templates/dbAuth.function.ts.template | 2 +- .../commands/setup/auth/templates/firebase.auth.ts.template | 6 +++--- .../setup/auth/templates/magicLink.auth.js.template | 4 ++-- .../graphql-server/src/functions/__tests__/fixtures/auth.ts | 4 ++-- packages/web/src/global.web-auto-imports.ts | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/cli/src/commands/setup/auth/templates/auth.ts.template b/packages/cli/src/commands/setup/auth/templates/auth.ts.template index 08a3810c1266..589b5fad5af7 100644 --- a/packages/cli/src/commands/setup/auth/templates/auth.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/auth.ts.template @@ -29,9 +29,9 @@ type RedwoodUser = Record & { roles?: string[] } */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ): Promise => { if (!decoded) { diff --git a/packages/cli/src/commands/setup/auth/templates/auth0.auth.ts.template b/packages/cli/src/commands/setup/auth/templates/auth0.auth.ts.template index 5ff855643497..39f122e2a7cd 100644 --- a/packages/cli/src/commands/setup/auth/templates/auth0.auth.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/auth0.auth.ts.template @@ -29,9 +29,9 @@ type RedwoodUser = Record & { roles?: string[] } */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ): Promise => { if (!decoded) { diff --git a/packages/cli/src/commands/setup/auth/templates/azureActiveDirectory.auth.ts.template b/packages/cli/src/commands/setup/auth/templates/azureActiveDirectory.auth.ts.template index 746408fbe26b..880b1b30000e 100644 --- a/packages/cli/src/commands/setup/auth/templates/azureActiveDirectory.auth.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/azureActiveDirectory.auth.ts.template @@ -21,9 +21,9 @@ import { AuthenticationError, ForbiddenError } from '@redwoodjs/graphql-server' */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ) => { return { ...decoded, roles: parseJWT({ decoded }).roles } diff --git a/packages/cli/src/commands/setup/auth/templates/clerk.auth.ts.template b/packages/cli/src/commands/setup/auth/templates/clerk.auth.ts.template index afdb7d78ed2c..bb675b7b7b64 100644 --- a/packages/cli/src/commands/setup/auth/templates/clerk.auth.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/clerk.auth.ts.template @@ -17,9 +17,9 @@ import { logger } from 'src/lib/logger' */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ) => { if (!decoded) { diff --git a/packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template b/packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template index 61b243cd0e3e..11f5ddcd387e 100644 --- a/packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template @@ -110,7 +110,7 @@ export const handler = async ( // If this returns anything else, it will be returned by the // `signUp()` function in the form of: `{ message: 'String here' }`. - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars handler: ({ username, hashedPassword, salt, userAttributes }) => { return db.user.create({ data: { diff --git a/packages/cli/src/commands/setup/auth/templates/firebase.auth.ts.template b/packages/cli/src/commands/setup/auth/templates/firebase.auth.ts.template index d3f2a16c29e5..cc8200aeefe8 100644 --- a/packages/cli/src/commands/setup/auth/templates/firebase.auth.ts.template +++ b/packages/cli/src/commands/setup/auth/templates/firebase.auth.ts.template @@ -2,7 +2,7 @@ import admin from 'firebase-admin' import { AuthenticationError } from '@redwoodjs/graphql-server' -// eslint-disable-next-line @typescript-eslint/no-unused-vars +// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars const adminApp = admin.initializeApp({ projectId: process.env.FIREBASE_PROJECT_ID, }) @@ -25,9 +25,9 @@ const adminApp = admin.initializeApp({ */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ) => { return decoded diff --git a/packages/cli/src/commands/setup/auth/templates/magicLink.auth.js.template b/packages/cli/src/commands/setup/auth/templates/magicLink.auth.js.template index bc473fa67215..129b82f1d5ab 100644 --- a/packages/cli/src/commands/setup/auth/templates/magicLink.auth.js.template +++ b/packages/cli/src/commands/setup/auth/templates/magicLink.auth.js.template @@ -18,9 +18,9 @@ import { AuthenticationError } from '@redwoodjs/graphql-server' */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ) => { const { proof, claim } = decoded diff --git a/packages/graphql-server/src/functions/__tests__/fixtures/auth.ts b/packages/graphql-server/src/functions/__tests__/fixtures/auth.ts index 7c7700603754..1b881e01819a 100644 --- a/packages/graphql-server/src/functions/__tests__/fixtures/auth.ts +++ b/packages/graphql-server/src/functions/__tests__/fixtures/auth.ts @@ -33,9 +33,9 @@ type RedwoodUser = Record & { roles?: string[] } */ export const getCurrentUser = async ( decoded, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { token, type }, - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ + /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */ { event, context } ): Promise => { // if (!decoded) { diff --git a/packages/web/src/global.web-auto-imports.ts b/packages/web/src/global.web-auto-imports.ts index 6c8a756e5514..50bca84a3ea1 100644 --- a/packages/web/src/global.web-auto-imports.ts +++ b/packages/web/src/global.web-auto-imports.ts @@ -23,7 +23,7 @@ declare global { type GraphQLOperationVariables = Record - /* eslint-disable @typescript-eslint/no-unused-vars */ + /* eslint-disable no-unused-vars, @typescript-eslint/no-unused-vars */ // Overridable graphQL hook return types interface QueryOperationResult< TData = any,