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 | fccd6b4ca8ed7420f25f0c4298fde311bc1e09d0 (patch) | |
tree | 787cda66f8997ba842601a261a36b6de95398675 /Timeline/ClientApp/src/i18n.ts | |
parent | 92e50c4a3ea250dc18c76bc8c29d86d486e63772 (diff) | |
download | timeline-fccd6b4ca8ed7420f25f0c4298fde311bc1e09d0.tar.gz timeline-fccd6b4ca8ed7420f25f0c4298fde311bc1e09d0.tar.bz2 timeline-fccd6b4ca8ed7420f25f0c4298fde311bc1e09d0.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();
}
);
}
|