diff --git a/client/karma.js b/client/karma.js index 04715c059..71b2fa346 100644 --- a/client/karma.js +++ b/client/karma.js @@ -199,7 +199,7 @@ function Karma (socket, iframe, opener, navigator, location, document) { // Convert all array-like objects to real arrays. for (var propertyName in originalResult) { - if (originalResult.hasOwnProperty(propertyName)) { + if (Object.prototype.hasOwnProperty.call(originalResult, propertyName)) { var propertyValue = originalResult[propertyName] if (Object.prototype.toString.call(propertyValue) === '[object Array]') { diff --git a/cucumber.js b/cucumber.js index 90677cdef..8cf034dc9 100644 --- a/cucumber.js +++ b/cucumber.js @@ -9,5 +9,5 @@ const options = [ ] module.exports = { - 'default': options.join(' ') + default: options.join(' ') } diff --git a/lib/browser.js b/lib/browser.js index 0a0360f7a..c3ab8cc21 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -121,7 +121,7 @@ class Browser { reconnect (newSocket) { if (this.state === EXECUTING_DISCONNECTED) { - this.log.debug(`Lost socket connection, but browser continued to execute. Reconnected ` + + this.log.debug('Lost socket connection, but browser continued to execute. Reconnected ' + `on socket ${newSocket.id}.`) this.setState(EXECUTING) } else if ([CONNECTED, CONFIGURING, EXECUTING].includes(this.state)) { diff --git a/lib/config.js b/lib/config.js index 956577f65..1ea49b85c 100644 --- a/lib/config.js +++ b/lib/config.js @@ -162,7 +162,7 @@ function normalizeConfig (config, configFilePath) { config.protocol = 'http:' } - if (config.proxies && config.proxies.hasOwnProperty(config.urlRoot)) { + if (config.proxies && Object.prototype.hasOwnProperty.call(config.proxies, config.urlRoot)) { log.warn(`"${config.urlRoot}" is proxied, you should probably change urlRoot to avoid conflicts`) } diff --git a/lib/helper.js b/lib/helper.js index 34b349efd..e77418039 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -72,10 +72,9 @@ exports.mmPatternWeight = (pattern) => { } exports.mmComparePatternWeights = (weight1, weight2) => { - let n1, n2, diff - n1 = weight1[0] - n2 = weight2[0] - diff = n1 - n2 + const n1 = weight1[0] + const n2 = weight2[0] + const diff = n1 - n2 if (diff !== 0) return diff / Math.abs(diff) return weight1.length > 1 ? exports.mmComparePatternWeights(weight1.slice(1), weight2.slice(1)) : 0 } diff --git a/lib/init.js b/lib/init.js index eb9b03555..8aab1eadd 100755 --- a/lib/init.js +++ b/lib/init.js @@ -121,7 +121,7 @@ var questions = [{ condition: (answers) => answers.requirejs }, { id: 'includedFiles', - question: `Which files do you want to include with