[ESLint] Prefer named exports (#427)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user