mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-06-28 09:44:49 +02:00
chore: fix lint issues
This commit is contained in:
parent
cd0ebb3169
commit
256b5cd37c
|
@ -48,8 +48,9 @@ const createDateFormatter: MemoizedDateTimeFormatterFactory = monadicMemoize(
|
|||
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
|
||||
}
|
||||
|
||||
if (format) options = getIntlFormatterOptions('date', format);
|
||||
else if (Object.keys(options).length === 0) {
|
||||
if (format) {
|
||||
options = getIntlFormatterOptions('date', format);
|
||||
} else if (Object.keys(options).length === 0) {
|
||||
options = getIntlFormatterOptions('date', 'short');
|
||||
}
|
||||
|
||||
|
@ -65,8 +66,9 @@ const createTimeFormatter: MemoizedDateTimeFormatterFactory = monadicMemoize(
|
|||
);
|
||||
}
|
||||
|
||||
if (format) options = getIntlFormatterOptions('time', format);
|
||||
else if (Object.keys(options).length === 0) {
|
||||
if (format) {
|
||||
options = getIntlFormatterOptions('time', format);
|
||||
} else if (Object.keys(options).length === 0) {
|
||||
options = getIntlFormatterOptions('time', 'short');
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export function addMessages(locale: string, ...partials: LocaleDictionary[]) {
|
|||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
const $locales = derived([$dictionary], ([dictionary]) =>
|
||||
Object.keys(dictionary),
|
||||
);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable node/global-require */
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
import {
|
||||
|
|
Loading…
Reference in New Issue
Block a user