Enable import order (#24091)
* Enable import order * Add new order groups and add consistent-type-imports * Remove types group, move react to top and fix issues * Add store and reducers to the redux group and move imports from types folder to the end * Fix tsc * Remove react rule * Fix test * Fix eslint disable
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b2f36c7cdf
Коммит
d13429aa92
@@ -1,18 +1,19 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import type {Channel} from '@mattermost/types/channels';
|
||||
import type {Post} from '@mattermost/types/posts';
|
||||
|
||||
import {getChannel, getChannelMember, selectChannel, joinChannel, getChannelStats} from 'mattermost-redux/actions/channels';
|
||||
import {getPostThread} from 'mattermost-redux/actions/posts';
|
||||
import {getMissingProfilesByIds} from 'mattermost-redux/actions/users';
|
||||
import {getCurrentTeam, getTeam} from 'mattermost-redux/selectors/entities/teams';
|
||||
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
|
||||
import {getCurrentChannel} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import {getCurrentTeam, getTeam} from 'mattermost-redux/selectors/entities/teams';
|
||||
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
|
||||
import type {DispatchFunc, GetStateFunc} from 'mattermost-redux/types/actions';
|
||||
import {getUserIdFromChannelName} from 'mattermost-redux/utils/channel_utils';
|
||||
import {DispatchFunc, GetStateFunc} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {Post} from '@mattermost/types/posts';
|
||||
import {Channel} from '@mattermost/types/channels';
|
||||
import {isSystemAdmin} from 'mattermost-redux/utils/user_utils';
|
||||
|
||||
import {loadChannelsForCurrentUser} from 'actions/channel_actions';
|
||||
import {loadNewDMIfNeeded, loadNewGMIfNeeded} from 'actions/user_actions';
|
||||
@@ -21,9 +22,9 @@ import {selectPostAndHighlight} from 'actions/views/rhs';
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import {joinPrivateChannelPrompt} from 'utils/channel_utils';
|
||||
import {ActionTypes, Constants, ErrorPageTypes} from 'utils/constants';
|
||||
import {isSystemAdmin} from 'mattermost-redux/utils/user_utils';
|
||||
import {isComment, getPostURL} from 'utils/post_utils';
|
||||
import {GlobalState} from 'types/store';
|
||||
|
||||
import type {GlobalState} from 'types/store';
|
||||
|
||||
let privateChannelJoinPromptVisible = false;
|
||||
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
import {bindActionCreators, Dispatch} from 'redux';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import type {Dispatch} from 'redux';
|
||||
|
||||
import type {GlobalState} from '@mattermost/types/store';
|
||||
|
||||
import {getCurrentChannel} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';
|
||||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
|
||||
|
||||
import {GlobalState} from '@mattermost/types/store';
|
||||
|
||||
import {focusPost} from './actions';
|
||||
import PermalinkView from './permalink_view';
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ReactWrapper, shallow} from 'enzyme';
|
||||
import React, {ComponentProps} from 'react';
|
||||
import type {ReactWrapper} from 'enzyme';
|
||||
import {shallow} from 'enzyme';
|
||||
import nock from 'nock';
|
||||
import {match} from 'react-router-dom';
|
||||
|
||||
import React from 'react';
|
||||
import type {ComponentProps} from 'react';
|
||||
import {act} from 'react-dom/test-utils';
|
||||
import type {match} from 'react-router-dom';
|
||||
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import {getPostThread} from 'mattermost-redux/actions/posts';
|
||||
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import {Preferences} from 'mattermost-redux/constants';
|
||||
import TestHelper from 'packages/mattermost-redux/test/test_helper';
|
||||
|
||||
import mockStore from 'tests/test_store';
|
||||
import {mountWithIntl} from 'tests/helpers/intl-test-helper';
|
||||
|
||||
import {ErrorPageTypes} from 'utils/constants';
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import * as Channels from 'mattermost-redux/selectors/entities/channels';
|
||||
|
||||
import {focusPost} from 'components/permalink_view/actions';
|
||||
import PermalinkView from 'components/permalink_view/permalink_view';
|
||||
|
||||
import * as Channels from 'mattermost-redux/selectors/entities/channels';
|
||||
import TestHelper from 'packages/mattermost-redux/test/test_helper';
|
||||
import {mountWithIntl} from 'tests/helpers/intl-test-helper';
|
||||
import mockStore from 'tests/test_store';
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import {ErrorPageTypes} from 'utils/constants';
|
||||
|
||||
jest.mock('actions/channel_actions', () => ({
|
||||
loadChannelsForCurrentUser: jest.fn(() => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React, {useState, useEffect, useCallback, memo, useRef} from 'react';
|
||||
import {match} from 'react-router-dom';
|
||||
import type {match} from 'react-router-dom';
|
||||
|
||||
type Props = {
|
||||
channelId: string;
|
||||
|
||||
Ссылка в новой задаче
Block a user