diff --git a/.eslintrc.js b/.eslintrc.js index 101e91527..c12341232 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -236,7 +236,7 @@ module.exports = { 'object', 'type', ], - 'newlines-between': 'ignore', + 'newlines-between': 'always', alphabetize: { order: 'asc' }, }, ], diff --git a/app/soapbox/actions/__tests__/about-test.js b/app/soapbox/actions/__tests__/about-test.js index 1c04c9b9e..49840e357 100644 --- a/app/soapbox/actions/__tests__/about-test.js +++ b/app/soapbox/actions/__tests__/about-test.js @@ -1,7 +1,9 @@ import MockAdapter from 'axios-mock-adapter'; import { Map as ImmutableMap } from 'immutable'; + import { staticClient } from 'soapbox/api'; import { mockStore } from 'soapbox/test_helpers'; + import { FETCH_ABOUT_PAGE_REQUEST, FETCH_ABOUT_PAGE_SUCCESS, diff --git a/app/soapbox/actions/__tests__/preload-test.js b/app/soapbox/actions/__tests__/preload-test.js index 7512f4c5e..5290802d2 100644 --- a/app/soapbox/actions/__tests__/preload-test.js +++ b/app/soapbox/actions/__tests__/preload-test.js @@ -1,6 +1,8 @@ import { Map as ImmutableMap } from 'immutable'; + import { __stub } from 'soapbox/api'; import { mockStore } from 'soapbox/test_helpers'; + import { VERIFY_CREDENTIALS_REQUEST } from '../auth'; import { ACCOUNTS_IMPORT } from '../importer'; import { diff --git a/app/soapbox/actions/accounts.js b/app/soapbox/actions/accounts.js index 8ee830ec4..ec010cf7b 100644 --- a/app/soapbox/actions/accounts.js +++ b/app/soapbox/actions/accounts.js @@ -1,6 +1,8 @@ import { isLoggedIn } from 'soapbox/utils/auth'; import { getFeatures } from 'soapbox/utils/features'; + import api, { getLinks } from '../api'; + import { importFetchedAccount, importFetchedAccounts, diff --git a/app/soapbox/actions/admin.js b/app/soapbox/actions/admin.js index 2b29e7479..414cb07d6 100644 --- a/app/soapbox/actions/admin.js +++ b/app/soapbox/actions/admin.js @@ -1,5 +1,6 @@ import { fetchRelationships } from 'soapbox/actions/accounts'; import { importFetchedAccount, importFetchedStatuses } from 'soapbox/actions/importer'; + import api from '../api'; export const ADMIN_CONFIG_FETCH_REQUEST = 'ADMIN_CONFIG_FETCH_REQUEST'; diff --git a/app/soapbox/actions/aliases.js b/app/soapbox/actions/aliases.js index b525f22c7..cdeb7208c 100644 --- a/app/soapbox/actions/aliases.js +++ b/app/soapbox/actions/aliases.js @@ -1,6 +1,9 @@ import { defineMessages } from 'react-intl'; + import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; + import { showAlertForError } from './alerts'; import { importFetchedAccount, importFetchedAccounts } from './importer'; import { ME_PATCH_SUCCESS } from './me'; diff --git a/app/soapbox/actions/auth.js b/app/soapbox/actions/auth.js index 8b8f02b64..82c4e0969 100644 --- a/app/soapbox/actions/auth.js +++ b/app/soapbox/actions/auth.js @@ -8,6 +8,7 @@ */ import { defineMessages } from 'react-intl'; + import { createAccount } from 'soapbox/actions/accounts'; import { createApp } from 'soapbox/actions/apps'; import { fetchMeSuccess, fetchMeFail } from 'soapbox/actions/me'; @@ -18,7 +19,9 @@ import { getLoggedInAccount, parseBaseURL } from 'soapbox/utils/auth'; import sourceCode from 'soapbox/utils/code'; import { getFeatures } from 'soapbox/utils/features'; import { isStandalone } from 'soapbox/utils/state'; + import api, { baseClient } from '../api'; + import { importFetchedAccount } from './importer'; export const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT'; diff --git a/app/soapbox/actions/blocks.js b/app/soapbox/actions/blocks.js index 9f28d6d22..554446f2f 100644 --- a/app/soapbox/actions/blocks.js +++ b/app/soapbox/actions/blocks.js @@ -1,6 +1,8 @@ import { isLoggedIn } from 'soapbox/utils/auth'; import { getNextLinkName } from 'soapbox/utils/quirks'; + import api, { getLinks } from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/bookmarks.js b/app/soapbox/actions/bookmarks.js index cf1ca8113..a0400ff38 100644 --- a/app/soapbox/actions/bookmarks.js +++ b/app/soapbox/actions/bookmarks.js @@ -1,4 +1,5 @@ import api, { getLinks } from '../api'; + import { importFetchedStatuses } from './importer'; export const BOOKMARKED_STATUSES_FETCH_REQUEST = 'BOOKMARKED_STATUSES_FETCH_REQUEST'; diff --git a/app/soapbox/actions/chats.js b/app/soapbox/actions/chats.js index eb9222750..8003bb8cb 100644 --- a/app/soapbox/actions/chats.js +++ b/app/soapbox/actions/chats.js @@ -1,7 +1,9 @@ import { Map as ImmutableMap } from 'immutable'; import { v4 as uuidv4 } from 'uuid'; + import { getSettings, changeSetting } from 'soapbox/actions/settings'; import { getFeatures } from 'soapbox/utils/features'; + import api, { getLinks } from '../api'; export const CHATS_FETCH_REQUEST = 'CHATS_FETCH_REQUEST'; diff --git a/app/soapbox/actions/compose.js b/app/soapbox/actions/compose.js index 82415eb0b..9801b40b2 100644 --- a/app/soapbox/actions/compose.js +++ b/app/soapbox/actions/compose.js @@ -1,13 +1,16 @@ import { CancelToken, isCancel } from 'axios'; import { throttle } from 'lodash'; import { defineMessages } from 'react-intl'; + import snackbar from 'soapbox/actions/snackbar'; import { isLoggedIn } from 'soapbox/utils/auth'; import { getFeatures } from 'soapbox/utils/features'; + import api from '../api'; import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light'; import { tagHistory } from '../settings'; import resizeImage from '../utils/resize_image'; + import { showAlert, showAlertForError } from './alerts'; import { useEmoji } from './emojis'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/conversations.js b/app/soapbox/actions/conversations.js index ea88dd070..4e7eb214f 100644 --- a/app/soapbox/actions/conversations.js +++ b/app/soapbox/actions/conversations.js @@ -1,5 +1,7 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api, { getLinks } from '../api'; + import { importFetchedAccounts, importFetchedStatuses, diff --git a/app/soapbox/actions/directory.js b/app/soapbox/actions/directory.js index bf93a5f22..0ee15386b 100644 --- a/app/soapbox/actions/directory.js +++ b/app/soapbox/actions/directory.js @@ -1,4 +1,5 @@ import api from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/domain_blocks.js b/app/soapbox/actions/domain_blocks.js index 37ee475e5..92824a55c 100644 --- a/app/soapbox/actions/domain_blocks.js +++ b/app/soapbox/actions/domain_blocks.js @@ -1,4 +1,5 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api, { getLinks } from '../api'; export const DOMAIN_BLOCK_REQUEST = 'DOMAIN_BLOCK_REQUEST'; diff --git a/app/soapbox/actions/emoji_reacts.js b/app/soapbox/actions/emoji_reacts.js index 48958bacb..a057dd35e 100644 --- a/app/soapbox/actions/emoji_reacts.js +++ b/app/soapbox/actions/emoji_reacts.js @@ -1,6 +1,9 @@ import { List as ImmutableList } from 'immutable'; + import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; + import { importFetchedAccounts, importFetchedStatus } from './importer'; import { favourite, unfavourite } from './interactions'; diff --git a/app/soapbox/actions/export_data.js b/app/soapbox/actions/export_data.js index 479b44b0a..12e0bd58b 100644 --- a/app/soapbox/actions/export_data.js +++ b/app/soapbox/actions/export_data.js @@ -1,5 +1,7 @@ import { defineMessages } from 'react-intl'; + import snackbar from 'soapbox/actions/snackbar'; + import api, { getLinks } from '../api'; export const EXPORT_FOLLOWS_REQUEST = 'EXPORT_FOLLOWS_REQUEST'; diff --git a/app/soapbox/actions/external_auth.js b/app/soapbox/actions/external_auth.js index f95c08be6..b3258ab70 100644 --- a/app/soapbox/actions/external_auth.js +++ b/app/soapbox/actions/external_auth.js @@ -7,12 +7,14 @@ */ import { Map as ImmutableMap, fromJS } from 'immutable'; + import { createApp } from 'soapbox/actions/apps'; import { authLoggedIn, verifyCredentials, switchAccount } from 'soapbox/actions/auth'; import { obtainOAuthToken } from 'soapbox/actions/oauth'; import { parseBaseURL } from 'soapbox/utils/auth'; import sourceCode from 'soapbox/utils/code'; import { getFeatures } from 'soapbox/utils/features'; + import { baseClient } from '../api'; const fetchExternalInstance = baseURL => { diff --git a/app/soapbox/actions/favourites.js b/app/soapbox/actions/favourites.js index 090df55bc..c4bce15e9 100644 --- a/app/soapbox/actions/favourites.js +++ b/app/soapbox/actions/favourites.js @@ -1,5 +1,7 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api, { getLinks } from '../api'; + import { importFetchedStatuses } from './importer'; export const FAVOURITED_STATUSES_FETCH_REQUEST = 'FAVOURITED_STATUSES_FETCH_REQUEST'; diff --git a/app/soapbox/actions/filters.js b/app/soapbox/actions/filters.js index d0f18dd3e..e6af25f9c 100644 --- a/app/soapbox/actions/filters.js +++ b/app/soapbox/actions/filters.js @@ -1,6 +1,8 @@ import { defineMessages } from 'react-intl'; + import snackbar from 'soapbox/actions/snackbar'; import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; export const FILTERS_FETCH_REQUEST = 'FILTERS_FETCH_REQUEST'; diff --git a/app/soapbox/actions/group_editor.js b/app/soapbox/actions/group_editor.js index 6710b21f2..f504a743a 100644 --- a/app/soapbox/actions/group_editor.js +++ b/app/soapbox/actions/group_editor.js @@ -1,4 +1,5 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; export const GROUP_CREATE_REQUEST = 'GROUP_CREATE_REQUEST'; diff --git a/app/soapbox/actions/groups.js b/app/soapbox/actions/groups.js index 7bff19076..3c6255216 100644 --- a/app/soapbox/actions/groups.js +++ b/app/soapbox/actions/groups.js @@ -1,5 +1,7 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api, { getLinks } from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/import_data.js b/app/soapbox/actions/import_data.js index b316df8bb..7bde21a4a 100644 --- a/app/soapbox/actions/import_data.js +++ b/app/soapbox/actions/import_data.js @@ -1,5 +1,7 @@ import { defineMessages } from 'react-intl'; + import snackbar from 'soapbox/actions/snackbar'; + import api from '../api'; export const IMPORT_FOLLOWS_REQUEST = 'IMPORT_FOLLOWS_REQUEST'; diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index ee4f1cfa7..407bb7c30 100644 --- a/app/soapbox/actions/importer/index.js +++ b/app/soapbox/actions/importer/index.js @@ -1,4 +1,5 @@ import { getSettings } from '../settings'; + import { normalizeAccount, normalizeStatus, diff --git a/app/soapbox/actions/importer/normalizer.js b/app/soapbox/actions/importer/normalizer.js index 922e57986..240abddcc 100644 --- a/app/soapbox/actions/importer/normalizer.js +++ b/app/soapbox/actions/importer/normalizer.js @@ -1,4 +1,5 @@ import escapeTextContentForBrowser from 'escape-html'; + import emojify from '../../features/emoji/emoji'; import { unescapeHTML } from '../../utils/html'; diff --git a/app/soapbox/actions/instance.js b/app/soapbox/actions/instance.js index e6cf6897d..85d8b2a3f 100644 --- a/app/soapbox/actions/instance.js +++ b/app/soapbox/actions/instance.js @@ -1,7 +1,9 @@ import { get } from 'lodash'; + import KVStore from 'soapbox/storage/kv_store'; import { getAuthUserUrl } from 'soapbox/utils/auth'; import { parseVersion } from 'soapbox/utils/features'; + import api from '../api'; export const INSTANCE_FETCH_REQUEST = 'INSTANCE_FETCH_REQUEST'; diff --git a/app/soapbox/actions/interactions.js b/app/soapbox/actions/interactions.js index 700166bc6..d7f27a96c 100644 --- a/app/soapbox/actions/interactions.js +++ b/app/soapbox/actions/interactions.js @@ -1,7 +1,10 @@ import { defineMessages } from 'react-intl'; + import snackbar from 'soapbox/actions/snackbar'; import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; + import { importFetchedAccounts, importFetchedStatus } from './importer'; export const REBLOG_REQUEST = 'REBLOG_REQUEST'; diff --git a/app/soapbox/actions/lists.js b/app/soapbox/actions/lists.js index b01888884..6b39978d2 100644 --- a/app/soapbox/actions/lists.js +++ b/app/soapbox/actions/lists.js @@ -1,5 +1,7 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; + import { showAlertForError } from './alerts'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/me.js b/app/soapbox/actions/me.js index 0b92ae3be..e04001e4c 100644 --- a/app/soapbox/actions/me.js +++ b/app/soapbox/actions/me.js @@ -1,5 +1,7 @@ import { getAuthUserId, getAuthUserUrl } from 'soapbox/utils/auth'; + import api from '../api'; + import { loadCredentials } from './auth'; import { importFetchedAccount } from './importer'; diff --git a/app/soapbox/actions/media.js b/app/soapbox/actions/media.js index 87f2b0347..460c2f079 100644 --- a/app/soapbox/actions/media.js +++ b/app/soapbox/actions/media.js @@ -1,4 +1,5 @@ import { getFeatures } from 'soapbox/utils/features'; + import api from '../api'; const noOp = () => {}; diff --git a/app/soapbox/actions/moderation.js b/app/soapbox/actions/moderation.js index d27b5665c..7bad7e82d 100644 --- a/app/soapbox/actions/moderation.js +++ b/app/soapbox/actions/moderation.js @@ -1,5 +1,6 @@ import React from 'react'; import { defineMessages } from 'react-intl'; + import { fetchAccountByUsername } from 'soapbox/actions/accounts'; import { deactivateUsers, deleteUsers, deleteStatus, toggleStatusSensitivity } from 'soapbox/actions/admin'; import { openModal } from 'soapbox/actions/modal'; diff --git a/app/soapbox/actions/mrf.js b/app/soapbox/actions/mrf.js index d893ce6bd..39359e965 100644 --- a/app/soapbox/actions/mrf.js +++ b/app/soapbox/actions/mrf.js @@ -1,5 +1,7 @@ import { Set as ImmutableSet } from 'immutable'; + import ConfigDB from 'soapbox/utils/config_db'; + import { fetchConfig, updateConfig } from './admin'; const simplePolicyMerge = (simplePolicy, host, restrictions) => { diff --git a/app/soapbox/actions/mutes.js b/app/soapbox/actions/mutes.js index 23afba4f3..f7c2b6a11 100644 --- a/app/soapbox/actions/mutes.js +++ b/app/soapbox/actions/mutes.js @@ -1,6 +1,8 @@ import { isLoggedIn } from 'soapbox/utils/auth'; import { getNextLinkName } from 'soapbox/utils/quirks'; + import api, { getLinks } from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; import { openModal } from './modal'; diff --git a/app/soapbox/actions/notifications.js b/app/soapbox/actions/notifications.js index 85e3c96ce..08f9bb718 100644 --- a/app/soapbox/actions/notifications.js +++ b/app/soapbox/actions/notifications.js @@ -6,12 +6,15 @@ import { import IntlMessageFormat from 'intl-messageformat'; import 'intl-pluralrules'; import { defineMessages } from 'react-intl'; + import { isLoggedIn } from 'soapbox/utils/auth'; import { parseVersion, PLEROMA } from 'soapbox/utils/features'; import { joinPublicPath } from 'soapbox/utils/static'; + import api, { getLinks } from '../api'; import { getFilters, regexFromFilters } from '../selectors'; import { unescapeHTML } from '../utils/html'; + import { fetchRelationships } from './accounts'; import { importFetchedAccount, diff --git a/app/soapbox/actions/pin_statuses.js b/app/soapbox/actions/pin_statuses.js index d2a1c96ec..26194f553 100644 --- a/app/soapbox/actions/pin_statuses.js +++ b/app/soapbox/actions/pin_statuses.js @@ -1,5 +1,7 @@ import { isLoggedIn } from 'soapbox/utils/auth'; + import api from '../api'; + import { importFetchedStatuses } from './importer'; export const PINNED_STATUSES_FETCH_REQUEST = 'PINNED_STATUSES_FETCH_REQUEST'; diff --git a/app/soapbox/actions/polls.js b/app/soapbox/actions/polls.js index 8e8b82df5..a37410dc9 100644 --- a/app/soapbox/actions/polls.js +++ b/app/soapbox/actions/polls.js @@ -1,4 +1,5 @@ import api from '../api'; + import { importFetchedPoll } from './importer'; export const POLL_VOTE_REQUEST = 'POLL_VOTE_REQUEST'; diff --git a/app/soapbox/actions/preload.js b/app/soapbox/actions/preload.js index 9a3c8e9c6..d14c6f9fe 100644 --- a/app/soapbox/actions/preload.js +++ b/app/soapbox/actions/preload.js @@ -1,4 +1,5 @@ import { mapValues } from 'lodash'; + import { verifyCredentials } from './auth'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/push_notifications/registerer.js b/app/soapbox/actions/push_notifications/registerer.js index af798e416..b4d86631e 100644 --- a/app/soapbox/actions/push_notifications/registerer.js +++ b/app/soapbox/actions/push_notifications/registerer.js @@ -1,7 +1,9 @@ import { createPushSubsription, updatePushSubscription } from 'soapbox/actions/push_subscriptions'; import { getVapidKey } from 'soapbox/utils/auth'; + import { pushNotificationsSetting } from '../../settings'; import { decode as decodeBase64 } from '../../utils/base64'; + import { setBrowserSupport, setSubscription, clearSubscription } from './setter'; // Taken from https://www.npmjs.com/package/web-push diff --git a/app/soapbox/actions/reports.js b/app/soapbox/actions/reports.js index 9d0d4e581..2db3bce31 100644 --- a/app/soapbox/actions/reports.js +++ b/app/soapbox/actions/reports.js @@ -1,4 +1,5 @@ import api from '../api'; + import { openModal, closeModal } from './modal'; export const REPORT_INIT = 'REPORT_INIT'; diff --git a/app/soapbox/actions/search.js b/app/soapbox/actions/search.js index 6764dc534..27cb4bdbd 100644 --- a/app/soapbox/actions/search.js +++ b/app/soapbox/actions/search.js @@ -1,4 +1,5 @@ import api from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts, importFetchedStatuses } from './importer'; diff --git a/app/soapbox/actions/security.js b/app/soapbox/actions/security.js index cb6833543..4cc957992 100644 --- a/app/soapbox/actions/security.js +++ b/app/soapbox/actions/security.js @@ -6,7 +6,9 @@ import snackbar from 'soapbox/actions/snackbar'; import { getLoggedInAccount } from 'soapbox/utils/auth'; + import api from '../api'; + import { AUTH_LOGGED_OUT, messages } from './auth'; export const FETCH_TOKENS_REQUEST = 'FETCH_TOKENS_REQUEST'; diff --git a/app/soapbox/actions/settings.js b/app/soapbox/actions/settings.js index 3651d48e6..f7508807c 100644 --- a/app/soapbox/actions/settings.js +++ b/app/soapbox/actions/settings.js @@ -1,9 +1,12 @@ import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet } from 'immutable'; import { debounce } from 'lodash'; import { createSelector } from 'reselect'; + import { patchMe } from 'soapbox/actions/me'; import { isLoggedIn } from 'soapbox/utils/auth'; + import uuid from '../uuid'; + import { showAlertForError } from './alerts'; export const SETTING_CHANGE = 'SETTING_CHANGE'; diff --git a/app/soapbox/actions/soapbox.js b/app/soapbox/actions/soapbox.js index 225e8c280..d85bd0f0f 100644 --- a/app/soapbox/actions/soapbox.js +++ b/app/soapbox/actions/soapbox.js @@ -1,8 +1,10 @@ import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; import { createSelector } from 'reselect'; + import { getHost } from 'soapbox/actions/instance'; import KVStore from 'soapbox/storage/kv_store'; import { getFeatures } from 'soapbox/utils/features'; + import api, { staticClient } from '../api'; export const SOAPBOX_CONFIG_REQUEST_SUCCESS = 'SOAPBOX_CONFIG_REQUEST_SUCCESS'; diff --git a/app/soapbox/actions/statuses.js b/app/soapbox/actions/statuses.js index 25b65ec25..150b6d8c7 100644 --- a/app/soapbox/actions/statuses.js +++ b/app/soapbox/actions/statuses.js @@ -1,7 +1,9 @@ import { isLoggedIn } from 'soapbox/utils/auth'; import { getFeatures } from 'soapbox/utils/features'; import { shouldHaveCard } from 'soapbox/utils/status'; + import api from '../api'; + import { importFetchedStatus, importFetchedStatuses } from './importer'; import { openModal } from './modal'; import { deleteFromTimelines } from './timelines'; diff --git a/app/soapbox/actions/streaming.js b/app/soapbox/actions/streaming.js index 2dd6d45e5..bd1ed00da 100644 --- a/app/soapbox/actions/streaming.js +++ b/app/soapbox/actions/streaming.js @@ -1,6 +1,8 @@ import { getSettings } from 'soapbox/actions/settings'; import messages from 'soapbox/locales/messages'; + import { connectStream } from '../stream'; + import { updateConversations } from './conversations'; import { fetchFilters } from './filters'; import { updateNotificationsQueue, expandNotifications } from './notifications'; diff --git a/app/soapbox/actions/suggestions.js b/app/soapbox/actions/suggestions.js index e2ca4df7b..d896e6e07 100644 --- a/app/soapbox/actions/suggestions.js +++ b/app/soapbox/actions/suggestions.js @@ -1,6 +1,8 @@ import { isLoggedIn } from 'soapbox/utils/auth'; import { getFeatures } from 'soapbox/utils/features'; + import api from '../api'; + import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; diff --git a/app/soapbox/actions/timelines.js b/app/soapbox/actions/timelines.js index 345e4783d..bef27b287 100644 --- a/app/soapbox/actions/timelines.js +++ b/app/soapbox/actions/timelines.js @@ -1,7 +1,10 @@ import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; + import { getSettings } from 'soapbox/actions/settings'; import { shouldFilter } from 'soapbox/utils/timelines'; + import api, { getLinks } from '../api'; + import { importFetchedStatus, importFetchedStatuses } from './importer'; export const TIMELINE_UPDATE = 'TIMELINE_UPDATE'; diff --git a/app/soapbox/api.js b/app/soapbox/api.js index 58e6f6657..13ee07186 100644 --- a/app/soapbox/api.js +++ b/app/soapbox/api.js @@ -8,6 +8,7 @@ import axios from 'axios'; import LinkHeader from 'http-link-header'; import { createSelector } from 'reselect'; + import { BACKEND_URL, FE_SUBDIRECTORY } from 'soapbox/build_config'; import { getAccessToken, getAppToken, parseBaseURL } from 'soapbox/utils/auth'; import { isURL } from 'soapbox/utils/auth'; diff --git a/app/soapbox/base_polyfills.js b/app/soapbox/base_polyfills.js index 60c546bf4..e4744fee3 100644 --- a/app/soapbox/base_polyfills.js +++ b/app/soapbox/base_polyfills.js @@ -7,6 +7,7 @@ import includes from 'array-includes'; import isNaN from 'is-nan'; import assign from 'object-assign'; import values from 'object.values'; + import { decode as decodeBase64 } from './utils/base64'; if (!Array.prototype.includes) { diff --git a/app/soapbox/components/__tests__/autosuggest_emoji-test.js b/app/soapbox/components/__tests__/autosuggest_emoji-test.js index 05616e444..9a2fb58e8 100644 --- a/app/soapbox/components/__tests__/autosuggest_emoji-test.js +++ b/app/soapbox/components/__tests__/autosuggest_emoji-test.js @@ -1,5 +1,6 @@ import React from 'react'; import renderer from 'react-test-renderer'; + import AutosuggestEmoji from '../autosuggest_emoji'; describe('', () => { diff --git a/app/soapbox/components/__tests__/avatar-test.js b/app/soapbox/components/__tests__/avatar-test.js index 6e43f30c7..3834dfbb5 100644 --- a/app/soapbox/components/__tests__/avatar-test.js +++ b/app/soapbox/components/__tests__/avatar-test.js @@ -1,6 +1,8 @@ import { fromJS } from 'immutable'; import React from 'react'; + import { createComponent } from 'soapbox/test_helpers'; + import Avatar from '../avatar'; describe('', () => { diff --git a/app/soapbox/components/__tests__/avatar_overlay-test.js b/app/soapbox/components/__tests__/avatar_overlay-test.js index 0e0d2039a..db4250c59 100644 --- a/app/soapbox/components/__tests__/avatar_overlay-test.js +++ b/app/soapbox/components/__tests__/avatar_overlay-test.js @@ -1,6 +1,8 @@ import { fromJS } from 'immutable'; import React from 'react'; + import { createComponent } from 'soapbox/test_helpers'; + import AvatarOverlay from '../avatar_overlay'; describe(' { diff --git a/app/soapbox/components/__tests__/badge-test.js b/app/soapbox/components/__tests__/badge-test.js index 5a42f0531..0b577dc18 100644 --- a/app/soapbox/components/__tests__/badge-test.js +++ b/app/soapbox/components/__tests__/badge-test.js @@ -1,5 +1,6 @@ import React from 'react'; import renderer from 'react-test-renderer'; + import Badge from '../badge'; describe('', () => { diff --git a/app/soapbox/components/__tests__/button-test.js b/app/soapbox/components/__tests__/button-test.js index 160cd3cbc..e1480fe6f 100644 --- a/app/soapbox/components/__tests__/button-test.js +++ b/app/soapbox/components/__tests__/button-test.js @@ -1,6 +1,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import renderer from 'react-test-renderer'; + import Button from '../button'; describe('