Skip to content

Commit

Permalink
Fix eslint errors manually
Browse files Browse the repository at this point in the history
disable assignmentExpression for arrays in prefer-destructuring rule
  • Loading branch information
edmundito committed Jun 10, 2022
1 parent 7389500 commit 1f96fe2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
13 changes: 8 additions & 5 deletions airbyte-webapp/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"object-shorthand": ["warn", "always"],
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-destructuring": ["warn", { "AssignmentExpression": { "array": true } }],
"prefer-object-spread": "warn",
"prefer-template": "warn",
"yoda": "warn",
Expand Down Expand Up @@ -69,10 +69,13 @@
"@typescript-eslint/consistent-indexed-object-style": ["warn", "record"],
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
"@typescript-eslint/no-unused-vars": "warn",
"react/function-component-definition": ["warn", {
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}],
"react/function-component-definition": [
"warn",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-boolean-value": "warn",
"react/jsx-curly-brace-presence": "warn",
"react/jsx-fragments": "warn",
Expand Down
2 changes: 1 addition & 1 deletion airbyte-webapp/src/core/request/apiOverride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const apiOverride = async <T, U = unknown>(
const requestUrl = `${apiUrl.replace(/\/v1\/?$/, "")}${url.startsWith("/") ? "" : "/"}${url}`;

for (const middleware of options.middlewares) {
headers = (await middleware({ headers })).headers;
({ headers } = await middleware({ headers }));
}

const response = await fetch(`${requestUrl}${new URLSearchParams(params)}`, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ export const useTestConnector = (
signal: controller.signal,
};
}
} else {
} else if (values) {
// creating new connection
if (values) {
payload = {
connectionConfiguration: values.connectionConfiguration,
signal: controller.signal,
selectedConnectorDefinitionId: values.serviceType,
};
}
payload = {
connectionConfiguration: values.connectionConfiguration,
signal: controller.signal,
selectedConnectorDefinitionId: values.serviceType,
};
}

if (!payload) {
Expand Down

0 comments on commit 1f96fe2

Please sign in to comment.