Upgrade prettier before it will be removed forever

This commit is contained in:
SleepWalker
2020-05-20 19:35:52 +03:00
parent 39576c0480
commit 2d903f96fc
108 changed files with 422 additions and 547 deletions

View File

@@ -3,7 +3,7 @@ import i18n from 'app/services/i18n';
import { ThunkAction } from 'app/reducers';
export function setLocale(desiredLocale: string): ThunkAction<Promise<string>> {
return async dispatch => {
return async (dispatch) => {
const locale = i18n.detectLanguage(desiredLocale);
dispatch(_setLocale(locale));

View File

@@ -15,7 +15,7 @@ const SUPPORTED_LANGUAGES: string[] = Object.keys(supportedLocales);
export default {
getCountryList(): string[] {
return SUPPORTED_LANGUAGES.map(
locale => localeToCountryCode[locale] || locale,
(locale) => localeToCountryCode[locale] || locale,
);
},
@@ -29,9 +29,9 @@ export default {
*/
getIconUrl(locale: string): string {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const mod = require(`flag-icon-css/flags/4x3/${localeToCountryCode[
locale
] || locale}.svg`);
const mod = require(`flag-icon-css/flags/4x3/${
localeToCountryCode[locale] || locale
}.svg`);
return mod.default || mod;
},

View File

@@ -10,7 +10,7 @@ const defaultState: State = {
locale: i18n.detectLanguage(),
};
export default function(
export default function (
state: State = defaultState,
{ type, payload }: Action,
): State {