Skip to content

Commit

Permalink
Ensure all eslint no-used-vars ignores are compatible with JS
Browse files Browse the repository at this point in the history
Adds to / completes 3fe7dca
  • Loading branch information
Philzen committed Aug 10, 2022
1 parent 9b73d8d commit 6cf7230
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
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 @@ -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 }
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 @@ -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: {
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 @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,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
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 @@ -23,7 +23,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

0 comments on commit 6cf7230

Please sign in to comment.