[MM-52696] Upgrade and clean up Desktop App dev dependencies (#2970)

* Upgrade to ESLint v8

* Upgrade TypeScript, api-types, react-intl

* Remove unnecessary dependencies

* Update to React 17.0.2

* npm audit fixes, remove storybook

* Lock some packages

* Remove nan patch

* Remove some deprecated dependencies

* Fix lint/type/tests

* Merge'd

* Fix bad use of spawn

* Fix notarize

* Fix afterpack, switch to tsc es2020

* Fix api types

* Use @mattermost/eslint-plugin
This commit is contained in:
Devin Binnie
2024-03-07 15:55:33 -05:00
committed by GitHub
parent 12d59cd81c
commit 9b36c25e4e
198 changed files with 4997 additions and 17374 deletions

View File

@@ -2,7 +2,6 @@
// See LICENSE.txt for license information.
import fs from 'fs';
import path from 'path';
import {BrowserWindow, screen, app, globalShortcut, dialog} from 'electron';
@@ -12,11 +11,11 @@ import Config from 'common/config';
import {DEFAULT_WINDOW_HEIGHT, DEFAULT_WINDOW_WIDTH} from 'common/utils/constants';
import * as Validator from 'common/Validator';
import {MainWindow} from './mainWindow';
import ContextMenu from '../contextMenu';
import {isInsideRectangle} from '../utils';
import {MainWindow} from './mainWindow';
jest.mock('path', () => ({
join: jest.fn(),
resolve: jest.fn(),
@@ -54,10 +53,6 @@ jest.mock('common/utils/util', () => ({
isVersionGreaterThanOrEqualTo: jest.fn(),
}));
jest.mock('global', () => ({
willAppQuit: false,
}));
jest.mock('fs', () => ({
readFileSync: jest.fn(),
writeFileSync: jest.fn(),
@@ -79,8 +74,6 @@ jest.mock('main/i18nManager', () => ({
localizeMessage: jest.fn(),
}));
'use strict';
describe('main/windows/mainWindow', () => {
describe('init', () => {
const baseWindow = {