chore: fix lint issues

This commit is contained in:
Christian Kaisermann 2021-02-15 13:44:58 -03:00
parent cd0ebb3169
commit 256b5cd37c
4 changed files with 1242 additions and 1090 deletions

View File

@ -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');
}

View File

@ -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),
);

View File

@ -1,3 +1,4 @@
/* eslint-disable node/global-require */
import { get } from 'svelte/store';
import {

2319
yarn.lock

File diff suppressed because it is too large Load Diff