chore: fix minor script warnings (#25575)

This commit is contained in:
Charles Kerr 2020-09-23 15:21:34 -05:00 committed by GitHub
parent 353c63e47a
commit 515e85079f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 15 deletions

View file

@ -420,10 +420,4 @@ const getGuest = function (guestInstanceId) {
if (guestInstance != null) return guestInstance.guest;
};
// Returns the embedder of the guest.
const getEmbedder = function (guestInstanceId) {
const guestInstance = guestInstances[guestInstanceId];
if (guestInstance != null) return guestInstance.embedder;
};
exports.isWebViewTagEnabled = isWebViewTagEnabled;

View file

@ -1,7 +1,6 @@
const args = require('minimist')(process.argv.slice(2));
const { Octokit } = require('@octokit/rest');
const octokit = new Octokit();
const path = require('path');
async function checkIfDocOnlyChange () {
if (args.prNumber || args.prBranch || args.prURL) {

View file

@ -182,7 +182,7 @@ const parseCommitMessage = (commitMessage, commit) => {
}
// https://help.github.com/articles/closing-issues-using-keywords/
if ((match = body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i))) {
if (body.match(/\b(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|for)\s#(\d+)\b/i)) {
commit.semanticType = commit.semanticType || 'fix';
}

View file

@ -199,7 +199,7 @@ async function prepareRelease (isBeta, notesOnly) {
const releaseNotes = await getReleaseNotes(currentBranch, newVersion);
console.log(`Draft release notes are: \n${releaseNotes.text}`);
} else {
const changes = await changesToRelease(currentBranch);
const changes = await changesToRelease();
if (changes) {
await verifyNewVersion();
await createRelease(currentBranch, isBeta);

View file

@ -55,7 +55,7 @@
},
'window-open': () => {
addEventListener('load', () => {
popup = open(window.location.href, 'popup!', 'top=60,left=50,width=500,height=600')
const popup = open(window.location.href, 'popup!', 'top=60,left=50,width=500,height=600')
popup.addEventListener('DOMContentLoaded', () => {
popup.document.write('<h1>scripting from opener</h1>')
popup.callback()
@ -82,7 +82,7 @@
},
'verify-ipc-sender': () => {
const {ipcRenderer} = require('electron')
popup = open()
const popup = open()
ipcRenderer.once('verified', () => {
ipcRenderer.send('parent-answer')
})

View file

@ -30,7 +30,7 @@ function atob (str) {
// in this case, frames has a very specific meaning, which will be
// detailed once i finish writing the code
function ToWebM (frames, outputAsArray) {
function ToWebM (frames) {
const info = checkFrames(frames);
// max duration by cluster in milliseconds
@ -235,7 +235,7 @@ function ToWebM (frames, outputAsArray) {
if (i >= 3) {
cues.data[i - 3].data[1].data[1].data = position;
}
const data = generateEBML([segment.data[i]], outputAsArray);
const data = generateEBML([segment.data[i]]);
position += data.size || data.byteLength || data.length;
if (i !== 2) { // not cues
// Save results to avoid having to encode everything twice
@ -243,7 +243,7 @@ function ToWebM (frames, outputAsArray) {
}
}
return generateEBML(EBML, outputAsArray);
return generateEBML(EBML);
}
// sums the lengths of all the frames and gets the duration, woo

View file

@ -2,7 +2,7 @@
process.throwDeprecation = false;
const electron = require('electron');
const { app, BrowserWindow, dialog, ipcMain, protocol, webContents, session } = electron;
const { app, BrowserWindow, dialog, ipcMain, session } = electron;
try {
require('fs').rmdirSync(app.getPath('userData'), { recursive: true });