From 653f52dc3cad92fd96fc2fb019a0c276aafb83dd Mon Sep 17 00:00:00 2001
From: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Date: Thu, 17 Oct 2019 11:40:53 -0400
Subject: [PATCH] upgrade eslint-plugin-dev to 5.0.0 (#5382)
* upgrade eslint-plugin-dev to 5.0.0
* more [lint fixes]
---
cli/lib/exec/versions.js | 1 -
cli/lib/tasks/download.js | 1 -
cli/lib/tasks/install.js | 6 ----
cli/lib/tasks/unzip.js | 1 -
cli/lib/tasks/verify.js | 2 --
cli/lib/util.js | 1 -
cli/test/lib/exec/xvfb_spec.js | 1 -
cli/test/lib/tasks/install_spec.js | 8 -----
cli/test/lib/tasks/verify_spec.js | 3 --
cli/test/lib/util_spec.js | 1 -
cli/test/spec_helper.js | 2 --
package.json | 2 +-
packages/desktop-gui/src/app/nav.jsx | 1 -
packages/desktop-gui/src/auth/login-form.jsx | 1 -
.../desktop-gui/src/dropdown/dropdown.jsx | 1 -
packages/desktop-gui/src/lib/utils.js | 1 -
.../desktop-gui/src/project/onboarding.jsx | 1 -
.../src/runs/permission-message.jsx | 2 --
packages/desktop-gui/src/runs/runs-list.jsx | 2 --
.../desktop-gui/src/update/update-banner.jsx | 1 -
.../driver/src/cy/commands/actions/click.js | 1 -
.../driver/src/cy/commands/actions/type.js | 4 ---
packages/driver/src/cy/keyboard.js | 8 -----
packages/driver/src/cy/mouse.js | 10 -------
packages/driver/src/dom/elements.js | 5 ----
packages/driver/src/dom/jquery.js | 1 -
packages/driver/src/dom/selection.js | 3 --
packages/driver/src/dom/visibility.js | 1 -
.../commands/actions/click_spec.js | 23 ---------------
.../integration/commands/actions/type_spec.js | 10 -------
.../integration/cy/snapshot_css_spec.js | 1 -
.../integration/dom/visibility_spec.js | 1 -
.../integration/e2e/focus_blur_spec.js | 29 -------------------
.../e2e/selector_playground.spec.js | 3 --
.../cypress/integration/issues/3847_spec.js | 1 -
.../integration/util/limited_map_spec.js | 1 -
packages/driver/test/cypress/support/utils.js | 3 --
packages/network/lib/agent.ts | 2 +-
.../src/commands/command-model.spec.js | 1 -
.../reporter/src/runnables/suite-model.js | 1 -
packages/reporter/src/test/test.jsx | 1 -
packages/runner/src/app/app.spec.jsx | 1 -
packages/runner/src/dropdown/dropdown.jsx | 1 -
packages/runner/src/iframe/visit-failure.js | 1 -
packages/runner/src/lib/logger.js | 1 -
packages/runner/src/lib/state.js | 1 -
packages/runner/src/lib/util.js | 1 -
packages/runner/test/helper.js | 1 -
packages/server/lib/browsers/cri-client.ts | 9 +++---
packages/server/lib/gui/menu.js | 1 -
packages/server/lib/modes/run.js | 2 +-
packages/server/lib/plugins/child/task.js | 1 -
packages/server/lib/util/app_data.js | 1 -
packages/server/lib/util/args.js | 1 -
packages/server/lib/util/file.js | 1 -
packages/server/lib/util/replace_stream.ts | 2 +-
packages/server/lib/util/settings.js | 2 --
packages/server/lib/util/shell.js | 1 -
packages/server/lib/util/system.js | 1 -
packages/server/lib/util/terminal.js | 1 -
packages/server/test/e2e/2_cdp_spec.ts | 2 +-
.../visit_response_never_ends_failing_spec.js | 1 -
.../test/unit/browsers/protocol_spec.ts | 2 +-
packages/server/test/unit/gui/auth_spec.js | 1 -
.../server/test/unit/stream_buffer_spec.js | 1 -
packages/ts/index.d.ts | 4 +--
packages/web-config/node-jsdom-setup.ts | 2 --
scripts/binary/util/testStaticAssets.js | 3 --
scripts/binary/util/transform-requires.js | 3 --
scripts/link-packages.js | 1 -
scripts/unit/binary/util/packages-spec.js | 14 ++++-----
71 files changed, 17 insertions(+), 196 deletions(-)
diff --git a/cli/lib/exec/versions.js b/cli/lib/exec/versions.js
index 58ed2e1726..bb3589ef74 100644
--- a/cli/lib/exec/versions.js
+++ b/cli/lib/exec/versions.js
@@ -8,7 +8,6 @@ const { throwFormErrorText, errors } = require('../errors')
const getVersions = () => {
return Promise.try(() => {
-
if (util.getEnv('CYPRESS_RUN_BINARY')) {
let envBinaryPath = path.resolve(util.getEnv('CYPRESS_RUN_BINARY'))
diff --git a/cli/lib/tasks/download.js b/cli/lib/tasks/download.js
index 3bdda4ffd4..5afd2a7b95 100644
--- a/cli/lib/tasks/download.js
+++ b/cli/lib/tasks/download.js
@@ -176,7 +176,6 @@ const verifyDownloadedFile = (filename, expectedSize, expectedChecksum) => {
debug('downloaded file lacks checksum or size to verify')
return Promise.resolve()
-
}
// downloads from given url
diff --git a/cli/lib/tasks/install.js b/cli/lib/tasks/install.js
index 6215a08e8e..26cb7b23cc 100644
--- a/cli/lib/tasks/install.js
+++ b/cli/lib/tasks/install.js
@@ -27,7 +27,6 @@ const alreadyInstalledMsg = () => {
}
const displayCompletionMsg = () => {
-
// check here to see if we are globally installed
if (util.isInstalledGlobally()) {
// if we are display a warning
@@ -103,7 +102,6 @@ const downloadAndUnzip = ({ version, installDir, downloadDir }) => {
{
title: util.titleize('Finishing Installation'),
task: (ctx, task) => {
-
const cleanup = () => {
debug('removing zip file %s', downloadDestination)
@@ -129,7 +127,6 @@ const downloadAndUnzip = ({ version, installDir, downloadDir }) => {
}
const start = (options = {}) => {
-
// handle deprecated / removed
if (util.getEnv('CYPRESS_BINARY_VERSION')) {
return throwFormErrorText(errors.removed.CYPRESS_BINARY_VERSION)()
@@ -152,7 +149,6 @@ const start = (options = {}) => {
// let this environment variable reset the binary version we need
if (util.getEnv('CYPRESS_INSTALL_BINARY')) {
-
// because passed file paths are often double quoted
// and might have extra whitespace around, be robust and trim the string
const trimAndRemoveDoubleQuotes = true
@@ -175,7 +171,6 @@ const start = (options = {}) => {
// if this doesn't match the expected version
// then print warning to the user
if (envVarVersion !== needVersion) {
-
// reset the version to the env var version
needVersion = envVarVersion
}
@@ -211,7 +206,6 @@ const start = (options = {}) => {
return state.getBinaryPkgVersionAsync(binaryDir)
})
.then((binaryVersion) => {
-
if (!binaryVersion) {
debug('no binary installed under cli version')
diff --git a/cli/lib/tasks/unzip.js b/cli/lib/tasks/unzip.js
index a7a7124290..c341d62eb3 100644
--- a/cli/lib/tasks/unzip.js
+++ b/cli/lib/tasks/unzip.js
@@ -14,7 +14,6 @@ const util = require('../util')
// expose this function for simple testing
const unzip = ({ zipFilePath, installDir, progress }) => {
-
debug('unzipping from %s', zipFilePath)
debug('into', installDir)
diff --git a/cli/lib/tasks/verify.js b/cli/lib/tasks/verify.js
index 48830022aa..41371d0ce7 100644
--- a/cli/lib/tasks/verify.js
+++ b/cli/lib/tasks/verify.js
@@ -221,7 +221,6 @@ function testBinary (version, binaryDir, options) {
const maybeVerify = (installedVersion, binaryDir, options) => {
return state.getBinaryVerifiedAsync(binaryDir)
.then((isVerified) => {
-
debug('is Verified ?', isVerified)
let shouldVerify = !isVerified
@@ -317,7 +316,6 @@ const start = (options = {}) => {
return state.getBinaryPkgVersionAsync(binaryDir)
})
.then((binaryVersion) => {
-
if (!binaryVersion) {
debug('no Cypress binary found for cli version ', packageVersion)
diff --git a/cli/lib/util.js b/cli/lib/util.js
index 029c0bb189..84f872db4c 100644
--- a/cli/lib/util.js
+++ b/cli/lib/util.js
@@ -326,7 +326,6 @@ const util = {
}
return os.release()
-
})
},
diff --git a/cli/test/lib/exec/xvfb_spec.js b/cli/test/lib/exec/xvfb_spec.js
index 55db48b0f5..a5da2853ef 100644
--- a/cli/test/lib/exec/xvfb_spec.js
+++ b/cli/test/lib/exec/xvfb_spec.js
@@ -71,7 +71,6 @@ describe('lib/exec/xvfb', function () {
})
context('#isNeeded', function () {
-
it('does not need xvfb on osx', function () {
os.platform.returns('darwin')
diff --git a/cli/test/lib/tasks/install_spec.js b/cli/test/lib/tasks/install_spec.js
index c9c50bae9b..8e9a9a5b22 100644
--- a/cli/test/lib/tasks/install_spec.js
+++ b/cli/test/lib/tasks/install_spec.js
@@ -59,7 +59,6 @@ describe('/lib/tasks/install', function () {
})
describe('skips install', function () {
-
it('when environment variable is set', function () {
process.env.CYPRESS_INSTALL_BINARY = '0'
@@ -76,7 +75,6 @@ describe('/lib/tasks/install', function () {
})
describe('override version', function () {
-
it('warns when specifying cypress version in env', function () {
const version = '0.12.1'
@@ -182,7 +180,6 @@ describe('/lib/tasks/install', function () {
describe('when version is already installed', function () {
beforeEach(function () {
state.getBinaryPkgVersionAsync.resolves(packageVersion)
-
})
it('doesn\'t attempt to download', function () {
@@ -191,7 +188,6 @@ describe('/lib/tasks/install', function () {
expect(download.start).not.to.be.called
expect(state.getBinaryPkgVersionAsync).to.be.calledWith('/cache/Cypress/1.2.3/Cypress.app')
})
-
})
it('logs \'skipping install\' when explicit cypress install', function () {
@@ -202,7 +198,6 @@ describe('/lib/tasks/install', function () {
normalize(this.stdout.toString())
)
})
-
})
it('logs when already installed when run from postInstall', function () {
@@ -249,7 +244,6 @@ describe('/lib/tasks/install', function () {
})
it('logs message and starts download', function () {
-
expect(download.start).to.be.calledWithMatch({
version: packageVersion,
})
@@ -301,7 +295,6 @@ describe('/lib/tasks/install', function () {
})
it('logs message and starts download', function () {
-
expect(download.start).to.be.calledWithMatch({
version: packageVersion,
})
@@ -467,5 +460,4 @@ describe('/lib/tasks/install', function () {
})
})
})
-
})
diff --git a/cli/test/lib/tasks/verify_spec.js b/cli/test/lib/tasks/verify_spec.js
index ed147aeef9..9d18832c72 100644
--- a/cli/test/lib/tasks/verify_spec.js
+++ b/cli/test/lib/tasks/verify_spec.js
@@ -178,7 +178,6 @@ context('lib/tasks/verify', () => {
.then(() => {
snapshot(normalize(slice(stdout.toString())))
})
-
})
it('logs error when child process returns incorrect stdout (stderr when exists)', () => {
@@ -205,7 +204,6 @@ context('lib/tasks/verify', () => {
.then(() => {
snapshot(normalize(slice(stdout.toString())))
})
-
})
it('logs error when child process returns incorrect stdout (stdout when no stderr)', () => {
@@ -231,7 +229,6 @@ context('lib/tasks/verify', () => {
.then(() => {
snapshot(normalize(slice(stdout.toString())))
})
-
})
it('sets ELECTRON_ENABLE_LOGGING without mutating process.env', () => {
diff --git a/cli/test/lib/util_spec.js b/cli/test/lib/util_spec.js
index 73238da52e..30be63f3a4 100644
--- a/cli/test/lib/util_spec.js
+++ b/cli/test/lib/util_spec.js
@@ -321,7 +321,6 @@ describe('util', () => {
context('.printNodeOptions', () => {
describe('NODE_OPTIONS is not set', () => {
-
it('does nothing if debug is not enabled', () => {
const log = sinon.spy()
diff --git a/cli/test/spec_helper.js b/cli/test/spec_helper.js
index e795b33e87..a5df843f79 100644
--- a/cli/test/spec_helper.js
+++ b/cli/test/spec_helper.js
@@ -9,9 +9,7 @@ const { MockChildProcess } = require('spawn-mock')
const _kill = MockChildProcess.prototype.kill
const patchMockSpawn = () => {
-
MockChildProcess.prototype.kill = function (...args) {
-
this.emit('exit')
return _kill.apply(this, args)
diff --git a/package.json b/package.json
index 536c729f93..5378d6b285 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,7 @@
"@cypress/bumpercar": "2.0.12",
"@cypress/commit-message-install": "2.7.0",
"@cypress/env-or-json-file": "2.0.0",
- "@cypress/eslint-plugin-dev": "4.0.0",
+ "@cypress/eslint-plugin-dev": "5.0.0",
"@cypress/github-commit-status-check": "1.5.0",
"@cypress/npm-run-all": "4.0.5",
"@cypress/questions-remain": "1.0.1",
diff --git a/packages/desktop-gui/src/app/nav.jsx b/packages/desktop-gui/src/app/nav.jsx
index 43cce7741c..d91b3be222 100644
--- a/packages/desktop-gui/src/app/nav.jsx
+++ b/packages/desktop-gui/src/app/nav.jsx
@@ -118,7 +118,6 @@ export default class Nav extends Component {
Log Out
)
-
}
_select = (item) => {
diff --git a/packages/desktop-gui/src/auth/login-form.jsx b/packages/desktop-gui/src/auth/login-form.jsx
index 7577ab4fa8..39bf0ce989 100644
--- a/packages/desktop-gui/src/auth/login-form.jsx
+++ b/packages/desktop-gui/src/auth/login-form.jsx
@@ -80,7 +80,6 @@ class LoginForm extends Component {
Log In to Dashboard
)
-
}
_error () {
diff --git a/packages/desktop-gui/src/dropdown/dropdown.jsx b/packages/desktop-gui/src/dropdown/dropdown.jsx
index 412caf8bec..ebce51d024 100644
--- a/packages/desktop-gui/src/dropdown/dropdown.jsx
+++ b/packages/desktop-gui/src/dropdown/dropdown.jsx
@@ -60,7 +60,6 @@ class Dropdown extends Component {
{this._buttonContent()}
)
-
}
_buttonContent () {
diff --git a/packages/desktop-gui/src/lib/utils.js b/packages/desktop-gui/src/lib/utils.js
index 95ac38990d..5fbb8b70ec 100644
--- a/packages/desktop-gui/src/lib/utils.js
+++ b/packages/desktop-gui/src/lib/utils.js
@@ -110,5 +110,4 @@ export function stripSharedDirsFromDir2 (dir1, dir2, osName) {
})
.join(sep)
.value()
-
}
diff --git a/packages/desktop-gui/src/project/onboarding.jsx b/packages/desktop-gui/src/project/onboarding.jsx
index 992f0131fa..57e011f9be 100644
--- a/packages/desktop-gui/src/project/onboarding.jsx
+++ b/packages/desktop-gui/src/project/onboarding.jsx
@@ -116,7 +116,6 @@ class OnBoarding extends Component {
)
-
})
}
diff --git a/packages/desktop-gui/src/runs/permission-message.jsx b/packages/desktop-gui/src/runs/permission-message.jsx
index 2b4264889d..2182835b79 100644
--- a/packages/desktop-gui/src/runs/permission-message.jsx
+++ b/packages/desktop-gui/src/runs/permission-message.jsx
@@ -45,7 +45,6 @@ class PermissionMessage extends Component {
}
return this._noResult()
-
}
_button () {
@@ -101,7 +100,6 @@ class PermissionMessage extends Component {
{this._button()}
)
-
}
_noResult () {
diff --git a/packages/desktop-gui/src/runs/runs-list.jsx b/packages/desktop-gui/src/runs/runs-list.jsx
index 4f293295b3..bbe30580cc 100644
--- a/packages/desktop-gui/src/runs/runs-list.jsx
+++ b/packages/desktop-gui/src/runs/runs-list.jsx
@@ -192,7 +192,6 @@ class RunsList extends Component {
// OR there are no runs to show
if (!this.runsStore.runs.length) {
-
// AND they've never setup CI
if (!project.id) {
return this._projectNotSetup()
@@ -201,7 +200,6 @@ class RunsList extends Component {
}
return this._empty()
-
}
//--------End Run States----------//
diff --git a/packages/desktop-gui/src/update/update-banner.jsx b/packages/desktop-gui/src/update/update-banner.jsx
index ddd0f79ff2..a987d6f5ca 100644
--- a/packages/desktop-gui/src/update/update-banner.jsx
+++ b/packages/desktop-gui/src/update/update-banner.jsx
@@ -94,7 +94,6 @@ class UpdateBanner extends Component {
)
-
}
_checkForUpdate () {
diff --git a/packages/driver/src/cy/commands/actions/click.js b/packages/driver/src/cy/commands/actions/click.js
index cd83ad7cbd..bdab1663f2 100644
--- a/packages/driver/src/cy/commands/actions/click.js
+++ b/packages/driver/src/cy/commands/actions/click.js
@@ -40,7 +40,6 @@ const formatMoveEventsTable = (events) => {
const formatMouseEvents = (events) => {
return _.map(events, (val, key) => {
if (val.skipped) {
-
const reason = val.skipped
return {
diff --git a/packages/driver/src/cy/commands/actions/type.js b/packages/driver/src/cy/commands/actions/type.js
index a5da732b2b..eb83c72937 100644
--- a/packages/driver/src/cy/commands/actions/type.js
+++ b/packages/driver/src/cy/commands/actions/type.js
@@ -246,7 +246,6 @@ module.exports = function (Commands, Cypress, cy, state, config) {
}
return false
-
}
const getDefaultButton = (form) => {
@@ -421,7 +420,6 @@ module.exports = function (Commands, Cypress, cy, state, config) {
onFail: options._log,
args: { chars, allChars },
})
-
},
})
@@ -480,7 +478,6 @@ module.exports = function (Commands, Cypress, cy, state, config) {
}
return type()
-
},
})
}
@@ -577,7 +574,6 @@ module.exports = function (Commands, Cypress, cy, state, config) {
}
return verifyAssertions()
-
})
},
})
diff --git a/packages/driver/src/cy/keyboard.js b/packages/driver/src/cy/keyboard.js
index 60c7039167..109a5e8c83 100644
--- a/packages/driver/src/cy/keyboard.js
+++ b/packages/driver/src/cy/keyboard.js
@@ -125,7 +125,6 @@ const create = (state) => {
options.setKey = '{del}'
return kb.ensureKey(el, null, options, () => {
-
if ($selection.isCollapsed(el)) {
// if there's no text selected, delete the prev char
// if deleted char, send the input event
@@ -138,7 +137,6 @@ const create = (state) => {
// contents and send the input event
$selection.deleteSelectionContents(el)
options.input = true
-
})
},
@@ -167,7 +165,6 @@ const create = (state) => {
options.setKey = '{backspace}'
return kb.ensureKey(el, null, options, () => {
-
if ($selection.isCollapsed(el)) {
// if there's no text selected, delete the prev char
// if deleted char, send the input event
@@ -180,7 +177,6 @@ const create = (state) => {
// contents and send the input event
$selection.deleteSelectionContents(el)
options.input = true
-
})
},
@@ -418,7 +414,6 @@ const create = (state) => {
}
return memo + chars.length
-
}
, 0)
},
@@ -576,7 +571,6 @@ const create = (state) => {
typeKey (el, key, options) {
return kb.ensureKey(el, key, options, () => {
-
const isDigit = isSingleDigitRe.test(key)
const isNumberInputType = $elements.isInput(el) && $elements.isType(el, 'number')
@@ -636,7 +630,6 @@ const create = (state) => {
if (kb.simulateKey(el, 'keydown', key, options)) {
if (kb.simulateKey(el, 'keypress', key, options)) {
if (kb.simulateKey(el, 'textInput', key, options)) {
-
let ml
if ($elements.isInput(el) || $elements.isTextarea(el)) {
@@ -703,7 +696,6 @@ const create = (state) => {
},
resetModifiers (doc) {
-
const activeEl = $elements.getActiveElByDocument(doc)
const activeModifiers = kb.getActiveModifiers(state)
diff --git a/packages/driver/src/cy/mouse.js b/packages/driver/src/cy/mouse.js
index ae5e531331..772478dceb 100644
--- a/packages/driver/src/cy/mouse.js
+++ b/packages/driver/src/cy/mouse.js
@@ -179,12 +179,10 @@ const create = (state, keyboard, focused) => {
sendMouseleave(elToSend, _.extend({}, defaultMouseOptions, { relatedTarget: el }))
})
}
-
}
if (hoveredElChanged) {
if (el && $elements.isAttachedEl(el)) {
-
mouseover = () => {
return sendMouseover(el, _.extend({}, defaultMouseOptions, { relatedTarget: lastHoveredEl }))
}
@@ -215,7 +213,6 @@ const create = (state, keyboard, focused) => {
})
}
}
-
}
pointermove = () => {
@@ -270,7 +267,6 @@ const create = (state, keyboard, focused) => {
* @param {HTMLElement} forceEl
*/
_downEvents (coords, forceEl, pointerEvtOptionsExtend = {}, mouseEvtOptionsExtend = {}) {
-
const { x, y } = coords
const el = forceEl || mouse.moveToCoords(coords)
@@ -323,7 +319,6 @@ const create = (state, keyboard, focused) => {
pointerdownProps,
mousedownProps,
}
-
},
down (fromElViewport, forceEl, pointerEvtOptionsExtend = {}, mouseEvtOptionsExtend = {}) {
@@ -361,7 +356,6 @@ const create = (state, keyboard, focused) => {
// the user clicked inside a focusable element
focused.fireFocus($elToFocus.get(0))
}
-
}
return mouseDownEvents
@@ -414,7 +408,6 @@ const create = (state, keyboard, focused) => {
const mouseClickEvents = mouse._mouseClickEvents(fromElViewport, forceEl, skipClickEvent, mouseEvtOptionsExtend)
return _.extend({}, mouseDownEvents, mouseUpEvents, mouseClickEvents)
-
},
/**
@@ -424,7 +417,6 @@ const create = (state, keyboard, focused) => {
* @param {Window} win
*/
_upEvents (fromElViewport, forceEl, skipMouseEvent, pointerEvtOptionsExtend = {}, mouseEvtOptionsExtend = {}) {
-
const win = state('window')
let defaultOptions = mouse._getDefaultMouseOptions(fromElViewport.x, fromElViewport.y, win)
@@ -458,7 +450,6 @@ const create = (state, keyboard, focused) => {
pointerupProps,
mouseupProps,
}
-
},
_mouseClickEvents (fromElViewport, forceEl, skipClickEvent, mouseEvtOptionsExtend = {}) {
@@ -583,7 +574,6 @@ const sendEvent = (evtName, el, evtOptions, bubbles = false, cancelable = false,
el,
modifiers,
}
-
}
const sendPointerEvent = (el, evtOptions, evtName, bubbles = false, cancelable = false) => {
diff --git a/packages/driver/src/dom/elements.js b/packages/driver/src/dom/elements.js
index 3228dce8fd..7b217529f6 100644
--- a/packages/driver/src/dom/elements.js
+++ b/packages/driver/src/dom/elements.js
@@ -356,7 +356,6 @@ const isFocused = (el) => {
}
const isFocusedOrInFocused = (el) => {
-
const doc = $document.getDocumentFromElement(el)
const { activeElement, body } = doc
@@ -376,7 +375,6 @@ const isFocusedOrInFocused = (el) => {
if (elToCheckCurrentlyFocused && elToCheckCurrentlyFocused === activeElement) {
return true
}
-
}
const isElement = function (obj) {
@@ -453,7 +451,6 @@ const getAllParents = (el) => {
}
return allParents
-
}
const isChild = ($el, $maybeChild) => {
@@ -643,7 +640,6 @@ const isDescendent = ($el1, $el2) => {
}
const findParent = (el, fn) => {
-
const recurse = (curEl, prevEl) => {
if (!curEl) {
return null
@@ -790,7 +786,6 @@ const getElements = ($el) => {
}
return els
-
}
const getContainsSelector = (text, filter = '') => {
diff --git a/packages/driver/src/dom/jquery.js b/packages/driver/src/dom/jquery.js
index 13336cbd8a..7ed2b474b8 100644
--- a/packages/driver/src/dom/jquery.js
+++ b/packages/driver/src/dom/jquery.js
@@ -18,7 +18,6 @@ const unwrap = function (obj) {
}
return obj
-
}
const isJquery = (obj) => {
diff --git a/packages/driver/src/dom/selection.js b/packages/driver/src/dom/selection.js
index c9c4fa4bf2..84d1b674fa 100644
--- a/packages/driver/src/dom/selection.js
+++ b/packages/driver/src/dom/selection.js
@@ -175,7 +175,6 @@ const deleteSelectionContents = function (el) {
}
const setSelectionRange = function (el, start, end) {
-
if ($elements.canSetSelectionRangeElement(el)) {
$elements.callNativeMethod(el, 'setSelectionRange', start, end)
@@ -190,7 +189,6 @@ const setSelectionRange = function (el, start, end) {
start,
end,
}
-
}
const deleteRightOfCursor = function (el) {
@@ -448,7 +446,6 @@ const moveSelectionToEnd = function (el) {
({ length } = $elements.getNativeProp(el, 'value'))
return setSelectionRange(el, length, length)
-
}
if ($elements.isContentEditable(el)) {
diff --git a/packages/driver/src/dom/visibility.js b/packages/driver/src/dom/visibility.js
index 70b873f60c..85fee6aec4 100644
--- a/packages/driver/src/dom/visibility.js
+++ b/packages/driver/src/dom/visibility.js
@@ -141,7 +141,6 @@ const elHasClippableOverflow = function ($el) {
}
const canClipContent = function ($el, $ancestor) {
-
// can't clip without overflow properties
if (!elHasClippableOverflow($ancestor)) {
return false
diff --git a/packages/driver/test/cypress/integration/commands/actions/click_spec.js b/packages/driver/test/cypress/integration/commands/actions/click_spec.js
index 2f6a049c9d..06bdf31146 100644
--- a/packages/driver/test/cypress/integration/commands/actions/click_spec.js
+++ b/packages/driver/test/cypress/integration/commands/actions/click_spec.js
@@ -249,7 +249,6 @@ describe('src/cy/commands/actions/click', () => {
})
it('will send all events even mousedown is defaultPrevented', () => {
-
const $btn = cy.$$('#button')
$btn.get(0).addEventListener('mousedown', (e) => {
@@ -279,7 +278,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('$btn', 'pointerdown pointerup click').each(shouldBeCalledOnce)
cy.getAll('$btn', 'mousedown mouseup').each(shouldNotBeCalled)
-
})
it('sends a click event', (done) => {
@@ -299,7 +297,6 @@ describe('src/cy/commands/actions/click', () => {
})
it('causes focusable elements to receive focus', () => {
-
const el = cy.$$(':text:first')
attachFocusListeners({ el })
@@ -428,7 +425,6 @@ describe('src/cy/commands/actions/click', () => {
metaKey: false,
altKey: false,
})
-
})
})
@@ -611,7 +607,6 @@ describe('src/cy/commands/actions/click', () => {
})
it('places cursor at the end of [contenteditable]', () => {
-
cy.get('[contenteditable]:first')
.invoke('html', '
').click()
.then(($el) => {
@@ -1706,7 +1701,6 @@ describe('src/cy/commands/actions/click', () => {
})
it('throws when attempting to click multiple elements', (done) => {
-
cy.on('fail', (err) => {
expect(err.message).to.eq('cy.click() can only be called on a single element. Your subject contained 4 elements. Pass { multiple: true } if you want to serially click each element.')
@@ -1770,7 +1764,6 @@ describe('src/cy/commands/actions/click', () => {
// Array(1).fill().map(()=>
it('throws when any member of the subject isnt visible', function (done) {
-
// sometimes the command will timeout early with
// Error: coordsHistory must be at least 2 sets of coords
cy.timeout(300)
@@ -2169,7 +2162,6 @@ describe('src/cy/commands/actions/click', () => {
})
cy.get('input:first').click().then(function () {
-
const consoleProps = this.lastLog.invoke('consoleProps')
expect(consoleProps.table[1]()).to.containSubset({
@@ -2237,7 +2229,6 @@ describe('src/cy/commands/actions/click', () => {
},
],
})
-
})
})
@@ -2334,7 +2325,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('btn', 'mousemove mouseover').each(shouldBeCalledOnce)
cy.getAll('btn', 'pointerdown mousedown pointerup mouseup click').each(shouldBeCalledWithCount(2))
.then(function () {
-
const { logs } = this
const logsArr = logs.map((x) => x.invoke('consoleProps'))
@@ -2387,7 +2377,6 @@ describe('src/cy/commands/actions/click', () => {
],
},
])
-
})
})
@@ -2704,7 +2693,6 @@ describe('src/cy/commands/actions/click', () => {
})
it('sends modifiers', () => {
-
const btn = cy.$$('button:first')
attachMouseClickListeners({ btn })
@@ -2894,7 +2882,6 @@ describe('src/cy/commands/actions/click', () => {
it('#consoleProps', function () {
cy.on('log:added', (attrs, log) => {
this.log = log
-
})
cy.get('button').first().dblclick().then(function ($btn) {
@@ -3131,7 +3118,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('el', 'pointerdown mousedown contextmenu pointerup mouseup').each(shouldBeCalled)
cy.getAll('el', 'focus click').each(shouldNotBeCalled)
-
})
it('rightclick cancel pointerdown', () => {
@@ -3147,7 +3133,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('el', 'pointerdown pointerup contextmenu').each(shouldBeCalled)
cy.getAll('el', 'mousedown mouseup').each(shouldNotBeCalled)
-
})
it('rightclick remove el on pointerdown', () => {
@@ -3163,7 +3148,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('el', 'pointerdown').each(shouldBeCalled)
cy.getAll('el', 'mousedown mouseup contextmenu pointerup').each(shouldNotBeCalled)
-
})
it('rightclick remove el on mouseover', () => {
@@ -3183,7 +3167,6 @@ describe('src/cy/commands/actions/click', () => {
cy.getAll('el', 'pointerover mouseover').each(shouldBeCalledOnce)
cy.getAll('el', 'pointerdown mousedown pointerup mouseup contextmenu').each(shouldNotBeCalled)
cy.getAll('el2', 'focus pointerdown pointerup contextmenu').each(shouldBeCalled)
-
})
describe('errors', () => {
@@ -3442,7 +3425,6 @@ describe('src/cy/commands/actions/click', () => {
})
})
})
-
})
})
@@ -3911,7 +3893,6 @@ describe('mouse state', () => {
cy.getAll('input', 'mouseover mouseout').each(shouldBeCalledOnce)
cy.getAll('input', 'mousedown mouseup click').each(shouldNotBeCalled)
-
})
it('can click on a recursively moving element', () => {
@@ -4185,18 +4166,15 @@ describe('mouse state', () => {
expect(stub).to.be.calledOnce
})
})
-
})
describe('user experience', () => {
-
beforeEach(() => {
cy.visit('/fixtures/dom.html')
})
// https://github.com/cypress-io/cypress/issues/4347
it('can render element highlight inside iframe', () => {
-
cy.get('iframe:first')
.should(($iframe) => {
// wait for iframe to load
@@ -4253,5 +4231,4 @@ describe('mouse state', () => {
})
})
})
-
})
diff --git a/packages/driver/test/cypress/integration/commands/actions/type_spec.js b/packages/driver/test/cypress/integration/commands/actions/type_spec.js
index b86ed25b71..ef2eab1680 100644
--- a/packages/driver/test/cypress/integration/commands/actions/type_spec.js
+++ b/packages/driver/test/cypress/integration/commands/actions/type_spec.js
@@ -1013,7 +1013,6 @@ describe('src/cy/commands/actions/type', () => {
it('automatically moves the caret to the end if value is changed manually asynchronously', () => {
cy.$$('#input-without-value').keypress((e) => {
-
const $input = $(e.target)
_.defer(() => {
@@ -1524,7 +1523,6 @@ describe('src/cy/commands/actions/type', () => {
})
describe('specialChars', () => {
-
context('parseSpecialCharSequences: false', () => {
it('types special character sequences literally', (done) => {
cy.get(':text:first').invoke('val', 'foo')
@@ -2538,9 +2536,7 @@ describe('src/cy/commands/actions/type', () => {
})
describe('modifiers', () => {
-
describe('activating modifiers', () => {
-
it('sends keydown event for modifiers in order', (done) => {
const $input = cy.$$('input:text:first')
const events = []
@@ -2680,7 +2676,6 @@ describe('src/cy/commands/actions/type', () => {
})
describe('release: false', () => {
-
it('maintains modifiers for subsequent type commands', (done) => {
const $input = cy.$$('input:text:first')
const events = []
@@ -2798,7 +2793,6 @@ describe('src/cy/commands/actions/type', () => {
})
describe('case-insensitivity', () => {
-
it('special chars are case-insensitive', () => {
cy.get(':text:first').invoke('val', 'bar').type('{leftarrow}{DeL}').then(($input) => {
expect($input).to.have.value('ba')
@@ -3209,7 +3203,6 @@ describe('src/cy/commands/actions/type', () => {
})
describe('caret position', () => {
-
it('respects being formatted by input event handlers')
it('accurately returns host contenteditable attr', () => {
@@ -3266,7 +3259,6 @@ describe('src/cy/commands/actions/type', () => {
})
it('inside textarea', () => {
-
cy.$$('body').append(Cypress.$(/*html*/`\
\
\
@@ -3278,7 +3270,6 @@ describe('src/cy/commands/actions/type', () => {
})
it('inside contenteditable', () => {
-
cy.$$('body').append(Cypress.$(/*html*/`\
\
\
@@ -4042,7 +4033,6 @@ describe('src/cy/commands/actions/type', () => {
if (log.get('name') === 'type') {
expect(log.get('state')).to.eq('pending')
expect(log.get('$el').get(0)).to.eq($txt.get(0))
-
}
})
diff --git a/packages/driver/test/cypress/integration/cy/snapshot_css_spec.js b/packages/driver/test/cypress/integration/cy/snapshot_css_spec.js
index 9406cbffb3..2c32d1c33c 100644
--- a/packages/driver/test/cypress/integration/cy/snapshot_css_spec.js
+++ b/packages/driver/test/cypress/integration/cy/snapshot_css_spec.js
@@ -97,7 +97,6 @@ describe('driver/src/cy/snapshots_css', () => {
})
it('returns same id after css has been modified until a new window', () => {
-
cy.state('document').styleSheets[0].insertRule('.qux { color: orange; }')
snapshotCss.onCssModified('http://localhost:3500/fixtures/generic_styles.css')
const ids1 = snapshotCss.getStyleIds()
diff --git a/packages/driver/test/cypress/integration/dom/visibility_spec.js b/packages/driver/test/cypress/integration/dom/visibility_spec.js
index 60e70fb0e2..ec957c0721 100644
--- a/packages/driver/test/cypress/integration/dom/visibility_spec.js
+++ b/packages/driver/test/cypress/integration/dom/visibility_spec.js
@@ -53,7 +53,6 @@ describe('src/cypress/dom/visibility', () => {
})
it('returns false window and body > window height', () => {
-
cy.$$('body').html('
foo
')
const win = cy.state('window')
diff --git a/packages/driver/test/cypress/integration/e2e/focus_blur_spec.js b/packages/driver/test/cypress/integration/e2e/focus_blur_spec.js
index 7cb33e88d7..4bd0cee014 100644
--- a/packages/driver/test/cypress/integration/e2e/focus_blur_spec.js
+++ b/packages/driver/test/cypress/integration/e2e/focus_blur_spec.js
@@ -65,7 +65,6 @@ const requireWindowInFocus = () => {
if (!hasFocus) {
expect(hasFocus, 'this test requires the window to be in focus').ok
}
-
}
it('can intercept blur/focus events', () => {
@@ -87,7 +86,6 @@ it('can intercept blur/focus events', () => {
cy
.visit('http://localhost:3500/fixtures/active-elements.html')
.then(() => {
-
requireWindowInFocus()
expect(cy.getFocused()).to.be.null
@@ -131,9 +129,7 @@ it('can intercept blur/focus events', () => {
expect(blur).calledOnce
expect(handleBlur).not.called
-
})
-
})
it('blur the activeElement when clicking the body', () => {
@@ -254,7 +250,6 @@ describe('polyfill programmatic blur events', () => {
cy
.visit('http://localhost:3500/fixtures/active-elements.html')
.then(() => {
-
// programmatically focus the first, then second input element
const $one = cy.$$('#one')
const $two = cy.$$('#two')
@@ -302,7 +297,6 @@ describe('polyfill programmatic blur events', () => {
})
})
.then(() => {
-
stub.reset()
setActiveElement($two.get(0))
@@ -339,7 +333,6 @@ describe('polyfill programmatic blur events', () => {
$one.get(0).blur()
cy.then(() => {
-
expect(stub).calledTwice
expect(_.toPlainObject(stub.getCall(0).args[0].originalEvent)).to.containSubset({
@@ -356,7 +349,6 @@ describe('polyfill programmatic blur events', () => {
})
.then(() => {
-
stub.reset()
setActiveElement(cy.$$('body').get(0))
@@ -365,7 +357,6 @@ describe('polyfill programmatic blur events', () => {
expect(stub, 'should not send blur if not focused el').not.called
})
-
})
})
@@ -374,7 +365,6 @@ describe('polyfill programmatic blur events', () => {
cy
.visit('http://localhost:3500/fixtures/active-elements.html')
.then(() => {
-
// programmatically focus the first, then second input element
const $one = cy.$$(`
`).appendTo(cy.$$('body'))
cy.wrap($svg).focus().should('have.focus')
-
})
it('focus area', () => {
@@ -675,7 +651,6 @@ describe('intercept blur methods correctly', () => {
`).appendTo(cy.$$('body'))
cy.get('area').focus().should('have.focus')
-
})
})
@@ -684,7 +659,6 @@ describe('intercept blur methods correctly', () => {
it('does not send focus events for focusable elements that are w3c hidden', () => {
cy.visit('http://localhost:3500/fixtures/active-elements.html')
.then(() => {
-
cy.$$('
')
.appendTo(cy.$$('body'))
@@ -710,7 +684,6 @@ describe('intercept blur methods correctly', () => {
cy.get('no-focus-2').should('not.be.visible')
cy.get('no-focus-3').should('not.be.visible')
cy.get('no-focus-4').should('not.be.visible')
-
})
})
@@ -719,7 +692,6 @@ describe('intercept blur methods correctly', () => {
it('does send focus events for focusable elements that are 0x0 size', () => {
cy.visit('http://localhost:3500/fixtures/active-elements.html')
.then(() => {
-
cy.$$('
')
.appendTo(cy.$$('body'))
@@ -732,7 +704,6 @@ describe('intercept blur methods correctly', () => {
expect(stub).calledOnce
cy.get('#focus-1').should('not.be.visible')
-
})
})
})
diff --git a/packages/driver/test/cypress/integration/e2e/selector_playground.spec.js b/packages/driver/test/cypress/integration/e2e/selector_playground.spec.js
index 019bc70d0b..88231bf36d 100644
--- a/packages/driver/test/cypress/integration/e2e/selector_playground.spec.js
+++ b/packages/driver/test/cypress/integration/e2e/selector_playground.spec.js
@@ -1,9 +1,7 @@
describe('selector_playground', () => {
-
it('draws rect over currently hovered element', () => {
cy.visit('/fixtures/dom.html')
.then(() => {
-
// We trick the selector-playground into rendering while the test is running
top.Runner.configureMobx({ enforceActions: 'never' })
top.Runner.state.isRunning = false
@@ -23,7 +21,6 @@ describe('selector_playground', () => {
cy.get('input:first')
.trigger('mousemove', { force: true })
.should(expectToBeCovered)
-
})
})
})
diff --git a/packages/driver/test/cypress/integration/issues/3847_spec.js b/packages/driver/test/cypress/integration/issues/3847_spec.js
index 2f68fda57c..a9cb645441 100644
--- a/packages/driver/test/cypress/integration/issues/3847_spec.js
+++ b/packages/driver/test/cypress/integration/issues/3847_spec.js
@@ -25,7 +25,6 @@ describe('issue 3847', () => {
// Unhandled rejection TypeError: Cannot read property 'error' of undefined
it('options { log: false } will not throw Unhandled rejection', (done) => {
-
// error should seem like { log: true }
cy.on('fail', (err) => {
expect(err.message).to.eql(error.message)
diff --git a/packages/driver/test/cypress/integration/util/limited_map_spec.js b/packages/driver/test/cypress/integration/util/limited_map_spec.js
index 13b7bc9c6c..65606df922 100644
--- a/packages/driver/test/cypress/integration/util/limited_map_spec.js
+++ b/packages/driver/test/cypress/integration/util/limited_map_spec.js
@@ -60,6 +60,5 @@ describe('driver/src/util/limited_map', () => {
expect(limitedMap.size).to.equal(5)
expect(Array.from(limitedMap.values())[0]).to.equal(2)
expect(Array.from(limitedMap.values())[4]).to.equal(6)
-
})
})
diff --git a/packages/driver/test/cypress/support/utils.js b/packages/driver/test/cypress/support/utils.js
index fd869bfc0a..d7b48c44ac 100644
--- a/packages/driver/test/cypress/support/utils.js
+++ b/packages/driver/test/cypress/support/utils.js
@@ -17,14 +17,12 @@ export const findReactInstance = function (dom) {
return internalInstance._debugOwner
? internalInstance._debugOwner.stateNode
: internalInstance.return.stateNode
-
}
export const clickCommandLog = (sel) => {
return cy.wait(10)
.then(() => {
withMutableReporterState(() => {
-
const commandLogEl = getCommandLogWithText(sel)
const reactCommandInstance = findReactInstance(commandLogEl[0])
@@ -54,5 +52,4 @@ export const withMutableReporterState = (fn) => {
.then(() => {
top.Runner.configureMobx({ enforceActions: 'strict' })
})
-
}
diff --git a/packages/network/lib/agent.ts b/packages/network/lib/agent.ts
index e16c92f6e1..9da79c4d99 100644
--- a/packages/network/lib/agent.ts
+++ b/packages/network/lib/agent.ts
@@ -17,7 +17,7 @@ interface RequestOptionsWithProxy extends http.RequestOptions {
}
type FamilyCache = {
- [host: string] : 4 | 6
+ [host: string]: 4 | 6
}
export function buildConnectReqHead (hostname: string, port: string, proxy: url.Url) {
diff --git a/packages/reporter/src/commands/command-model.spec.js b/packages/reporter/src/commands/command-model.spec.js
index 301a47a348..9dc2f27c29 100644
--- a/packages/reporter/src/commands/command-model.spec.js
+++ b/packages/reporter/src/commands/command-model.spec.js
@@ -29,7 +29,6 @@ describe('Command model', () => {
})
context('.isLongRunning', () => {
-
describe('when model is pending on initialization and LONG_RUNNING_THRESHOLD passes', () => {
let command
diff --git a/packages/reporter/src/runnables/suite-model.js b/packages/reporter/src/runnables/suite-model.js
index 02fe2024bf..173d08e46b 100644
--- a/packages/reporter/src/runnables/suite-model.js
+++ b/packages/reporter/src/runnables/suite-model.js
@@ -20,7 +20,6 @@ export default class Suite extends Runnable {
}
return 'processing'
-
}
@computed get _childStates () {
diff --git a/packages/reporter/src/test/test.jsx b/packages/reporter/src/test/test.jsx
index cea42fdd19..c2309b7fd0 100644
--- a/packages/reporter/src/test/test.jsx
+++ b/packages/reporter/src/test/test.jsx
@@ -134,7 +134,6 @@ class Test extends Component {
this.isOpen = !this.isOpen
}
}
-
}
export { NoCommands }
diff --git a/packages/runner/src/app/app.spec.jsx b/packages/runner/src/app/app.spec.jsx
index dc8c037804..13224d2d83 100644
--- a/packages/runner/src/app/app.spec.jsx
+++ b/packages/runner/src/app/app.spec.jsx
@@ -39,7 +39,6 @@ const shallowRender = (component) => {
}
describe('
', () => {
-
it('renders the reporter wrap with the reporter width', () => {
const props = createProps()
diff --git a/packages/runner/src/dropdown/dropdown.jsx b/packages/runner/src/dropdown/dropdown.jsx
index 64fa2809c6..b331137cf7 100644
--- a/packages/runner/src/dropdown/dropdown.jsx
+++ b/packages/runner/src/dropdown/dropdown.jsx
@@ -19,7 +19,6 @@ export default class Dropdown extends Component {
{this._items()}
)
-
}
_caret () {
diff --git a/packages/runner/src/iframe/visit-failure.js b/packages/runner/src/iframe/visit-failure.js
index 951033a223..896c105e61 100644
--- a/packages/runner/src/iframe/visit-failure.js
+++ b/packages/runner/src/iframe/visit-failure.js
@@ -10,7 +10,6 @@ export default (props) => {
}
const getStatus = () => {
-
if (!status) {
return ''
}
diff --git a/packages/runner/src/lib/logger.js b/packages/runner/src/lib/logger.js
index 0cd7546691..850fb8f9f6 100644
--- a/packages/runner/src/lib/logger.js
+++ b/packages/runner/src/lib/logger.js
@@ -84,7 +84,6 @@ export default {
},
_logTable (consoleProps) {
-
if (isMultiEntryTable(consoleProps.table)) {
_.each(
_.sortBy(consoleProps.table, (val, key) => key),
diff --git a/packages/runner/src/lib/state.js b/packages/runner/src/lib/state.js
index 404eb32282..86141b7a1f 100644
--- a/packages/runner/src/lib/state.js
+++ b/packages/runner/src/lib/state.js
@@ -97,7 +97,6 @@ export default class State {
top: (actualHeight + this.headerHeight + nudge),
},
}
-
}
@action setIsLoading (isLoading) {
diff --git a/packages/runner/src/lib/util.js b/packages/runner/src/lib/util.js
index 6245011b68..85e53764e7 100644
--- a/packages/runner/src/lib/util.js
+++ b/packages/runner/src/lib/util.js
@@ -17,7 +17,6 @@ export default {
}
return ''
-
},
absoluteSpecPath (config) {
diff --git a/packages/runner/test/helper.js b/packages/runner/test/helper.js
index 50a6198141..dd2df244cf 100644
--- a/packages/runner/test/helper.js
+++ b/packages/runner/test/helper.js
@@ -17,7 +17,6 @@ const _useFakeTimers = sinon.useFakeTimers
let timers = []
sinon.useFakeTimers = function (...args) {
-
const ret = _useFakeTimers.apply(this, args)
timers.push(ret)
diff --git a/packages/server/lib/browsers/cri-client.ts b/packages/server/lib/browsers/cri-client.ts
index a9a2635970..5e1ff13759 100644
--- a/packages/server/lib/browsers/cri-client.ts
+++ b/packages/server/lib/browsers/cri-client.ts
@@ -36,7 +36,7 @@ interface CRIWrapper {
* Sends a command to the Chrome remote interface.
* @example client.send('Page.navigate', { url })
*/
- send (command: CRI.Command, params: object):Promise
+ send (command: CRI.Command, params: object): Promise
/**
* Exposes Chrome remote interface Page domain,
* buton only for certain actions that are hard to do using "send"
@@ -53,7 +53,7 @@ interface CRIWrapper {
/**
* Calls underlying remote interface client close
*/
- close ():Promise
+ close (): Promise
}
const maybeDebugCdpMessages = (cri) => {
@@ -79,7 +79,6 @@ const maybeDebugCdpMessages = (cri) => {
debugVerboseReceive('received CDP message %o', data)
})
-
}
if (debugVerboseSend.enabled) {
@@ -115,7 +114,7 @@ export const create = async (debuggerUrl: websocketUrl): Promise =>
* that logs every command sent.
*/
const client: CRIWrapper = {
- send (command: CRI.Command, params: object):Promise {
+ send (command: CRI.Command, params: object): Promise {
return cri.send(command, params)
},
@@ -125,7 +124,7 @@ export const create = async (debuggerUrl: websocketUrl): Promise =>
return cri.on(eventName, cb)
},
- close ():Promise {
+ close (): Promise {
return cri.close()
},
}
diff --git a/packages/server/lib/gui/menu.js b/packages/server/lib/gui/menu.js
index 41b4964243..9ea88ce287 100644
--- a/packages/server/lib/gui/menu.js
+++ b/packages/server/lib/gui/menu.js
@@ -194,7 +194,6 @@ module.exports = {
}
return 'Ctrl+Shift+I'
-
})(),
click: (item, focusedWindow) => {
if (focusedWindow) {
diff --git a/packages/server/lib/modes/run.js b/packages/server/lib/modes/run.js
index e6257b14d0..b3d85d538c 100644
--- a/packages/server/lib/modes/run.js
+++ b/packages/server/lib/modes/run.js
@@ -423,7 +423,7 @@ const getChromeProps = (isHeaded, project, writeVideoFrame) => {
if (isHeaded && writeVideoFrame) {
props.screencastFrame = (e) => {
// https://chromedevtools.github.io/devtools-protocol/tot/Page#event-screencastFrame
- writeVideoFrame(new Buffer(e.data, 'base64'))
+ writeVideoFrame(Buffer.from(e.data, 'base64'))
}
}
})
diff --git a/packages/server/lib/plugins/child/task.js b/packages/server/lib/plugins/child/task.js
index 79cacf8f74..8cda37ad62 100644
--- a/packages/server/lib/plugins/child/task.js
+++ b/packages/server/lib/plugins/child/task.js
@@ -42,7 +42,6 @@ const wrap = (ipc, events, ids, args) => {
}
return '__cypress_unhandled__'
-
}
util.wrapChildPromise(ipc, invoke, ids, [arg])
diff --git a/packages/server/lib/util/app_data.js b/packages/server/lib/util/app_data.js
index 77d87d871e..aa147615ff 100644
--- a/packages/server/lib/util/app_data.js
+++ b/packages/server/lib/util/app_data.js
@@ -31,7 +31,6 @@ const getSymlinkType = function () {
}
return 'dir'
-
}
const isProduction = () => {
diff --git a/packages/server/lib/util/args.js b/packages/server/lib/util/args.js
index d5de5fd37f..065002c1a5 100644
--- a/packages/server/lib/util/args.js
+++ b/packages/server/lib/util/args.js
@@ -30,7 +30,6 @@ const normalizeBackslash = function (s) {
}
return s
-
}
const normalizeBackslashes = function (options) {
diff --git a/packages/server/lib/util/file.js b/packages/server/lib/util/file.js
index dfa8cf05f5..7270f04c53 100644
--- a/packages/server/lib/util/file.js
+++ b/packages/server/lib/util/file.js
@@ -127,7 +127,6 @@ class File {
}
throw err
-
})
.finally(() => {
debug('read succeeded or failed for %s', this.path)
diff --git a/packages/server/lib/util/replace_stream.ts b/packages/server/lib/util/replace_stream.ts
index 776ded08bf..ee423ff6c8 100644
--- a/packages/server/lib/util/replace_stream.ts
+++ b/packages/server/lib/util/replace_stream.ts
@@ -6,7 +6,7 @@ interface IGraphemeSplitter {
nextBreak: (string: string, at: number) => number
}
-const splitter : IGraphemeSplitter = new GraphemeSplitter()
+const splitter: IGraphemeSplitter = new GraphemeSplitter()
/**
* UTF-8 grapheme aware stream replacer
diff --git a/packages/server/lib/util/settings.js b/packages/server/lib/util/settings.js
index 8d8575b6e3..def3b56fb9 100644
--- a/packages/server/lib/util/settings.js
+++ b/packages/server/lib/util/settings.js
@@ -110,7 +110,6 @@ module.exports = {
}
return memo
-
}
, _.cloneDeep(obj))
},
@@ -175,7 +174,6 @@ module.exports = {
//# else write the new reduced obj
return this._write(file, changed)
-
}).catch((err) => {
if (errors.isCypressErr(err)) {
throw err
diff --git a/packages/server/lib/util/shell.js b/packages/server/lib/util/shell.js
index 2021873dfe..36c31f639f 100644
--- a/packages/server/lib/util/shell.js
+++ b/packages/server/lib/util/shell.js
@@ -77,7 +77,6 @@ const sourceShellCommand = function (cmd, shell) {
//# so suppress it by sending it to /dev/null and ignore
//# any failures with this
return `source ${profilePath} > /dev/null 2>&1; ${cmd}`
-
}
const findBash = () => {
diff --git a/packages/server/lib/util/system.js b/packages/server/lib/util/system.js
index 023a019590..4e6f0bcce3 100644
--- a/packages/server/lib/util/system.js
+++ b/packages/server/lib/util/system.js
@@ -24,7 +24,6 @@ const getOsVersion = () => {
}
return os.release()
-
})
}
diff --git a/packages/server/lib/util/terminal.js b/packages/server/lib/util/terminal.js
index 3b8760e1cd..eecad49298 100644
--- a/packages/server/lib/util/terminal.js
+++ b/packages/server/lib/util/terminal.js
@@ -151,7 +151,6 @@ const wrapBordersInGray = (chars) => {
}
return char
-
})
}
diff --git a/packages/server/test/e2e/2_cdp_spec.ts b/packages/server/test/e2e/2_cdp_spec.ts
index 546b2214c1..f32ad1c180 100644
--- a/packages/server/test/e2e/2_cdp_spec.ts
+++ b/packages/server/test/e2e/2_cdp_spec.ts
@@ -5,7 +5,7 @@ const Fixtures = require('../support/helpers/fixtures')
describe('e2e cdp', function () {
e2e.setup()
- let restoreEnv : Function
+ let restoreEnv: Function
beforeEach(() => {
restoreEnv = mockedEnv({
diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js
index 520842f07d..43059d8f4d 100644
--- a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js
+++ b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/visit_response_never_ends_failing_spec.js
@@ -1,5 +1,4 @@
context('response timeouts result in an error', () => {
-
// ESOCKETTIMEDOUT after ~2 seconds
it('handles no response errors on the initial visit', () => {
cy
diff --git a/packages/server/test/unit/browsers/protocol_spec.ts b/packages/server/test/unit/browsers/protocol_spec.ts
index c9e29fae09..7473bd4d65 100644
--- a/packages/server/test/unit/browsers/protocol_spec.ts
+++ b/packages/server/test/unit/browsers/protocol_spec.ts
@@ -15,7 +15,7 @@ describe('lib/browsers/protocol', function () {
context('._getDelayMsForRetry', function () {
it('retries as expected for up to 5 seconds', function () {
let delays = []
- let delay : number
+ let delay: number
let i = 0
while ((delay = protocol._getDelayMsForRetry(i))) {
diff --git a/packages/server/test/unit/gui/auth_spec.js b/packages/server/test/unit/gui/auth_spec.js
index 44057207ce..770a0975d1 100644
--- a/packages/server/test/unit/gui/auth_spec.js
+++ b/packages/server/test/unit/gui/auth_spec.js
@@ -108,5 +108,4 @@ describe('lib/gui/auth', function () {
})
})
})
-
})
diff --git a/packages/server/test/unit/stream_buffer_spec.js b/packages/server/test/unit/stream_buffer_spec.js
index be48f473b4..973e5d551c 100644
--- a/packages/server/test/unit/stream_buffer_spec.js
+++ b/packages/server/test/unit/stream_buffer_spec.js
@@ -221,5 +221,4 @@ describe('lib/util/stream_buffer', () => {
pt.end()
})
-
})
diff --git a/packages/ts/index.d.ts b/packages/ts/index.d.ts
index 8a6e412ce4..b1f619bcec 100644
--- a/packages/ts/index.d.ts
+++ b/packages/ts/index.d.ts
@@ -27,7 +27,7 @@ declare module 'http' {
}
interface ClientRequest {
- _header: { [key: string]:string }
+ _header: { [key: string]: string }
_implicitHeader: () => void
output: string[]
agent: Agent
@@ -76,7 +76,7 @@ declare type Optional = T | void
declare module 'plist' {
interface Plist {
- parse: (s:string) => any
+ parse: (s: string) => any
}
const plist: Plist
export = plist
diff --git a/packages/web-config/node-jsdom-setup.ts b/packages/web-config/node-jsdom-setup.ts
index aa94300cb7..5f53f4ab28 100644
--- a/packages/web-config/node-jsdom-setup.ts
+++ b/packages/web-config/node-jsdom-setup.ts
@@ -60,7 +60,6 @@ export const register = ({
const Module = require('module')
const overrideRequire = () => {
-
const _load = Module._load
Module._load = function (...args) {
@@ -84,7 +83,6 @@ export const register = ({
return ret
}
-
}
overrideRequire()
diff --git a/scripts/binary/util/testStaticAssets.js b/scripts/binary/util/testStaticAssets.js
index ea0879e1b7..9607e5d108 100644
--- a/scripts/binary/util/testStaticAssets.js
+++ b/scripts/binary/util/testStaticAssets.js
@@ -110,7 +110,6 @@ const testPackageStaticAssets = async (options = {}) => {
la(!!foundAssets.length, stripIndent`
expected assets to be found in ${chalk.green(opts.assetGlob)}
`)
-
}
module.exports = {
@@ -119,7 +118,6 @@ module.exports = {
}
function includesCount (string, subString) {
-
string += ''
subString += ''
if (subString.length <= 0) return (string.length + 1)
@@ -152,5 +150,4 @@ const includesString = (fileStr, options) => {
const passed = count >= atLeast
return [passed, count, atLeast]
-
}
diff --git a/scripts/binary/util/transform-requires.js b/scripts/binary/util/transform-requires.js
index 3b803ece6a..26023b29a6 100644
--- a/scripts/binary/util/transform-requires.js
+++ b/scripts/binary/util/transform-requires.js
@@ -55,15 +55,12 @@ const transformRequires = async function (buildResourcePath) {
shouldWriteFile = true
return replaceString
-
})
if (shouldWriteFile) {
debug('writing to file:', chalk.red(item))
await fs.writeFile(item, newFile)
-
}
-
})
return replaceCount
diff --git a/scripts/link-packages.js b/scripts/link-packages.js
index 2b448a0afe..319f04b8b2 100644
--- a/scripts/link-packages.js
+++ b/scripts/link-packages.js
@@ -11,7 +11,6 @@ const glob = Promise.promisify(globber)
const pathToPackages = path.join(__dirname, '..', 'node_modules', '@packages')
function deleteOutputFolder () {
-
console.log('deleting ', pathToPackages)
return fs.remove(pathToPackages)
diff --git a/scripts/unit/binary/util/packages-spec.js b/scripts/unit/binary/util/packages-spec.js
index 2966844d5b..06701e077e 100644
--- a/scripts/unit/binary/util/packages-spec.js
+++ b/scripts/unit/binary/util/packages-spec.js
@@ -30,7 +30,7 @@ describe('packages', () => {
'packages': {
'coffee': {
'package.json': '{"main":"src/main.js", "name": "foo", "files": ["lib"]}',
- 'src': { 'main.js': new Buffer('console.log()') },
+ 'src': { 'main.js': Buffer.from('console.log()') },
'lib': { 'foo.js': '{}' },
},
},
@@ -77,7 +77,6 @@ describe('packages', () => {
})
describe('transformRequires', () => {
-
it('can find and replace symlink requires', async () => {
const buildRoot = 'build/linux/Cypress/resources/app'
@@ -85,12 +84,12 @@ describe('transformRequires', () => {
[buildRoot]: { 'packages': {
'foo': {
'package.json': '{"main":"src/main.js", "name": "foo", "files": ["lib"]}',
- 'src': { 'main.js': new Buffer('console.log()') },
+ 'src': { 'main.js': Buffer.from('console.log()') },
'lib': { 'foo.js': /*js*/`require("@packages/bar/src/main")${''}` },
},
'bar': {
'package.json': '{"main":"src/main.js", "name": "foo", "files": ["lib"]}',
- 'src': { 'main.js': new Buffer('console.log()') },
+ 'src': { 'main.js': Buffer.from('console.log()') },
'lib': { 'foo.js': `require("@packages/foo/lib/somefoo")${''}` },
'node_modules': { 'no-search.js': '' },
'dist': { 'no-search.js': '' },
@@ -115,12 +114,12 @@ describe('transformRequires', () => {
[buildRoot]: { 'packages': {
'foo': {
'package.json': '{"main":"src/main.js", "name": "foo", "files": ["lib"]}',
- 'src': { 'main.js': new Buffer('console.log()') },
+ 'src': { 'main.js': Buffer.from('console.log()') },
'lib': { 'foo.js': /*js*/`require("@packages/bar/src/main")${''}` },
},
'bar': {
'package.json': '{"main":"src/main.js", "name": "foo", "files": ["lib"]}',
- 'src': { 'main.js': new Buffer('console.log()') },
+ 'src': { 'main.js': Buffer.from('console.log()') },
'lib': { 'foo.js': `require("@packages/foo/lib/somefoo")${''}` },
'node_modules': { 'no-search.js': '' },
'dist': { 'no-search.js': '' },
@@ -179,7 +178,6 @@ describe('testStaticAssets', () => {
badStrings: ['some really bad string'],
})).to.rejected.with.eventually
.property('message').contain('assets to be found')
-
})
it('can detect asset with too many lines', async () => {
@@ -280,7 +278,6 @@ const getFs = () => {
const cwd = process.cwd().split('/').slice(1)
const recurse = (dir, d) => {
-
if (_.isString(dir)) {
return dir
}
@@ -289,7 +286,6 @@ const getFs = () => {
let nextDepth = null
if (d !== null) {
-
if (d === -1) {
nextDepth = d + 1
} else if (!(d > cwd.length) && key === cwd[d]) {