Apply no-var eslint rule
This commit is contained in:
@@ -9,7 +9,7 @@ import fs from 'fs';
|
||||
import {app, dialog, ipcMain, shell} from 'electron';
|
||||
|
||||
const allowedProtocolFile = path.resolve(app.getPath('userData'), 'allowedProtocols.json');
|
||||
var allowedProtocols = [];
|
||||
let allowedProtocols = [];
|
||||
|
||||
function init(mainWindow) {
|
||||
fs.readFile(allowedProtocolFile, 'utf-8', (err, data) => {
|
||||
|
@@ -56,7 +56,7 @@ CertificateStore.prototype.isExisting = function isExisting(targetURL) {
|
||||
};
|
||||
|
||||
CertificateStore.prototype.isTrusted = function isTrusted(targetURL, certificate) {
|
||||
var host = getHost(targetURL);
|
||||
const host = getHost(targetURL);
|
||||
if (!this.isExisting(targetURL)) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import path from 'path';
|
||||
import {app, BrowserWindow} from 'electron';
|
||||
|
||||
function saveWindowState(file, window) {
|
||||
var windowState = window.getBounds();
|
||||
const windowState = window.getBounds();
|
||||
windowState.maximized = window.isMaximized();
|
||||
windowState.fullscreen = window.isFullScreen();
|
||||
try {
|
||||
@@ -26,7 +26,7 @@ function createMainWindow(config, options) {
|
||||
|
||||
// Create the browser window.
|
||||
const boundsInfoPath = path.join(app.getPath('userData'), 'bounds-info.json');
|
||||
var windowOptions;
|
||||
let windowOptions;
|
||||
try {
|
||||
windowOptions = JSON.parse(fs.readFileSync(boundsInfoPath, 'utf-8'));
|
||||
} catch (e) {
|
||||
|
@@ -15,11 +15,11 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
type: 'separator',
|
||||
};
|
||||
|
||||
var appName = app.getName();
|
||||
var firstMenuName = (process.platform === 'darwin') ? appName : 'File';
|
||||
var template = [];
|
||||
const appName = app.getName();
|
||||
const firstMenuName = (process.platform === 'darwin') ? appName : 'File';
|
||||
const template = [];
|
||||
|
||||
var platformAppMenu = process.platform === 'darwin' ? [{
|
||||
let platformAppMenu = process.platform === 'darwin' ? [{
|
||||
label: 'About ' + appName,
|
||||
role: 'about',
|
||||
click() {
|
||||
@@ -217,7 +217,7 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
}],
|
||||
};
|
||||
template.push(windowMenu);
|
||||
var submenu = [];
|
||||
const submenu = [];
|
||||
if (buildConfig.helpLink) {
|
||||
submenu.push({
|
||||
label: 'Learn More...',
|
||||
|
@@ -10,7 +10,7 @@ import settings from '../../common/settings';
|
||||
function createTemplate(mainWindow, config, isDev) {
|
||||
const settingsURL = isDev ? 'http://localhost:8080/browser/settings.html' : `file://${app.getAppPath()}/browser/settings.html`;
|
||||
const teams = settings.mergeDefaultTeams(config.teams);
|
||||
var template = [
|
||||
const template = [
|
||||
...teams.slice(0, 9).map((team, i) => {
|
||||
return {
|
||||
label: team.name,
|
||||
|
Reference in New Issue
Block a user