diff options
32 files changed, 45 insertions, 47 deletions
diff --git a/src/I18n.tsx b/src/I18n.tsx index b486758c3..5f725eebc 100644 --- a/src/I18n.tsx +++ b/src/I18n.tsx | |||
@@ -2,7 +2,7 @@ import { Component, ReactNode } from 'react'; | |||
2 | import { inject, observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
3 | import { IntlProvider } from 'react-intl'; | 3 | import { IntlProvider } from 'react-intl'; |
4 | 4 | ||
5 | import { generatedTranslations } from './i18n/translations'; | 5 | import generatedTranslations from './i18n/translations'; |
6 | import UserStore from './stores/UserStore'; | 6 | import UserStore from './stores/UserStore'; |
7 | import AppStore from './stores/AppStore'; | 7 | import AppStore from './stores/AppStore'; |
8 | 8 | ||
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts index d7cc9b810..c6e3c0ed8 100644 --- a/src/api/apiBase.ts +++ b/src/api/apiBase.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | import { fixUrl } from '../helpers/url-helpers'; | 13 | import { fixUrl } from '../helpers/url-helpers'; |
14 | 14 | ||
15 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window | 15 | // Note: This cannot be used from the internal-server since we are not running within the context of a browser window |
16 | const apiBase = (withVersion = true) => { | 16 | export default function apiBase(withVersion = true) { |
17 | if ( | 17 | if ( |
18 | !(window as any).ferdium || | 18 | !(window as any).ferdium || |
19 | !(window as any).ferdium.stores.settings || | 19 | !(window as any).ferdium.stores.settings || |
@@ -33,8 +33,6 @@ const apiBase = (withVersion = true) => { | |||
33 | return fixUrl(withVersion ? `${url}/${API_VERSION}` : url); | 33 | return fixUrl(withVersion ? `${url}/${API_VERSION}` : url); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | export default apiBase; | ||
37 | |||
38 | export function serverBase() { | 36 | export function serverBase() { |
39 | 37 | ||
40 | const serverType = (window as any).ferdium.stores.settings.all.app.server; | 38 | const serverType = (window as any).ferdium.stores.settings.all.app.server; |
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts index 935d7de3d..a636f3e0d 100644 --- a/src/api/server/ServerApi.ts +++ b/src/api/server/ServerApi.ts | |||
@@ -19,7 +19,7 @@ import RecipePreviewModel from '../../models/RecipePreview'; | |||
19 | import RecipeModel from '../../models/Recipe'; | 19 | import RecipeModel from '../../models/Recipe'; |
20 | import UserModel from '../../models/User'; | 20 | import UserModel from '../../models/User'; |
21 | 21 | ||
22 | import { sleep } from '../../helpers/async-helpers'; | 22 | import sleep from '../../helpers/async-helpers'; |
23 | 23 | ||
24 | import { SERVER_NOT_LOADED } from '../../config'; | 24 | import { SERVER_NOT_LOADED } from '../../config'; |
25 | import { userDataRecipesPath, userDataPath } from '../../environment-remote'; | 25 | import { userDataRecipesPath, userDataPath } from '../../environment-remote'; |
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js index 18b506eba..830501ac3 100644 --- a/src/components/auth/Welcome.js +++ b/src/components/auth/Welcome.js | |||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; | |||
4 | import { observer, PropTypes as MobxPropTypes, inject } from 'mobx-react'; | 4 | import { observer, PropTypes as MobxPropTypes, inject } from 'mobx-react'; |
5 | import { defineMessages, injectIntl } from 'react-intl'; | 5 | import { defineMessages, injectIntl } from 'react-intl'; |
6 | import serverlessLogin from '../../helpers/serverless-helpers'; | 6 | import serverlessLogin from '../../helpers/serverless-helpers'; |
7 | import { shuffleArray } from '../../helpers/array-helpers'; | 7 | import shuffleArray from '../../helpers/array-helpers'; |
8 | import { serverName } from '../../api/apiBase'; | 8 | import { serverName } from '../../api/apiBase'; |
9 | 9 | ||
10 | import Link from '../ui/Link'; | 10 | import Link from '../ui/Link'; |
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx index e80371e47..caa7e381d 100644 --- a/src/components/ui/AppLoader/index.tsx +++ b/src/components/ui/AppLoader/index.tsx | |||
@@ -3,7 +3,7 @@ import classnames from 'classnames'; | |||
3 | 3 | ||
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle from 'react-jss'; |
5 | import FullscreenLoader from '../FullscreenLoader'; | 5 | import FullscreenLoader from '../FullscreenLoader'; |
6 | import { shuffleArray } from '../../../helpers/array-helpers'; | 6 | import shuffleArray from '../../../helpers/array-helpers'; |
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index 05d511a81..5ab19bf74 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js | |||
@@ -5,7 +5,7 @@ import { RouterStore } from 'mobx-react-router'; | |||
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | import { oneOrManyChildElements } from '../../prop-types'; | 7 | import { oneOrManyChildElements } from '../../prop-types'; |
8 | import { matchRoute } from '../../helpers/routing-helpers'; | 8 | import matchRoute from '../../helpers/routing-helpers'; |
9 | import { openExternalUrl } from '../../helpers/url-helpers'; | 9 | import { openExternalUrl } from '../../helpers/url-helpers'; |
10 | 10 | ||
11 | // Should this file be converted into the coding style similar to './toggle/index.tsx'? | 11 | // Should this file be converted into the coding style similar to './toggle/index.tsx'? |
diff --git a/src/containers/auth/SetupAssistantScreen.tsx b/src/containers/auth/SetupAssistantScreen.tsx index f7a353f26..b286d7cac 100644 --- a/src/containers/auth/SetupAssistantScreen.tsx +++ b/src/containers/auth/SetupAssistantScreen.tsx | |||
@@ -3,7 +3,7 @@ import { Component, ReactElement } from 'react'; | |||
3 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
4 | 4 | ||
5 | import { StoresProps } from 'src/@types/ferdium-components.types'; | 5 | import { StoresProps } from 'src/@types/ferdium-components.types'; |
6 | import { sleep } from '../../helpers/async-helpers'; | 6 | import sleep from '../../helpers/async-helpers'; |
7 | import SetupAssistant from '../../components/auth/SetupAssistant'; | 7 | import SetupAssistant from '../../components/auth/SetupAssistant'; |
8 | 8 | ||
9 | class SetupAssistantScreen extends Component<StoresProps> { | 9 | class SetupAssistantScreen extends Component<StoresProps> { |
diff --git a/src/electron/windowUtils.ts b/src/electron/windowUtils.ts index 9c9fd1b77..3621beb2f 100644 --- a/src/electron/windowUtils.ts +++ b/src/electron/windowUtils.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { screen } from 'electron'; | 1 | import { screen } from 'electron'; |
2 | 2 | ||
3 | export function isPositionValid(position: { x: number; y: number }): boolean { | 3 | export default function isPositionValid(position: { x: number; y: number }): boolean { |
4 | const displays = screen.getAllDisplays(); | 4 | const displays = screen.getAllDisplays(); |
5 | const { x, y } = position; | 5 | const { x, y } = position; |
6 | return displays.some( | 6 | return displays.some( |
diff --git a/src/enforce-macos-app-location.ts b/src/enforce-macos-app-location.ts index 3661d08a5..222127acf 100644 --- a/src/enforce-macos-app-location.ts +++ b/src/enforce-macos-app-location.ts | |||
@@ -4,7 +4,7 @@ import { isMac } from './environment'; | |||
4 | import { isDevMode } from './environment-remote'; | 4 | import { isDevMode } from './environment-remote'; |
5 | import { api } from './electron-util'; | 5 | import { api } from './electron-util'; |
6 | 6 | ||
7 | export function enforceMacOSAppLocation(): void { | 7 | export default function enforceMacOSAppLocation(): void { |
8 | if (isDevMode || !isMac || api.app.isInApplicationsFolder()) { | 8 | if (isDevMode || !isMac || api.app.isInApplicationsFolder()) { |
9 | return; | 9 | return; |
10 | } | 10 | } |
diff --git a/src/features/communityRecipes/store.ts b/src/features/communityRecipes/store.ts index 73eaae8b4..34e6cd92c 100644 --- a/src/features/communityRecipes/store.ts +++ b/src/features/communityRecipes/store.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { computed } from 'mobx'; | 1 | import { computed } from 'mobx'; |
2 | import { FeatureStore } from '../utils/FeatureStore'; | 2 | import FeatureStore from '../utils/FeatureStore'; |
3 | 3 | ||
4 | const debug = require('../../preload-safe-debug')('Ferdium:feature:communityRecipes:store'); | 4 | const debug = require('../../preload-safe-debug')('Ferdium:feature:communityRecipes:store'); |
5 | 5 | ||
diff --git a/src/features/todos/store.js b/src/features/todos/store.js index b5228191c..1a3d6c1e7 100644 --- a/src/features/todos/store.js +++ b/src/features/todos/store.js | |||
@@ -12,7 +12,7 @@ import { | |||
12 | DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER, | 12 | DEFAULT_IS_TODO_FEATURE_ENABLED_BY_USER, |
13 | } from '../../config'; | 13 | } from '../../config'; |
14 | import { isValidExternalURL } from '../../helpers/url-helpers'; | 14 | import { isValidExternalURL } from '../../helpers/url-helpers'; |
15 | import { FeatureStore } from '../utils/FeatureStore'; | 15 | import FeatureStore from '../utils/FeatureStore'; |
16 | import { createReactions } from '../../stores/lib/Reaction'; | 16 | import { createReactions } from '../../stores/lib/Reaction'; |
17 | import { createActionBindings } from '../utils/ActionBinding'; | 17 | import { createActionBindings } from '../utils/ActionBinding'; |
18 | import { IPC, TODOS_ROUTES } from './constants'; | 18 | import { IPC, TODOS_ROUTES } from './constants'; |
diff --git a/src/features/utils/FeatureStore.js b/src/features/utils/FeatureStore.js index afe726294..eada332d7 100644 --- a/src/features/utils/FeatureStore.js +++ b/src/features/utils/FeatureStore.js | |||
@@ -1,4 +1,4 @@ | |||
1 | export class FeatureStore { | 1 | export default class FeatureStore { |
2 | _actions = []; | 2 | _actions = []; |
3 | 3 | ||
4 | _reactions = []; | 4 | _reactions = []; |
diff --git a/src/features/workspaces/actions.ts b/src/features/workspaces/actions.ts index 5e7e6e721..b7f8b6b90 100644 --- a/src/features/workspaces/actions.ts +++ b/src/features/workspaces/actions.ts | |||
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; | |||
2 | import Workspace from './models/Workspace'; | 2 | import Workspace from './models/Workspace'; |
3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; | 3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; |
4 | 4 | ||
5 | export const workspaceActions = createActionsFromDefinitions( | 5 | export default createActionsFromDefinitions( |
6 | { | 6 | { |
7 | edit: { | 7 | edit: { |
8 | workspace: PropTypes.instanceOf(Workspace).isRequired, | 8 | workspace: PropTypes.instanceOf(Workspace).isRequired, |
@@ -24,7 +24,5 @@ export const workspaceActions = createActionsFromDefinitions( | |||
24 | openWorkspaceSettings: {}, | 24 | openWorkspaceSettings: {}, |
25 | toggleKeepAllWorkspacesLoadedSetting: {}, | 25 | toggleKeepAllWorkspacesLoadedSetting: {}, |
26 | }, | 26 | }, |
27 | PropTypes.checkPropTypes, | 27 | PropTypes.checkPropTypes |
28 | ); | 28 | ); |
29 | |||
30 | export default workspaceActions; | ||
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index d56945296..3454fdbe9 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js | |||
@@ -10,7 +10,7 @@ import { mdiPlusBox, mdiCog } from '@mdi/js'; | |||
10 | import { H1 } from '../../../components/ui/headline'; | 10 | import { H1 } from '../../../components/ui/headline'; |
11 | import Icon from '../../../components/ui/icon'; | 11 | import Icon from '../../../components/ui/icon'; |
12 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; | 12 | import WorkspaceDrawerItem from './WorkspaceDrawerItem'; |
13 | import { workspaceActions } from '../actions'; | 13 | import workspaceActions from '../actions'; |
14 | import { workspaceStore } from '../index'; | 14 | import { workspaceStore } from '../index'; |
15 | import { | 15 | import { |
16 | getUserWorkspacesRequest, | 16 | getUserWorkspacesRequest, |
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 20d32df67..4fdb3dd15 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -1,8 +1,8 @@ | |||
1 | import { computed, observable, action } from 'mobx'; | 1 | import { computed, observable, action } from 'mobx'; |
2 | import localStorage from 'mobx-localstorage'; | 2 | import localStorage from 'mobx-localstorage'; |
3 | import { matchRoute } from '../../helpers/routing-helpers'; | 3 | import { matchRoute } from '../../helpers/routing-helpers'; |
4 | import { workspaceActions } from './actions'; | 4 | import workspaceActions from './actions'; |
5 | import { FeatureStore } from '../utils/FeatureStore'; | 5 | import FeatureStore from '../utils/FeatureStore'; |
6 | import { | 6 | import { |
7 | createWorkspaceRequest, | 7 | createWorkspaceRequest, |
8 | deleteWorkspaceRequest, | 8 | deleteWorkspaceRequest, |
diff --git a/src/helpers/array-helpers.ts b/src/helpers/array-helpers.ts index 45ff932ba..5d28af433 100644 --- a/src/helpers/array-helpers.ts +++ b/src/helpers/array-helpers.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | export const shuffleArray = (arr: any[]): any[] => | 1 | export default function shuffleArray(arr: any[]): any[] { |
2 | arr | 2 | return arr |
3 | .map(a => [Math.random(), a]) | 3 | .map(a => [ Math.random(), a ]) |
4 | .sort((a, b) => a[0] - b[0]) | 4 | .sort((a, b) => a[ 0 ] - b[ 0 ]) |
5 | .map(a => a[1]); | 5 | .map(a => a[ 1 ]) |
6 | }; | ||
diff --git a/src/helpers/async-helpers.ts b/src/helpers/async-helpers.ts index 6556a0141..de20ea080 100644 --- a/src/helpers/async-helpers.ts +++ b/src/helpers/async-helpers.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | export function sleep(ms: number = 0): Promise<void> { | 1 | export default function sleep(ms: number = 0): Promise<void> { |
2 | // eslint-disable-next-line no-promise-executor-return | 2 | // eslint-disable-next-line no-promise-executor-return |
3 | return new Promise(r => setTimeout(r, ms)); | 3 | return new Promise(r => setTimeout(r, ms)); |
4 | } | 4 | } |
diff --git a/src/helpers/routing-helpers.ts b/src/helpers/routing-helpers.ts index 46895aa6b..0b9a83df6 100644 --- a/src/helpers/routing-helpers.ts +++ b/src/helpers/routing-helpers.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import RouteParser from 'route-parser'; | 1 | import RouteParser from 'route-parser'; |
2 | 2 | ||
3 | export const matchRoute = (pattern: string, path: string) => | 3 | export default function matchRoute(pattern: string, path: string) { |
4 | new RouteParser(pattern).match(path); | 4 | return new RouteParser(pattern).match(path); |
5 | } | ||
diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index 9b23497e1..99c6e1e80 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* eslint-disable global-require */ | 1 | /* eslint-disable global-require */ |
2 | import { APP_LOCALES } from './languages'; | 2 | import { APP_LOCALES } from './languages'; |
3 | 3 | ||
4 | export const generatedTranslations = () => { | 4 | export default function generatedTranslations() { |
5 | const translations = []; | 5 | const translations = []; |
6 | for (const key of Object.keys(APP_LOCALES)) { | 6 | for (const key of Object.keys(APP_LOCALES)) { |
7 | try { | 7 | try { |
diff --git a/src/index.ts b/src/index.ts index 786b95a69..7ca364a2e 100644 --- a/src/index.ts +++ b/src/index.ts | |||
@@ -17,7 +17,7 @@ import minimist from 'minimist'; | |||
17 | import ms from 'ms'; | 17 | import ms from 'ms'; |
18 | import { EventEmitter } from 'events'; | 18 | import { EventEmitter } from 'events'; |
19 | import { enableWebContents, initializeRemote } from './electron-util'; | 19 | import { enableWebContents, initializeRemote } from './electron-util'; |
20 | import { enforceMacOSAppLocation } from './enforce-macos-app-location'; | 20 | import enforceMacOSAppLocation from './enforce-macos-app-location'; |
21 | 21 | ||
22 | initializeRemote(); | 22 | initializeRemote(); |
23 | 23 | ||
@@ -37,7 +37,7 @@ import Tray from './lib/Tray'; | |||
37 | import DBus from './lib/DBus'; | 37 | import DBus from './lib/DBus'; |
38 | import Settings from './electron/Settings'; | 38 | import Settings from './electron/Settings'; |
39 | import handleDeepLink from './electron/deepLinking'; | 39 | import handleDeepLink from './electron/deepLinking'; |
40 | import { isPositionValid } from './electron/windowUtils'; | 40 | import isPositionValid from './electron/windowUtils'; |
41 | // @ts-expect-error Cannot find module './package.json' or its corresponding type declarations. | 41 | // @ts-expect-error Cannot find module './package.json' or its corresponding type declarations. |
42 | import { appId } from './package.json'; | 42 | import { appId } from './package.json'; |
43 | import './electron/exception'; | 43 | import './electron/exception'; |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 7b048d3fa..49041e43e 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -35,7 +35,7 @@ import { | |||
35 | } from '../environment'; | 35 | } from '../environment'; |
36 | import { ferdiumVersion } from '../environment-remote'; | 36 | import { ferdiumVersion } from '../environment-remote'; |
37 | import { todoActions } from '../features/todos/actions'; | 37 | import { todoActions } from '../features/todos/actions'; |
38 | import { workspaceActions } from '../features/workspaces/actions'; | 38 | import workspaceActions from '../features/workspaces/actions'; |
39 | import { workspaceStore } from '../features/workspaces/index'; | 39 | import { workspaceStore } from '../features/workspaces/index'; |
40 | import apiBase, { serverBase } from '../api/apiBase'; | 40 | import apiBase, { serverBase } from '../api/apiBase'; |
41 | import { openExternalUrl } from '../helpers/url-helpers'; | 41 | import { openExternalUrl } from '../helpers/url-helpers'; |
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts index 8c8454116..b2adb0f02 100644 --- a/src/stores/AppStore.ts +++ b/src/stores/AppStore.ts | |||
@@ -27,7 +27,7 @@ import { | |||
27 | userDataPath, | 27 | userDataPath, |
28 | ferdiumLocale, | 28 | ferdiumLocale, |
29 | } from '../environment-remote'; | 29 | } from '../environment-remote'; |
30 | import { generatedTranslations } from '../i18n/translations'; | 30 | import generatedTranslations from '../i18n/translations'; |
31 | import { getLocale } from '../helpers/i18n-helpers'; | 31 | import { getLocale } from '../helpers/i18n-helpers'; |
32 | 32 | ||
33 | import { | 33 | import { |
@@ -35,7 +35,7 @@ import { | |||
35 | removeServicePartitionDirectory, | 35 | removeServicePartitionDirectory, |
36 | } from '../helpers/service-helpers'; | 36 | } from '../helpers/service-helpers'; |
37 | import { openExternalUrl } from '../helpers/url-helpers'; | 37 | import { openExternalUrl } from '../helpers/url-helpers'; |
38 | import { sleep } from '../helpers/async-helpers'; | 38 | import sleep from '../helpers/async-helpers'; |
39 | 39 | ||
40 | const debug = require('../preload-safe-debug')('Ferdium:AppStore'); | 40 | const debug = require('../preload-safe-debug')('Ferdium:AppStore'); |
41 | 41 | ||
diff --git a/src/stores/RecipesStore.ts b/src/stores/RecipesStore.ts index 00a2bb737..6bd4ab382 100644 --- a/src/stores/RecipesStore.ts +++ b/src/stores/RecipesStore.ts | |||
@@ -8,7 +8,7 @@ import { Actions } from 'src/actions/lib/actions'; | |||
8 | import Recipe from 'src/models/Recipe'; | 8 | import Recipe from 'src/models/Recipe'; |
9 | import CachedRequest from './lib/CachedRequest'; | 9 | import CachedRequest from './lib/CachedRequest'; |
10 | import Request from './lib/Request'; | 10 | import Request from './lib/Request'; |
11 | import { matchRoute } from '../helpers/routing-helpers'; | 11 | import matchRoute from '../helpers/routing-helpers'; |
12 | import { asarRecipesPath } from '../helpers/asar-helpers'; | 12 | import { asarRecipesPath } from '../helpers/asar-helpers'; |
13 | import TypedStore from './lib/TypedStore'; | 13 | import TypedStore from './lib/TypedStore'; |
14 | 14 | ||
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts index 0164d092a..e690b3791 100644 --- a/src/stores/ServicesStore.ts +++ b/src/stores/ServicesStore.ts | |||
@@ -10,7 +10,7 @@ import { ApiInterface } from 'src/api'; | |||
10 | import { Actions } from 'src/actions/lib/actions'; | 10 | import { Actions } from 'src/actions/lib/actions'; |
11 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import matchRoute from '../helpers/routing-helpers'; |
14 | import { isInTimeframe } from '../helpers/schedule-helpers'; | 14 | import { isInTimeframe } from '../helpers/schedule-helpers'; |
15 | import { | 15 | import { |
16 | getRecipeDirectory, | 16 | getRecipeDirectory, |
diff --git a/src/themes/IStyleTypes.ts b/src/themes/IStyleTypes.ts index 48f52daf2..cf8bdea33 100644 --- a/src/themes/IStyleTypes.ts +++ b/src/themes/IStyleTypes.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | export interface IStyleTypes { | 1 | export default interface IStyleTypes { |
2 | [index: string]: { | 2 | [index: string]: { |
3 | accent: string; | 3 | accent: string; |
4 | contrast: string; | 4 | contrast: string; |
diff --git a/src/themes/default/index.ts b/src/themes/default/index.ts index 9e442f60e..2e18e1307 100644 --- a/src/themes/default/index.ts +++ b/src/themes/default/index.ts | |||
@@ -2,7 +2,7 @@ import color from 'color'; | |||
2 | import { cloneDeep } from 'lodash'; | 2 | import { cloneDeep } from 'lodash'; |
3 | 3 | ||
4 | import * as legacyStyles from '../legacy'; | 4 | import * as legacyStyles from '../legacy'; |
5 | import type { IStyleTypes } from '../IStyleTypes'; | 5 | import type IStyleTypes from '../IStyleTypes'; |
6 | 6 | ||
7 | export default (brandPrimary: string) => { | 7 | export default (brandPrimary: string) => { |
8 | if (!brandPrimary) { | 8 | if (!brandPrimary) { |
diff --git a/src/webview/badge.ts b/src/webview/badge.ts index 898f8cdcf..afecd22d4 100644 --- a/src/webview/badge.ts +++ b/src/webview/badge.ts | |||
@@ -2,7 +2,7 @@ import { ipcRenderer } from 'electron'; | |||
2 | 2 | ||
3 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:BadgeHandler'); | 3 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:BadgeHandler'); |
4 | 4 | ||
5 | export class BadgeHandler { | 5 | export default class BadgeHandler { |
6 | // TODO: Need to extract this into a utility class and reuse outside of the recipes | 6 | // TODO: Need to extract this into a utility class and reuse outside of the recipes |
7 | safeParseInt(text: string | number | undefined | null) { | 7 | safeParseInt(text: string | number | undefined | null) { |
8 | if (text === undefined || text === null) { | 8 | if (text === undefined || text === null) { |
diff --git a/src/webview/dialogTitle.ts b/src/webview/dialogTitle.ts index 12e007e26..67b4e5b6b 100644 --- a/src/webview/dialogTitle.ts +++ b/src/webview/dialogTitle.ts | |||
@@ -2,7 +2,7 @@ import { ipcRenderer } from 'electron'; | |||
2 | 2 | ||
3 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:DialogTitleHandler'); | 3 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:DialogTitleHandler'); |
4 | 4 | ||
5 | export class DialogTitleHandler { | 5 | export default class DialogTitleHandler { |
6 | titleCache: { title: string }; | 6 | titleCache: { title: string }; |
7 | 7 | ||
8 | constructor() { | 8 | constructor() { |
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 9d5a97767..3c8a5326f 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -23,9 +23,9 @@ import customDarkModeCss from './darkmode/custom'; | |||
23 | import RecipeWebview from './lib/RecipeWebview'; | 23 | import RecipeWebview from './lib/RecipeWebview'; |
24 | import Userscript from './lib/Userscript'; | 24 | import Userscript from './lib/Userscript'; |
25 | 25 | ||
26 | import { BadgeHandler } from './badge'; | 26 | import BadgeHandler from './badge'; |
27 | import { DialogTitleHandler } from './dialogTitle'; | 27 | import DialogTitleHandler from './dialogTitle'; |
28 | import { SessionHandler } from './sessionHandler'; | 28 | import SessionHandler from './sessionHandler'; |
29 | import contextMenu from './contextMenu'; | 29 | import contextMenu from './contextMenu'; |
30 | import { | 30 | import { |
31 | darkModeStyleExists, | 31 | darkModeStyleExists, |
diff --git a/src/webview/sessionHandler.ts b/src/webview/sessionHandler.ts index 00eacdf50..8949f5d2d 100644 --- a/src/webview/sessionHandler.ts +++ b/src/webview/sessionHandler.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:SessionHandler'); | 1 | const debug = require('../preload-safe-debug')('Ferdium:Plugin:SessionHandler'); |
2 | 2 | ||
3 | export class SessionHandler { | 3 | export default class SessionHandler { |
4 | async releaseServiceWorkers() { | 4 | async releaseServiceWorkers() { |
5 | try { | 5 | try { |
6 | const registrations = | 6 | const registrations = |
diff --git a/test/features/utils/FeatureStore.test.js b/test/features/utils/FeatureStore.test.js index d8d85bec1..3ef8116d9 100644 --- a/test/features/utils/FeatureStore.test.js +++ b/test/features/utils/FeatureStore.test.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { observable } from 'mobx'; | 2 | import { observable } from 'mobx'; |
3 | import { FeatureStore } from '../../../src/features/utils/FeatureStore'; | 3 | import FeatureStore from '../../../src/features/utils/FeatureStore'; |
4 | import { createActionsFromDefinitions } from '../../../src/actions/lib/actions'; | 4 | import { createActionsFromDefinitions } from '../../../src/actions/lib/actions'; |
5 | import { createActionBindings } from '../../../src/features/utils/ActionBinding'; | 5 | import { createActionBindings } from '../../../src/features/utils/ActionBinding'; |
6 | import { createReactions } from '../../../src/stores/lib/Reaction'; | 6 | import { createReactions } from '../../../src/stores/lib/Reaction'; |
diff --git a/test/helpers/array-helpers.test.ts b/test/helpers/array-helpers.test.ts index cbb7822e9..ee94bac80 100644 --- a/test/helpers/array-helpers.test.ts +++ b/test/helpers/array-helpers.test.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { shuffleArray } from '../../src/helpers/array-helpers'; | 1 | import shuffleArray from '../../src/helpers/array-helpers'; |
2 | 2 | ||
3 | describe('array_helpers', () => { | 3 | describe('array_helpers', () => { |
4 | it('isValidExternalURL', () => { | 4 | it('isValidExternalURL', () => { |