diff options
author | crupest <crupest@outlook.com> | 2020-06-04 00:18:50 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-04 00:18:50 +0800 |
commit | 3aa87cc26fd58836b82c067b58a47e08e30a7784 (patch) | |
tree | ba9cf1918d210896ab10bed484a8ddf7c7935e0c /Timeline/ClientApp/src/i18n.ts | |
parent | 1e90a93049cd57098608de72f02bfaabfadd32b6 (diff) | |
download | timeline-3aa87cc26fd58836b82c067b58a47e08e30a7784.tar.gz timeline-3aa87cc26fd58836b82c067b58a47e08e30a7784.tar.bz2 timeline-3aa87cc26fd58836b82c067b58a47e08e30a7784.zip |
refactor(front): Make codes lint-clean!
Diffstat (limited to 'Timeline/ClientApp/src/i18n.ts')
-rw-r--r-- | Timeline/ClientApp/src/i18n.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Timeline/ClientApp/src/i18n.ts b/Timeline/ClientApp/src/i18n.ts index 9f3a0801..a752cfa4 100644 --- a/Timeline/ClientApp/src/i18n.ts +++ b/Timeline/ClientApp/src/i18n.ts @@ -6,8 +6,7 @@ const backend: BackendModule = { type: 'backend',
async read(language, namespace, callback) {
function error(message: string): void {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- callback(new Error(message), false as any);
+ callback(new Error(message), false);
}
function success(result: ResourceKey): void {
@@ -37,7 +36,7 @@ const backend: BackendModule = { }
},
init() {}, // eslint-disable-line @typescript-eslint/no-empty-function
- create() {} // eslint-disable-line @typescript-eslint/no-empty-function
+ create() {}, // eslint-disable-line @typescript-eslint/no-empty-function
};
export const i18nPromise = i18n
@@ -51,8 +50,8 @@ export const i18nPromise = i18n debug: process.env.NODE_ENV === 'development',
interpolation: {
- escapeValue: false // not needed for react!!
- }
+ escapeValue: false, // not needed for react!!
+ },
// react i18next special options (optional)
// override if needed - omit if ok with defaults
@@ -72,7 +71,7 @@ if (module.hot) { module.hot.accept(
['./locales/en/translation', './locales/zh/translation'],
() => {
- i18n.reloadResources();
+ void i18n.reloadResources();
}
);
}
|