Code cleanup, update eslint from webapp, add ts-prune (#1884)

This commit is contained in:
Devin Binnie
2021-12-03 16:01:49 -05:00
committed by GitHub
parent 875a0f8bfd
commit 73056d2649
19 changed files with 383 additions and 336 deletions

View File

@@ -7,11 +7,7 @@ export const CLOSE_TAB = 'close-tab';
export const OPEN_TAB = 'open-tab';
export const SET_ACTIVE_VIEW = 'set-active-view';
export const UPDATE_LAST_ACTIVE = 'update-last-active';
export const MARK_READ = 'mark-read';
export const FOCUS_BROWSERVIEW = 'focus-browserview';
export const ZOOM = 'zoom';
export const UNDO = 'undo';
export const REDO = 'redo';
export const HISTORY = 'history';
export const QUIT = 'quit';
@@ -34,8 +30,6 @@ export const LOAD_FAILED = 'load_fail';
export const MAXIMIZE_CHANGE = 'maximized_change';
export const OPEN_EXTERNAL = 'open_external';
export const DOUBLE_CLICK_ON_WINDOW = 'double_click';
export const SHOW_NEW_SERVER_MODAL = 'show_new_server_modal';
@@ -83,7 +77,6 @@ export const TOGGLE_LOADING_SCREEN_VISIBILITY = 'toggle-loading-screen-visibilit
export const SELECT_NEXT_TAB = 'select-next-tab';
export const SELECT_PREVIOUS_TAB = 'select-previous-tab';
export const ADD_SERVER = 'add-server';
export const FOCUS_THREE_DOT_MENU = 'focus-three-dot-menu';
export const LOADSCREEN_END = 'loadscreen-end';

View File

@@ -1,11 +1,6 @@
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// channel types for managing permissions
export const REQUEST_PERMISSION_CHANNEL = 'request-permission';
export const GRANT_PERMISSION_CHANNEL = 'grant-permission';
export const DENY_PERMISSION_CHANNEL = 'deny-permission';
// Permission types that can be requested
export const BASIC_AUTH_PERMISSION = 'canBasicAuth';

View File

@@ -44,7 +44,6 @@ export function getDefaultTeamWithTabsFromTeam(team: Team) {
};
}
// TODO: Might need to move this out
export function getServerView(srv: MattermostServer, tab: Tab) {
switch (tab.name) {
case TAB_MESSAGING:
@@ -76,6 +75,5 @@ export function getTabDisplayName(tabType: TabType) {
}
export function canCloseTab(tabType: TabType) {
// TODO: maybe rework to make the property belong to the class somehow
return tabType !== TAB_MESSAGING;
}