I receive this lint warning over the following code: the idea here is that the auth provider's default state consists of functions that are implemented later down the code
src\context\auth\AuthProvider.tsx Line 76:17: Unexpected empty method 'Signup' @typescript-eslint/no-empty-function Line 77:17: Unexpected empty method 'Signin' @typescript-eslint/no-empty-function Line 78:18: Unexpected empty method 'SignOut' @typescript-eslint/no-empty-function Line 79:22: Unexpected empty method 'UpdateEmail' @typescript-eslint/no-empty-function Line 80:32: Unexpected empty method 'SendRestPasswordEmail' @typescript-eslint/no-empty-function Line 81:23: Unexpected empty method 'RestPassword' @typescript-eslint/no-empty-function Line 82:29: Unexpected empty method 'UpdatePremiumUntil' @typescript-eslint/no-empty-function Line 83:23: Unexpected empty method 'DeletAccount' @typescript-eslint/no-empty-function
interface AuthState {
Signup: (email: string, password: string, userType: string, privacySettings: PrivacySettings) => void;
Signin: (email: string, password: string) => void;
SignOut: (actionType: SignOutAction) => void;
UpdateEmail: (newEmail: string) => void;
SendRestPasswordEmail: (email: string) => void;
RestPassword: (oobCode: string, newPassword: string) => void;
UpdatePremiumUntil: () => void;
DeletAccount: (
userType: UsersTypes,
uid: string,
password: string,
clientsIds: string[],
profileImage: boolean,
customEquipmentObject: { customData: string[] }
) => void;
}
const defaultState: AuthState = {
Signup: () => {},
Signin: () => {},
SignOut: () => {},
UpdateEmail: () => {},
SendRestPasswordEmail: () => {},
RestPassword: () => {},
UpdatePremiumUntil: () => {},
DeletAccount: () => {},
};
// later on
// Signup with email and password
const Signup = async (email: string, password: string, userType: string, privacySettigns: PrivacySettings) => {
// the implementations
}
// rest of the functions..
Disable linter rules temporarily then: https://eslint.org/docs/latest/use/configure/rules#disabling-rules