Browse Source

chore: fix minor script warnings (#25575)

Charles Kerr 4 years ago
parent
commit
515e85079f

+ 0 - 6
lib/browser/guest-view-manager.js

@@ -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;

+ 0 - 1
script/doc-only-change.js

@@ -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) {

+ 1 - 1
script/release/notes/notes.js

@@ -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';
   }
 

+ 1 - 1
script/release/prepare-release.js

@@ -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);

+ 2 - 2
spec-main/fixtures/api/sandbox.html

@@ -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')
         })

+ 3 - 3
spec-main/video-helpers.js

@@ -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

+ 1 - 1
spec/static/main.js

@@ -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 });