Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid non-autofixable ESLint errors in code generated around dbAuth #6061

Merged
merged 12 commits into from
Apr 27, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ResetPasswordPage = ({ resetToken }: { resetToken: string }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const passwordRef = useRef<HTMLInputElement>(null)
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type RedwoodUser = Record<string, unknown> & { 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<RedwoodUser> => {
if (!decoded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type RedwoodUser = Record<string, unknown> & { 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<RedwoodUser> => {
if (!decoded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ 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 no-unused-vars, @typescript-eslint/no-unused-vars
handler: ({ username, hashedPassword, salt, userAttributes }) => {
return db.user.create({
data: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type RedwoodUser = Record<string, unknown> & { 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<RedwoodUser> => {
if (!decoded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -766,7 +766,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -1254,7 +1254,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -1742,7 +1742,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -2362,7 +2362,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -2850,7 +2850,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const secretRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -3343,7 +3343,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const passwordRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -3838,7 +3838,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const passwordRef = useRef(null)
useEffect(() => {
Expand Down Expand Up @@ -4333,7 +4333,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const passwordRef = useRef(null)
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ResetPasswordPage = ({ resetToken }: { resetToken: string }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const ${passwordCamelCase}Ref = useRef<HTMLInputElement>(null)
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ type RedwoodUser = Record<string, unknown> & { 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 */
req?: { event: APIGatewayEvent, context: Context }
): Promise<RedwoodUser | null> => {
if (!decoded) {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/global.web-auto-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare global {

type GraphQLOperationVariables = Record<string, any>

/* 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,
Expand Down