ESLint parity with the Browsertrix repo (#288)
This copies the rules from the Browsertrix repo, and uses [`suppress-eslint-errors`](https://www.npmjs.com/package/suppress-eslint-errors) to suppose the violations. I'll take a pass at cleaning this up at some point in the future, and let's do our best to address these in the future as we come across them :) This'll help ensure new code being added to this repo is held to the same standard as code in Browsertrix's frontend.
This commit is contained in:
@@ -31,6 +31,8 @@ class GDrive extends LitElement {
|
||||
if (changedProperties.has("sourceUrl")) {
|
||||
this.error = false;
|
||||
this.state = "trypublic";
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.tryPublicAccess().then((result) => {
|
||||
if (!result) {
|
||||
this.state = "tryauto";
|
||||
@@ -67,6 +69,8 @@ class GDrive extends LitElement {
|
||||
try {
|
||||
const abort = new AbortController();
|
||||
const signal = abort.signal;
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
resp = await fetch(publicUrl, { signal });
|
||||
abort.abort();
|
||||
if (resp.status != 200) {
|
||||
@@ -99,6 +103,8 @@ class GDrive extends LitElement {
|
||||
this.state = "trymanual";
|
||||
}
|
||||
} else {
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.authed(response);
|
||||
}
|
||||
});
|
||||
@@ -107,6 +113,8 @@ class GDrive extends LitElement {
|
||||
onClickAuth() {
|
||||
this.gauth("select_account", (response) => {
|
||||
if (!response.error) {
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.authed(response);
|
||||
}
|
||||
});
|
||||
@@ -201,6 +209,8 @@ class GDrive extends LitElement {
|
||||
response_type: "token",
|
||||
prompt,
|
||||
},
|
||||
// TODO: Fix this the next time the file is edited.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
callback,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user