From 3138cc3fdb04b3aded3f8ed6ab6e92b857c47694 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 7 Aug 2024 14:49:18 +0200 Subject: [PATCH] Work around new linting rules; Autoformatting --- src/apps/Analysis/state.ts | 1 + src/apps/Map/types.ts | 4 ++-- src/pages/Home/Berlin.tsx | 1 + src/pages/Reports/apiservice.ts | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/apps/Analysis/state.ts b/src/apps/Analysis/state.ts index a5823e408..e983328da 100644 --- a/src/apps/Analysis/state.ts +++ b/src/apps/Analysis/state.ts @@ -107,6 +107,7 @@ export function loadProjectData( try { const endPoint = `${config.apiUrl}/projects?page_size=500`; + // @ts-expect-error this was fine before, new TS seems to be more strict const { results } = await ky.get(endPoint, { timeout: 200000 }).json(); dispatch({ diff --git a/src/apps/Map/types.ts b/src/apps/Map/types.ts index 33e718d9d..1e19b40b6 100644 --- a/src/apps/Map/types.ts +++ b/src/apps/Map/types.ts @@ -14,8 +14,8 @@ import { export type Side = typeof LEFT_SIDE | typeof RIGHT_SIDE | typeof BOTH_SIDES; export type HBISide = { - label: typeof HBI_STOPS[number]['label']; - color: typeof HBI_STOPS[number]['color']; + label: (typeof HBI_STOPS)[number]['label']; + color: (typeof HBI_STOPS)[number]['color']; level?: HBILevel; }; diff --git a/src/pages/Home/Berlin.tsx b/src/pages/Home/Berlin.tsx index 858804640..1fe8ed6b2 100644 --- a/src/pages/Home/Berlin.tsx +++ b/src/pages/Home/Berlin.tsx @@ -1,3 +1,4 @@ +/* eslint-disable jsx-a11y/control-has-associated-label */ import React from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; diff --git a/src/pages/Reports/apiservice.ts b/src/pages/Reports/apiservice.ts index 261710317..819035a2e 100644 --- a/src/pages/Reports/apiservice.ts +++ b/src/pages/Reports/apiservice.ts @@ -77,7 +77,7 @@ export const STATUS = // The type of any array item can be accessed using an array index, by // generalizing over all possible array indices we get all possible item types -export type Status = typeof STATUS[number]; +export type Status = (typeof STATUS)[number]; type SubmitReportResponse = any;