feat: add pre commit hook to lint frontend & fix warnings

This commit is contained in:
Jordan Knott
2020-08-23 12:27:56 -05:00
committed by Jordan Knott
parent 8ce19a1ceb
commit 46e724e731
46 changed files with 256 additions and 730 deletions

View File

@ -81,7 +81,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward })
}
}
if (networkError) {
console.log(`[Network error]: ${networkError}`);
console.log(`[Network error]: ${networkError}`); // eslint-disable-line no-console
}
return undefined;
});
@ -122,12 +122,13 @@ const client = new ApolloClient({
link: ApolloLink.from([
onError(({ graphQLErrors, networkError }) => {
if (graphQLErrors) {
graphQLErrors.forEach(({ message, locations, path }) =>
console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`),
graphQLErrors.forEach(
({ message, locations, path }) =>
console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`), // eslint-disable-line no-console
);
}
if (networkError) {
console.log(`[Network error]: ${networkError}`);
console.log(`[Network error]: ${networkError}`); // eslint-disable-line no-console
}
}),
errorLink,