aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristian Fehmer <[email protected]>2024-07-22 09:59:26 +0200
committerChristian Fehmer <[email protected]>2024-07-22 09:59:26 +0200
commitbc9cc818d2145cd02df2153a46f99b08489f61ee (patch)
tree7bf6f80558101cafe05b9b60b7188b53b332c071
parentacf8e249b3d95bc06977781b87e8778586443cde (diff)
downloadmonkeytype-bc9cc818d2145cd02df2153a46f99b08489f61ee.tar.gz
monkeytype-bc9cc818d2145cd02df2153a46f99b08489f61ee.zip
ignore type problems on slim-select until new version is released
-rw-r--r--docker/frontend/Dockerfile3
-rw-r--r--frontend/src/ts/elements/account/result-filters.ts7
-rw-r--r--frontend/src/ts/elements/leaderboards.ts2
-rw-r--r--frontend/src/ts/elements/settings/settings-group.ts1
-rw-r--r--frontend/src/ts/elements/test-activity.ts3
-rw-r--r--frontend/src/ts/modals/quote-report.ts1
-rw-r--r--frontend/src/ts/modals/quote-search.ts1
-rw-r--r--frontend/src/ts/modals/quote-submit.ts1
-rw-r--r--frontend/src/ts/modals/user-report.ts1
-rw-r--r--frontend/src/ts/modals/word-filter.ts1
-rw-r--r--frontend/src/ts/pages/settings.ts3
11 files changed, 22 insertions, 2 deletions
diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile
index 1c473781e..76b466227 100644
--- a/docker/frontend/Dockerfile
+++ b/docker/frontend/Dockerfile
@@ -18,8 +18,7 @@ COPY docker/frontend/.env frontend/.env
#BUILD
RUN npm ci
-##TODO: remove ||true
-RUN npm run build || true
+RUN npm run build
# COPY to target
FROM nginx:mainline-alpine
diff --git a/frontend/src/ts/elements/account/result-filters.ts b/frontend/src/ts/elements/account/result-filters.ts
index 075acf4f0..743dd9cea 100644
--- a/frontend/src/ts/elements/account/result-filters.ts
+++ b/frontend/src/ts/elements/account/result-filters.ts
@@ -6,6 +6,7 @@ import Config from "../../config";
import * as Notifications from "../notifications";
import Ape from "../../ape/index";
import * as Loader from "../loader";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import { ResultFilters } from "@monkeytype/shared-types";
import { QuoteLength } from "@monkeytype/shared-types/config";
@@ -823,7 +824,9 @@ export async function appendButtons(
},
events: {
beforeChange: (
+ // @ts-expect-error TODO: update slim-select
selectedOptions,
+ // @ts-expect-error TODO: update slim-select
oldSelectedOptions
): void | boolean => {
return selectBeforeChangeFn(
@@ -880,7 +883,9 @@ export async function appendButtons(
},
events: {
beforeChange: (
+ // @ts-expect-error TODO: update slim-select
selectedOptions,
+ // @ts-expect-error TODO: update slim-select
oldSelectedOptions
): void | boolean => {
return selectBeforeChangeFn(
@@ -933,7 +938,9 @@ export async function appendButtons(
},
events: {
beforeChange: (
+ // @ts-expect-error TODO: update slim-select
selectedOptions,
+ // @ts-expect-error TODO: update slim-select
oldSelectedOptions
): void | boolean => {
return selectBeforeChangeFn(
diff --git a/frontend/src/ts/elements/leaderboards.ts b/frontend/src/ts/elements/leaderboards.ts
index 7551c18bd..28bf6a762 100644
--- a/frontend/src/ts/elements/leaderboards.ts
+++ b/frontend/src/ts/elements/leaderboards.ts
@@ -14,6 +14,7 @@ import * as ConnectionState from "../states/connection";
import * as Skeleton from "../utils/skeleton";
import { debounce } from "throttle-debounce";
import Format from "../utils/format";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import { getHtmlByUserFlags } from "../controllers/user-flag-controller";
import { LeaderboardEntry } from "@monkeytype/shared-types";
@@ -702,6 +703,7 @@ export function show(): void {
selected: lang === currentLanguage,
})),
events: {
+ // @ts-expect-error TODO: update slim-select
afterChange: (newVal): void => {
currentLanguage = newVal[0]?.value as string;
updateTitle();
diff --git a/frontend/src/ts/elements/settings/settings-group.ts b/frontend/src/ts/elements/settings/settings-group.ts
index f87e85a4d..83de62dcc 100644
--- a/frontend/src/ts/elements/settings/settings-group.ts
+++ b/frontend/src/ts/elements/settings/settings-group.ts
@@ -1,6 +1,7 @@
import { ConfigValue } from "@monkeytype/shared-types/config";
import Config from "../../config";
import * as Notifications from "../notifications";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
export default class SettingsGroup<T extends ConfigValue> {
diff --git a/frontend/src/ts/elements/test-activity.ts b/frontend/src/ts/elements/test-activity.ts
index 398873c51..634edda71 100644
--- a/frontend/src/ts/elements/test-activity.ts
+++ b/frontend/src/ts/elements/test-activity.ts
@@ -1,4 +1,6 @@
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
+// @ts-expect-error TODO: update slim-select
import type { DataObjectPartial } from "slim-select/dist/store";
import { getTestActivityCalendar } from "../db";
import * as ServerConfiguration from "../ape/server-configuration";
@@ -106,6 +108,7 @@ function getYearSelector(): SlimSelect {
showSearch: false,
},
events: {
+ // @ts-expect-error TODO: update slim-select
afterChange: async (newVal): Promise<void> => {
yearSelector?.disable();
const selected = newVal[0]?.value as string;
diff --git a/frontend/src/ts/modals/quote-report.ts b/frontend/src/ts/modals/quote-report.ts
index 7bb72ae37..54b27b36b 100644
--- a/frontend/src/ts/modals/quote-report.ts
+++ b/frontend/src/ts/modals/quote-report.ts
@@ -5,6 +5,7 @@ import * as Notifications from "../elements/notifications";
import QuotesController from "../controllers/quotes-controller";
import * as CaptchaController from "../controllers/captcha-controller";
import { removeLanguageSize } from "../utils/strings";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import AnimatedModal, { ShowOptions } from "../utils/animated-modal";
import { CharacterCounter } from "../elements/character-counter";
diff --git a/frontend/src/ts/modals/quote-search.ts b/frontend/src/ts/modals/quote-search.ts
index 3f45836a5..38aba982d 100644
--- a/frontend/src/ts/modals/quote-search.ts
+++ b/frontend/src/ts/modals/quote-search.ts
@@ -16,6 +16,7 @@ import { isAuthenticated } from "../firebase";
import { debounce } from "throttle-debounce";
import Ape from "../ape";
import * as Loader from "../elements/loader";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import * as TestState from "../test/test-state";
import AnimatedModal, { ShowOptions } from "../utils/animated-modal";
diff --git a/frontend/src/ts/modals/quote-submit.ts b/frontend/src/ts/modals/quote-submit.ts
index 370c4eb28..6589f4aa9 100644
--- a/frontend/src/ts/modals/quote-submit.ts
+++ b/frontend/src/ts/modals/quote-submit.ts
@@ -5,6 +5,7 @@ import * as CaptchaController from "../controllers/captcha-controller";
import * as Strings from "../utils/strings";
import * as JSONData from "../utils/json-data";
import Config from "../config";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import AnimatedModal, { ShowOptions } from "../utils/animated-modal";
import { CharacterCounter } from "../elements/character-counter";
diff --git a/frontend/src/ts/modals/user-report.ts b/frontend/src/ts/modals/user-report.ts
index 400fc6f54..7a3aa1ee7 100644
--- a/frontend/src/ts/modals/user-report.ts
+++ b/frontend/src/ts/modals/user-report.ts
@@ -2,6 +2,7 @@ import Ape from "../ape";
import * as Loader from "../elements/loader";
import * as Notifications from "../elements/notifications";
import * as CaptchaController from "../controllers/captcha-controller";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import AnimatedModal from "../utils/animated-modal";
import { isAuthenticated } from "../firebase";
diff --git a/frontend/src/ts/modals/word-filter.ts b/frontend/src/ts/modals/word-filter.ts
index 1ff21624e..e954eab02 100644
--- a/frontend/src/ts/modals/word-filter.ts
+++ b/frontend/src/ts/modals/word-filter.ts
@@ -2,6 +2,7 @@ import * as Misc from "../utils/misc";
import * as JSONData from "../utils/json-data";
import * as CustomText from "../test/custom-text";
import * as Notifications from "../elements/notifications";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import AnimatedModal, {
HideOptions,
diff --git a/frontend/src/ts/pages/settings.ts b/frontend/src/ts/pages/settings.ts
index 85a947676..d2f8d54b8 100644
--- a/frontend/src/ts/pages/settings.ts
+++ b/frontend/src/ts/pages/settings.ts
@@ -18,6 +18,7 @@ import { getAuthenticatedUser, isAuthenticated } from "../firebase";
import Ape from "../ape";
import { areFunboxesCompatible } from "../test/funbox/funbox-validation";
import { get as getTypingSpeedUnit } from "../utils/typing-speed-units";
+// @ts-expect-error TODO: update slim-select
import SlimSelect from "slim-select";
import * as Skeleton from "../utils/skeleton";
@@ -548,6 +549,7 @@ async function fillSettingsPage(): Promise<void> {
new SlimSelect({
select: themeSelectLightElement,
events: {
+ // @ts-expect-error TODO: update slim-select
afterChange: (newVal): void => {
UpdateConfig.setThemeLight(newVal[0]?.value as string);
},
@@ -557,6 +559,7 @@ async function fillSettingsPage(): Promise<void> {
new SlimSelect({
select: themeSelectDarkElement,
events: {
+ // @ts-expect-error TODO: update slim-select
afterChange: (newVal): void => {
UpdateConfig.setThemeDark(newVal[0]?.value as string);
},