Fix all lint errors

This commit is contained in:
Gregory Schier
2024-09-16 08:36:02 -07:00
parent 974ecd511d
commit 2951023ee8
19 changed files with 43 additions and 34 deletions

View File

@@ -37,6 +37,7 @@ export function GraphQLEditor({ defaultValue, onChange, baseRequest, ...extraEdi
const variables = p.variables;
const operationName = p.operationName;
return { query, variables, operationName };
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
return { query: '' };
}
@@ -46,6 +47,7 @@ export function GraphQLEditor({ defaultValue, onChange, baseRequest, ...extraEdi
(b: GraphQLBody) => {
try {
onChange?.(JSON.stringify(b, null, 2));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
// Meh, not much we can do here
}
@@ -62,6 +64,7 @@ export function GraphQLEditor({ defaultValue, onChange, baseRequest, ...extraEdi
(variables: string) => {
try {
handleChange({ query, variables: JSON.parse(variables || '{}') });
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
// Don't do anything if invalid JSON. The user probably hasn't finished
// typing yet.