From e1dac618a8b8929f601c7ec8aca3842c5ebf9d03 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 13 Apr 2020 20:37:36 +0900 Subject: Use plugin:prettier/recommended --- src/background/usecases/SettingUseCase.ts | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/background/usecases/SettingUseCase.ts') diff --git a/src/background/usecases/SettingUseCase.ts b/src/background/usecases/SettingUseCase.ts index 69b4572..ccee227 100644 --- a/src/background/usecases/SettingUseCase.ts +++ b/src/background/usecases/SettingUseCase.ts @@ -1,20 +1,21 @@ -import {inject, injectable} from 'tsyringe'; -import CachedSettingRepository from '../repositories/CachedSettingRepository'; -import SettingData, {DefaultSettingData} from '../../shared/SettingData'; -import Settings from '../../shared/settings/Settings'; -import Notifier from '../presenters/Notifier'; +import { inject, injectable } from "tsyringe"; +import CachedSettingRepository from "../repositories/CachedSettingRepository"; +import SettingData, { DefaultSettingData } from "../../shared/SettingData"; +import Settings from "../../shared/settings/Settings"; +import Notifier from "../presenters/Notifier"; import SettingRepository from "../repositories/SettingRepository"; @injectable() export default class SettingUseCase { - constructor( - @inject("LocalSettingRepository") private localSettingRepository: SettingRepository, - @inject("SyncSettingRepository") private syncSettingRepository: SettingRepository, - @inject("CachedSettingRepository") private cachedSettingRepository: CachedSettingRepository, - @inject("Notifier") private notifier: Notifier, - ) { - } + @inject("LocalSettingRepository") + private localSettingRepository: SettingRepository, + @inject("SyncSettingRepository") + private syncSettingRepository: SettingRepository, + @inject("CachedSettingRepository") + private cachedSettingRepository: CachedSettingRepository, + @inject("Notifier") private notifier: Notifier + ) {} getCached(): Promise { return this.cachedSettingRepository.get(); @@ -42,7 +43,7 @@ export default class SettingUseCase { private async loadSettings(): Promise { const sync = await this.syncSettingRepository.load(); if (sync) { - return sync; + return sync; } const local = await this.localSettingRepository.load(); if (local) { @@ -52,7 +53,7 @@ export default class SettingUseCase { } private showUnableToLoad(e: Error) { - console.error('unable to load settings', e); + console.error("unable to load settings", e); this.notifier.notifyInvalidSettings(() => { browser.runtime.openOptionsPage(); }); -- cgit v1.2.3