[ESLint] Prefer named exports (#427)

This commit is contained in:
schroda
2023-10-28 00:32:02 +02:00
committed by GitHub
parent 68e7b4b16d
commit 5a5b12a9e1
118 changed files with 319 additions and 470 deletions

View File

@@ -9,9 +9,9 @@
import { use } from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import resources from '@/i18n/translations';
import { resources } from '@/i18n/translations';
const i18n = use(initReactI18next)
export const i18n = use(initReactI18next)
.use(LanguageDetector)
.init({
resources,
@@ -23,5 +23,3 @@ const i18n = use(initReactI18next)
returnNull: false,
debug: process.env.NODE_ENV !== 'production',
});
export default i18n;

View File

@@ -29,7 +29,7 @@ const translationHelper = <T>(lng: T) => ({
* Keys have to match {@link ISOLanguages} codes, they're used for showing the language name in the dropdown in the {@link Settings}.<br/>
* In case there is no language code for the key in {@link ISOLanguages}, the corresponding language has to be added
*/
const resources = {
export const resources = {
ar: translationHelper(ar),
de: translationHelper(de),
es: translationHelper(es),
@@ -45,5 +45,3 @@ const resources = {
'zh-Hans': translationHelper(zh_Hans),
'zh-Hant': translationHelper(zh_Hant),
} as const;
export default resources;