From 0e6ea060c517733ab8ec417512000bfab4ce1cef Mon Sep 17 00:00:00 2001 From: nyne Date: Wed, 4 Jun 2025 20:23:17 +0800 Subject: [PATCH] Fix article formatting by replacing newline characters in resource details --- frontend/eslint.config.js | 2 +- frontend/src/pages/resource_details_page.tsx | 2 +- frontend/tsconfig.app.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 037f340..f721dd2 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -16,7 +16,7 @@ export default tseslint.config( ], files: ["**/*.{ts,tsx}"], languageOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, globals: globals.browser, }, plugins: { diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index db31e3b..a8a949a 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -494,7 +494,7 @@ function Article({ resource }: { resource: ResourceDetails }) { }, }} > - {resource.article} + {resource.article.replaceAll("\n", " \n")} ); diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index 358ca9b..803dbea 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -1,9 +1,9 @@ { "compilerOptions": { "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - "target": "ES2020", + "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true,