chore: 规范不符合eslint校验规则的代码

This commit is contained in:
Siyu Kong
2023-02-21 18:29:27 +08:00
parent 2ec6978400
commit f2f564dc0c
24 changed files with 127 additions and 97 deletions

View File

@ -41,6 +41,7 @@ export const useI18n = (
const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => {
if (!key) return ''
if (!key.includes('.') && !namespace) return key
//@ts-ignore
return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters))
}
return {

View File

@ -5,6 +5,7 @@ const TIME_AGO_MESSAGE_MAP: {
'zh-CN': UseTimeAgoMessages
en: UseTimeAgoMessages
} = {
// @ts-ignore
'zh-CN': {
justNow: '刚刚',
past: (n) => (n.match(/\d/) ? `${n}` : n),
@ -17,6 +18,7 @@ const TIME_AGO_MESSAGE_MAP: {
minute: (n) => `${n} 分钟`,
second: (n) => `${n}`
},
// @ts-ignore
en: {
justNow: 'just now',
past: (n) => (n.match(/\d/) ? `${n} ago` : n),