Apply new ESLint rules to legacy code
This commit is contained in:
parent
91cf075697
commit
8a2c17f65f
70 changed files with 376 additions and 516 deletions
47
main.js
47
main.js
|
@ -275,31 +275,29 @@ if (OS === 'win32') {
|
|||
|
||||
async function createWindow() {
|
||||
const { screen } = electron;
|
||||
const windowOptions = Object.assign(
|
||||
{
|
||||
show: !startInTray, // allow to start minimised in tray
|
||||
width: DEFAULT_WIDTH,
|
||||
height: DEFAULT_HEIGHT,
|
||||
minWidth: MIN_WIDTH,
|
||||
minHeight: MIN_HEIGHT,
|
||||
autoHideMenuBar: false,
|
||||
backgroundColor:
|
||||
config.environment === 'test' || config.environment === 'test-lib'
|
||||
? '#ffffff' // Tests should always be rendered on a white background
|
||||
: '#3a76f0',
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
nodeIntegrationInWorker: false,
|
||||
contextIsolation: false,
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
nativeWindowOpen: true,
|
||||
spellcheck: await getSpellCheckSetting(),
|
||||
backgroundThrottling: false,
|
||||
},
|
||||
icon: windowIcon,
|
||||
const windowOptions = {
|
||||
show: !startInTray, // allow to start minimised in tray
|
||||
width: DEFAULT_WIDTH,
|
||||
height: DEFAULT_HEIGHT,
|
||||
minWidth: MIN_WIDTH,
|
||||
minHeight: MIN_HEIGHT,
|
||||
autoHideMenuBar: false,
|
||||
backgroundColor:
|
||||
config.environment === 'test' || config.environment === 'test-lib'
|
||||
? '#ffffff' // Tests should always be rendered on a white background
|
||||
: '#3a76f0',
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
nodeIntegrationInWorker: false,
|
||||
contextIsolation: false,
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
nativeWindowOpen: true,
|
||||
spellcheck: await getSpellCheckSetting(),
|
||||
backgroundThrottling: false,
|
||||
},
|
||||
_.pick(windowConfig, ['autoHideMenuBar', 'width', 'height', 'x', 'y'])
|
||||
);
|
||||
icon: windowIcon,
|
||||
..._.pick(windowConfig, ['autoHideMenuBar', 'width', 'height', 'x', 'y']),
|
||||
};
|
||||
|
||||
if (!_.isNumber(windowOptions.width) || windowOptions.width < MIN_WIDTH) {
|
||||
windowOptions.width = DEFAULT_WIDTH;
|
||||
|
@ -796,6 +794,7 @@ async function showDebugLogWindow() {
|
|||
|
||||
let permissionsPopupWindow;
|
||||
function showPermissionsPopupWindow(forCalling, forCamera) {
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (permissionsPopupWindow) {
|
||||
permissionsPopupWindow.show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue