diff options
author | crupest <crupest@outlook.com> | 2022-03-09 16:40:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 16:40:01 +0800 |
commit | 331c238b337d9d8f7b4e051712a95f45548debf5 (patch) | |
tree | 847291747cf353a194e36c0307458c1eccdd663d | |
parent | 8b3d9516676eb5accafa3e5ba70ce8ad2582159d (diff) | |
parent | ff046d001ba7b9ab784d2aa1a917536c56f23f8c (diff) | |
download | timeline-331c238b337d9d8f7b4e051712a95f45548debf5.tar.gz timeline-331c238b337d9d8f7b4e051712a95f45548debf5.tar.bz2 timeline-331c238b337d9d8f7b4e051712a95f45548debf5.zip |
Merge pull request #1098 from crupest/dependabot/npm_and_yarn/FrontEnd/typescript-eslint/eslint-plugin-5.14.0
build(deps-dev): Bump @typescript-eslint/eslint-plugin from 5.12.1 to 5.14.0 in /FrontEnd
-rw-r--r-- | FrontEnd/package.json | 2 | ||||
-rw-r--r-- | FrontEnd/src/i18n.ts | 4 | ||||
-rw-r--r-- | FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx | 5 | ||||
-rw-r--r-- | FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/FrontEnd/package.json b/FrontEnd/package.json index 1295295a..d839b670 100644 --- a/FrontEnd/package.json +++ b/FrontEnd/package.json @@ -56,7 +56,7 @@ "@types/react-responsive": "^8.0.5",
"@types/react-transition-group": "^4.4.4",
"@types/remarkable": "^2.0.3",
- "@typescript-eslint/eslint-plugin": "^5.12.1",
+ "@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"@vitejs/plugin-react-refresh": "^1.3.6",
"eslint": "^8.10.0",
diff --git a/FrontEnd/src/i18n.ts b/FrontEnd/src/i18n.ts index 5f71c7ea..6a38e5b4 100644 --- a/FrontEnd/src/i18n.ts +++ b/FrontEnd/src/i18n.ts @@ -4,7 +4,7 @@ import { initReactI18next } from "react-i18next"; const backend: BackendModule = { type: "backend", - async read(language, namespace, callback) { + read(language, namespace, callback) { function error(message: string): void { callback(new Error(message), false); } @@ -36,7 +36,7 @@ const backend: BackendModule = { })(); if (promise) { - success((await promise).default); + void promise.then((d) => success(d.default)); } }, init() {}, // eslint-disable-line @typescript-eslint/no-empty-function diff --git a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx index 0eb9f53d..a3a8f408 100644 --- a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx +++ b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-no-undef */ import React from "react"; import classnames from "classnames"; import { useTranslation } from "react-i18next"; @@ -118,7 +117,9 @@ const MarkdownPostEdit: React.FC<MarkdownPostEditProps> = ({ } }} /> - {canSend && <FlatButton text="timeline.send" onClick={send} />} + {canSend && ( + <FlatButton text="timeline.send" onClick={() => void send()} /> + )} </div> ) } diff --git a/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx b/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx index f19f7785..cd61b4a7 100644 --- a/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx +++ b/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx @@ -254,7 +254,7 @@ const TimelinePostEdit: React.FC<TimelinePostEditProps> = (props) => { </PopupMenu> </div> <LoadingButton - onClick={onSend} + onClick={() => void onSend()} disabled={!canSend} loading={process} > |