diff --git a/.yarn/cache/typescript-npm-5.4.5-8568a42232-53c879c6fa.zip b/.yarn/cache/typescript-npm-5.4.5-8568a42232-53c879c6fa.zip deleted file mode 100644 index a84ee9078d..0000000000 Binary files a/.yarn/cache/typescript-npm-5.4.5-8568a42232-53c879c6fa.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-5.6.3-cc9b3687b0-ba302f8822.zip b/.yarn/cache/typescript-npm-5.6.3-cc9b3687b0-ba302f8822.zip new file mode 100644 index 0000000000..feac5f41f6 Binary files /dev/null and b/.yarn/cache/typescript-npm-5.6.3-cc9b3687b0-ba302f8822.zip differ diff --git a/.yarn/cache/typescript-patch-6609a90948-ade87bce23.zip b/.yarn/cache/typescript-patch-6609a90948-ade87bce23.zip new file mode 100644 index 0000000000..8c492947d5 Binary files /dev/null and b/.yarn/cache/typescript-patch-6609a90948-ade87bce23.zip differ diff --git a/.yarn/cache/typescript-patch-75f7179b67-2373c693f3.zip b/.yarn/cache/typescript-patch-75f7179b67-2373c693f3.zip deleted file mode 100644 index 7a3890fb27..0000000000 Binary files a/.yarn/cache/typescript-patch-75f7179b67-2373c693f3.zip and /dev/null differ diff --git a/apps/web/package.json b/apps/web/package.json index ea10eee4f9..b94825c711 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -136,7 +136,7 @@ "tailwindcss": "^3.4.15", "tailwindcss-animate": "^1.0.7", "ts-unused-exports": "^10.1.0", - "typescript": "^5.4.5" + "typescript": "^5.6.3" }, "packageManager": "yarn@3.6.1", "engines": { diff --git a/apps/web/src/components/equations-app/equation-task.tsx b/apps/web/src/components/equations-app/equation-task.tsx index 4f61eeea32..7961e215f5 100644 --- a/apps/web/src/components/equations-app/equation-task.tsx +++ b/apps/web/src/components/equations-app/equation-task.tsx @@ -794,7 +794,7 @@ function findActions( } return op }) - .filter((x) => x !== null) as Action[] + .filter((x) => x !== null) } } throw new Error('invalid input') diff --git a/apps/web/src/components/equations-app/equations-app-v2.tsx b/apps/web/src/components/equations-app/equations-app-v2.tsx index bc2387a47a..4e5aa695a0 100644 --- a/apps/web/src/components/equations-app/equations-app-v2.tsx +++ b/apps/web/src/components/equations-app/equations-app-v2.tsx @@ -138,7 +138,7 @@ function readSolved() { sessionStorage.getItem('serlo_gleichungs_app_solved') ?? '[]' ) if (Array.isArray(state) && state.every((x) => typeof x === 'number')) { - return state as number[] + return state } return [] } catch (e) { diff --git a/apps/web/src/components/equations-app/equations-app.tsx b/apps/web/src/components/equations-app/equations-app.tsx index eafb1c879b..07200b0725 100644 --- a/apps/web/src/components/equations-app/equations-app.tsx +++ b/apps/web/src/components/equations-app/equations-app.tsx @@ -963,7 +963,7 @@ function findActions( } return op }) - .filter((x) => x !== null) as Action[] + .filter((x) => x !== null) } } throw new Error('invalid input') diff --git a/apps/web/src/fetcher/create-breadcrumbs.tsx b/apps/web/src/fetcher/create-breadcrumbs.tsx index 209bd50359..157c77b28e 100644 --- a/apps/web/src/fetcher/create-breadcrumbs.tsx +++ b/apps/web/src/fetcher/create-breadcrumbs.tsx @@ -59,9 +59,7 @@ export function taxonomyParentsToRootToBreadcrumbsData( // get the subject from the secondary menu data so we link to the correct landing pages const subject = secondaryMenus.find( - // this is probably a bug in our code, but for now we ignore it: - // eslint-disable-next-line no-constant-binary-expression - (menu) => menu.rootId === breadcrumbs[0]?.id ?? term.id + (menu) => menu.rootId === (breadcrumbs[0]?.id || term.id) ) if (subject) { diff --git a/apps/web/src/pages/___exercise_folder_dashboard/[id].tsx b/apps/web/src/pages/___exercise_folder_dashboard/[id].tsx index a4af0b0e6c..c652006f97 100644 --- a/apps/web/src/pages/___exercise_folder_dashboard/[id].tsx +++ b/apps/web/src/pages/___exercise_folder_dashboard/[id].tsx @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons' @@ -235,8 +233,8 @@ export default function Page() { Gesamtquote:{' '} {( - (data.versions[start].solved! / - data.versions[start].visits!) * + (data.versions[start].solved / + data.versions[start].visits) * 100 ).toFixed(2)} % @@ -246,7 +244,7 @@ export default function Page() { data.versions[start].medianTimeCount !== undefined && ( Median Arbeitszeit:{' '} - {Math.round(data.versions[start].medianTime! / 1000 / 60)}{' '} + {Math.round(data.versions[start].medianTime / 1000 / 60)}{' '} min ({data.versions[start].medianTimeCount}) )} @@ -269,8 +267,8 @@ export default function Page() { Gesamtquote:{' '} {( - (data.versions[end].solved! / - data.versions[end].visits!) * + (data.versions[end].solved / + data.versions[end].visits) * 100 ).toFixed(2)} % @@ -280,7 +278,7 @@ export default function Page() { data.versions[end].medianTimeCount !== undefined && ( Median Arbeitszeit:{' '} - {Math.round(data.versions[end].medianTime! / 1000 / 60)}{' '} + {Math.round(data.versions[end].medianTime / 1000 / 60)}{' '} min ({data.versions[end].medianTimeCount}) )} @@ -328,6 +326,7 @@ export default function Page() { ){' '} {renderSolved( + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument entry.__id, data.versions[i].start, data.versions[i].end, @@ -360,7 +359,8 @@ export default function Page() { )
{entry.children - ? entry.children.map((child: any) => { + ? // eslint-disable-next-line @typescript-eslint/no-unsafe-call + entry.children.map((child: any) => { return (
Teilaufgabe {child.__id} (
@@ -382,6 +382,7 @@ export default function Page() {
){' '}
{renderSolved(
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
child.__id,
data.versions[i].start,
data.versions[i].end,
diff --git a/e2e-tests/tsconfig.json b/e2e-tests/tsconfig.json
index a87ba62fe8..393337d61b 100644
--- a/e2e-tests/tsconfig.json
+++ b/e2e-tests/tsconfig.json
@@ -3,8 +3,8 @@
"files": true
},
"compilerOptions": {
- "target": "es2018",
- "lib": ["es2018", "DOM"],
+ "target": "ES2018",
+ "lib": ["ES2018", "DOM"],
"esModuleInterop": true,
"module": "commonjs",
"strictNullChecks": false,
diff --git a/packages/editor/package.json b/packages/editor/package.json
index 0b9ca57ea8..83a4b312d7 100644
--- a/packages/editor/package.json
+++ b/packages/editor/package.json
@@ -124,7 +124,7 @@
"ts-debounce": "^4.0.0",
"ts-jest": "^29.2.5",
"ts-key-enum": "^2.0.13",
- "typescript": "^5.4.5",
+ "typescript": "^5.6.3",
"uuid": "^11.0.3",
"vite": "^5.4.11",
"vite-plugin-dts": "4.3.0",
diff --git a/packages/editor/src/core/sub-document/editor.tsx b/packages/editor/src/core/sub-document/editor.tsx
index af66371001..6c5d7de067 100644
--- a/packages/editor/src/core/sub-document/editor.tsx
+++ b/packages/editor/src/core/sub-document/editor.tsx
@@ -124,6 +124,7 @@ export function SubDocumentEditor({ id, pluginProps }: SubDocumentProps) {
const defaultConfig =
typeof plugin.config === 'function' ? plugin.config() : plugin.config
const overrideConfig = (pluginProps && pluginProps.config) || {}
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const config = R.mergeDeepRight(defaultConfig, overrideConfig)
const onChange = (
@@ -153,6 +154,7 @@ export function SubDocumentEditor({ id, pluginProps }: SubDocumentProps) {
const isInlineChildEditor =
Object.hasOwn(config, 'isInlineChildEditor') &&
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(config.isInlineChildEditor as boolean)
const isTemplatePlugin = document.plugin.startsWith('type-')
@@ -176,6 +178,7 @@ export function SubDocumentEditor({ id, pluginProps }: SubDocumentProps) {
containerRef={containerRef}
id={id}
focused={focused}
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
config={config}
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
state={state}
diff --git a/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/blank.ts b/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/blank.ts
index 3069699f75..91dca66b38 100644
--- a/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/blank.ts
+++ b/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/blank.ts
@@ -23,7 +23,7 @@ export function isBlankActive(editor: SlateEditor) {
export function getBlankElement(editor: SlateEditor): Blank | undefined {
const [match] = Array.from(SlateEditor.nodes(editor, { match: matchBlanks }))
- return match && (match[0] as Blank)
+ return match && match[0]
}
export function toggleBlank(editor: SlateEditor) {
diff --git a/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/link.ts b/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/link.ts
index 65d499decc..e430ca937e 100644
--- a/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/link.ts
+++ b/packages/editor/src/editor-ui/plugin-toolbar/text-controls/utils/link.ts
@@ -13,7 +13,7 @@ export function isLinkActive(editor: SlateEditor) {
export function getLinkElement(editor: SlateEditor): Link | undefined {
const [match] = Array.from(SlateEditor.nodes(editor, { match: matchLinks }))
- return match && (match[0] as Link)
+ return match && match[0]
}
export function toggleLink(editor: SlateEditor) {
diff --git a/packages/editor/src/plugins/box/renderer.tsx b/packages/editor/src/plugins/box/renderer.tsx
index ddfd9b2c12..a6cd5c7a18 100644
--- a/packages/editor/src/plugins/box/renderer.tsx
+++ b/packages/editor/src/plugins/box/renderer.tsx
@@ -51,7 +51,7 @@ export function BoxRenderer({
const isAttention = boxType === 'attention'
const icon = boxTypeIcons[boxType] ? (
-