mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
addin' comments to silence eslint 🍤
This commit is contained in:
committed by
Alec LaLonde
parent
264cd692fc
commit
308304455c
2
packages/@types/3box/index.d.ts
vendored
2
packages/@types/3box/index.d.ts
vendored
@@ -64,5 +64,5 @@ declare module '3box' {
|
||||
username: string;
|
||||
};
|
||||
}
|
||||
export async function openBox(ethAddress: string, web3: any): Promise<Box>;
|
||||
export async function openBox(ethAddress: string, web3: unknown): Promise<Box>;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ const parseMergedIdentityId = (alias: SCAlias) => {
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Unable to parse merged identity: ', {
|
||||
error: e.message,
|
||||
alias,
|
||||
@@ -64,6 +65,7 @@ const parseAlias = (alias: SCAlias) => {
|
||||
identifier,
|
||||
};
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Unable to parse alias: ', { error: e.message, alias });
|
||||
return null;
|
||||
}
|
||||
@@ -163,6 +165,7 @@ export const migrateSourceCredAccounts = async (
|
||||
on_conflict: accountOnConflict,
|
||||
});
|
||||
} catch (accErr) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
'Error updating accounts for Player',
|
||||
playerId,
|
||||
@@ -172,6 +175,7 @@ export const migrateSourceCredAccounts = async (
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('ERR! failed to update player', e);
|
||||
return player;
|
||||
}
|
||||
@@ -207,6 +211,7 @@ export const migrateSourceCredAccounts = async (
|
||||
numInserted: usersToInsert.length,
|
||||
});
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('Error migrating players/accounts', e.message);
|
||||
res.sendStatus(500);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ export async function updateVerifiedAccounts(
|
||||
if (result.insert_player_account?.affected_rows) {
|
||||
updatedProfiles.push('github');
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`Unable to insert Github user ${verifiedAccounts.github.username} for playerId ${playerId}`,
|
||||
);
|
||||
@@ -50,6 +51,7 @@ export async function updateVerifiedAccounts(
|
||||
if (result.insert_player_account?.affected_rows) {
|
||||
updatedProfiles.push('twitter');
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`Unable to insert Twitter user ${verifiedAccounts.twitter.username} for playerId ${playerId}`,
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface TriggerPayload<T = any> {
|
||||
export interface TriggerPayload<T = unknown> {
|
||||
event: {
|
||||
session_variables: { [x: string]: string };
|
||||
op: 'INSERT' | 'UPDATE' | 'DELETE' | 'MANUAL';
|
||||
|
||||
@@ -14,5 +14,6 @@ app.use(router);
|
||||
app.use(errorMiddleware);
|
||||
|
||||
app.listen(CONFIG.port, () => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`Listening on port ${CONFIG.port}`);
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Box from '3box';
|
||||
|
||||
declare const window: any;
|
||||
declare const window: Record<string, unknown>;
|
||||
|
||||
export async function Load3BoxUrl(account: string, url: string) {
|
||||
return async function(dispatch: any) {
|
||||
return async (dispatch: (unknown) => void): Promise<void> => {
|
||||
try {
|
||||
dispatch({ type: 'LOADING', value: true });
|
||||
|
||||
@@ -15,15 +15,15 @@ export async function Load3BoxUrl(account: string, url: string) {
|
||||
dispatch({ type: 'LOADED_3BOX_URL', data: data ? JSON.parse(data) : [] });
|
||||
dispatch({ type: 'LOADING', value: false });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
dispatch({ type: 'LOADED_3BOX_URL', data: [] });
|
||||
dispatch({ type: 'LOADING', value: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function Save3BoxUrl(account: string, url: string, data: any) {
|
||||
return async function(dispatch: any) {
|
||||
export async function Save3BoxUrl(account: string, url: string, data: unknown) {
|
||||
return async (dispatch: (unknown) => void): Promise<void> => {
|
||||
try {
|
||||
const box = await Box.openBox(account, window.ethereum);
|
||||
await box.syncDone;
|
||||
@@ -32,7 +32,7 @@ export async function Save3BoxUrl(account: string, url: string, data: any) {
|
||||
|
||||
dispatch({ type: 'SAVED_3BOX_URL' });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
dispatch({ type: 'SAVED_3BOX_URL_ERROR' });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ export async function verifyToken(
|
||||
}
|
||||
return claim;
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Token verification failed', e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ export const Web3ContextProvider: React.FC<Web3ContextProviderOptions> = ({
|
||||
setIsConnected(true);
|
||||
if (resetUrqlClient) resetUrqlClient();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.log(error); // eslint-disable-line no-console
|
||||
setIsConnecting(false);
|
||||
disconnect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user