diff --git a/app/index.ts b/app/index.ts index 01b2b16e..c102dbd5 100644 --- a/app/index.ts +++ b/app/index.ts @@ -17,7 +17,7 @@ remoteInitialize(); import {resolve} from 'path'; // Packages -import {app, BrowserWindow, Menu} from 'electron'; +import {app, BrowserWindow, Menu, screen} from 'electron'; import {gitDescribe} from 'git-describe'; import isDev from 'electron-is-dev'; import * as config from './config'; @@ -98,8 +98,6 @@ app.on('ready', () => let [startX, startY] = winSet.position; const [width, height] = options.size ? options.size : cfg.windowSize || winSet.size; - // eslint-disable-next-line @typescript-eslint/no-var-requires - const {screen} = require('electron'); const winPos = options.position; diff --git a/app/session.ts b/app/session.ts index 152560a8..5c0759f4 100644 --- a/app/session.ts +++ b/app/session.ts @@ -8,6 +8,7 @@ import {IPty, IWindowsPtyForkOptions, spawn as npSpawn} from 'node-pty'; import {cliScriptPath} from './config/paths'; import {dirname} from 'path'; import shellEnv from 'shell-env'; +import osLocale from 'os-locale'; const createNodePtyError = () => new Error( @@ -106,8 +107,6 @@ export default class Session extends EventEmitter { } init({uid, rows, cols: columns, cwd, shell: _shell, shellArgs: _shellArgs}: SessionOptions) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const osLocale = require('os-locale') as typeof import('os-locale'); const cleanEnv = process.env['APPIMAGE'] && process.env['APPDIR'] ? shellEnv.sync(_shell || defaultShell) : process.env; const baseEnv = Object.assign( diff --git a/webpack.config.ts b/webpack.config.ts index 611fd851..a1eb4f32 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires -const Copy = require('copy-webpack-plugin'); +import Copy from 'copy-webpack-plugin'; import path from 'path'; import TerserPlugin from 'terser-webpack-plugin'; import webpack from 'webpack'; @@ -29,7 +28,6 @@ const config: webpack.Configuration[] = [ ] }, plugins: [ - // eslint-disable-next-line @typescript-eslint/no-unsafe-call new Copy({ patterns: [ { @@ -99,7 +97,6 @@ const config: webpack.Configuration[] = [ NODE_ENV: JSON.stringify(nodeEnv) } }), - // eslint-disable-next-line @typescript-eslint/no-unsafe-call new Copy({ patterns: [ {