From 9546dc2aa39ab096ccc723786e718a739d0bdaf9 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Thu, 27 Jan 2022 00:17:22 +0100 Subject: refactor: Coding conventions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that files have a default import with the same name as the file whenever possible to reduce surprise. Also shuffles around some file names for better legibility. Signed-off-by: Kristóf Marussy --- packages/main/src/stores/GlobalSettings.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'packages/main/src/stores/GlobalSettings.ts') diff --git a/packages/main/src/stores/GlobalSettings.ts b/packages/main/src/stores/GlobalSettings.ts index 1eb13b3..0a54aa3 100644 --- a/packages/main/src/stores/GlobalSettings.ts +++ b/packages/main/src/stores/GlobalSettings.ts @@ -19,18 +19,24 @@ */ import { - globalSettings as originalGlobalSettings, + GlobalSettings as GlobalSettingsBase, ThemeSource, } from '@sophie/shared'; import { Instance } from 'mobx-state-tree'; -export const globalSettings = originalGlobalSettings.actions((self) => ({ +const GlobalSettings = GlobalSettingsBase.actions((self) => ({ setThemeSource(mode: ThemeSource): void { self.themeSource = mode; }, })); -export interface GlobalSettings extends Instance {} +/* + eslint-disable-next-line @typescript-eslint/no-redeclare -- + Intentionally naming the type the same as the store definition. +*/ +interface GlobalSettings extends Instance {} + +export default GlobalSettings; export type { GlobalSettingsSnapshotIn, -- cgit v1.2.3-70-g09d2