diff --git a/bin/phantomas.js b/bin/phantomas.js index 2e6756bad..354d19ab1 100755 --- a/bin/phantomas.js +++ b/bin/phantomas.js @@ -13,8 +13,6 @@ const { getProgram, parseArgv } = require("./program"), phantomas = require(".."), debug = require("debug")("phantomas:cli"); -var url = ""; - // parse command line arguments let options = parseArgv(process.argv); @@ -25,7 +23,7 @@ if (typeof options.url !== "string" && typeof options.config === "undefined") { process.exit(1); } -url = options.url; +const url = options.url; debug("url: %s", url); delete options.url; diff --git a/bin/program.js b/bin/program.js index 9ad066804..952281801 100644 --- a/bin/program.js +++ b/bin/program.js @@ -11,7 +11,7 @@ function getProgram() { program .name("phantomas") .description( - "Headless Chromium-based web performance metrics collector and monitoring tool" + "Headless Chromium-based web performance metrics collector and monitoring tool", ) .version(phantomas.version) .usage("--url [options]") @@ -27,15 +27,15 @@ function getProgram() { .option("-d, --debug", "run phantomas in debug mode") .option( "--modules ", - "run selected modules only [moduleOne],[moduleTwo],..." + "run selected modules only [moduleOne],[moduleTwo],...", ) .option( "--include-dirs ", - "load modules from specified directories [dirOne],[dirTwo],..." + "load modules from specified directories [dirOne],[dirTwo],...", ) .option( "--skip-modules ", - "skip selected modules [moduleOne],[moduleTwo],..." + "skip selected modules [moduleOne],[moduleTwo],...", ) // .option( @@ -54,66 +54,66 @@ function getProgram() { // HTTP options .option( "--auth-user ", - "sets the user name used for HTTP authentication" + "sets the user name used for HTTP authentication", ) .option( "--auth-pass ", - "sets the password used for HTTP authentication" + "sets the password used for HTTP authentication", ) .option( "--cookie ", - 'document.cookie formatted string for setting a single cookie (e.g. "bar=foo;domain=url")' + 'document.cookie formatted string for setting a single cookie (e.g. "bar=foo;domain=url")', ) .option( "--cookies-file ", - "specifies the file name to store the persistent Cookies" + "specifies the file name to store the persistent Cookies", ) .option( "--local-storage ", - 'ability to set a local storage, key-value pairs (e.g. "bar=foo;domain=url")' + 'ability to set a local storage, key-value pairs (e.g. "bar=foo;domain=url")', ) .option( "--session-storage ", - 'ability to set a session storage, key-value pairs (e.g. "bar=foo;domain=url")' + 'ability to set a session storage, key-value pairs (e.g. "bar=foo;domain=url")', ) .option( "--ignore-ssl-errors", - "ignores SSL errors, such as expired or self-signed certificate errors" + "ignores SSL errors, such as expired or self-signed certificate errors", ) .option( "--proxy ", - "specifies the proxy server to use (e.g. --proxy=192.168.1.42:8080)" + "specifies the proxy server to use (e.g. --proxy=192.168.1.42:8080)", ) .option( "--proxy-auth ", - "specifies the authentication information for the proxy" + "specifies the authentication information for the proxy", ) .option( "--proxy-type ", - "specifies the type of the proxy server [http|socks5|none]" + "specifies the type of the proxy server [http|socks5|none]", ) .option( "--ssl-protocol ", - "sets the SSL protocol for secure connections [sslv3|sslv2|tlsv1|any]" + "sets the SSL protocol for secure connections [sslv3|sslv2|tlsv1|any]", ) // Runtime options .option( "--allow-domain ", - "allow requests to given domain(s) - aka whitelist [domain],[domain],..." + "allow requests to given domain(s) - aka whitelist [domain],[domain],...", ) .option( "--block-domain ", - "disallow requests to given domain(s) - aka blacklist [domain],[domain],..." + "disallow requests to given domain(s) - aka blacklist [domain],[domain],...", ) .option( "--disable-js", - "disable JavaScript on the page that will be loaded" + "disable JavaScript on the page that will be loaded", ) .option("--no-externals", "block requests to 3rd party domains") .option( "--post-load-delay ", - "wait X seconds before generating a report" + "wait X seconds before generating a report", ) .option("--scroll", "scroll down the page when it's loaded") .option("--spy-eval", "report calls to eval()") @@ -121,11 +121,11 @@ function getProgram() { .option("--timeout ", "timeout for phantomas run", 15) .option( "--wait-for-event ", - "wait for a given phantomas event before generating a report" + "wait for a given phantomas event before generating a report", ) .option( "--wait-for-selector ", - "wait for an element matching given CSS selector before generating a report" + "wait for an element matching given CSS selector before generating a report", ) .option("--scroll", "scroll down the page when it's loaded") @@ -135,23 +135,23 @@ function getProgram() { .option("--colors", "forces ANSI colors even when output is piped") .option( "--film-strip", - "register film strip when page is loading (a comma separated list of milliseconds can be passed)" + "register film strip when page is loading (a comma separated list of milliseconds can be passed)", ) .option( "--film-strip-dir ", - "folder path to output film strip (default is ./filmstrip directory)" + "folder path to output film strip (default is ./filmstrip directory)", ) .option("--har ", "save HAR to a given file") .option("--log ", "log to a given file") .option("--page-source", "save page source to file") .option( "--page-source-dir ", - "folder path to output page source (default is ./html directory)" + "folder path to output page source (default is ./html directory)", ) .option("--pretty", "render formatted JSON") .option( "--screenshot ", - "render the viewport to a given file once fully loaded" + "render the viewport to a given file once fully loaded", ) .option("--full-page-screenshot", "enlarge the screenshot to full page") .option("-s, --silent", "don't write anything to the console"); diff --git a/bin/utils.js b/bin/utils.js index fd7d82efa..81b569ae8 100644 --- a/bin/utils.js +++ b/bin/utils.js @@ -1,4 +1,5 @@ -const decamelize = require("decamelize"); +// @ts-check +const decamelize = require("decamelize").default; function decamelizeOptions(options) { // decamelize option names as returned by commander (see issue #863) diff --git a/core/modules/requestsMonitor/requestsMonitor.js b/core/modules/requestsMonitor/requestsMonitor.js index 0877bb4bb..3e63809d3 100644 --- a/core/modules/requestsMonitor/requestsMonitor.js +++ b/core/modules/requestsMonitor/requestsMonitor.js @@ -153,7 +153,7 @@ function addContentType(headerValue, entry) { default: debug( - "Unknown content type found: " + value + " for <" + entry.url + ">" + "Unknown content type found: " + value + " for <" + entry.url + ">", ); } @@ -185,7 +185,7 @@ module.exports = function (phantomas) { // request data // https://github.com/GoogleChrome/puppeteer/blob/v1.11.0/docs/api.md#class-request phantomas.emit("send", request); // @desc request has been sent - } + }, ); phantomas.on( @@ -213,7 +213,7 @@ module.exports = function (phantomas) { if (entry.transferedSize == 0) { entry.transferedSize = parseInt( entry.headers["content-length"] || "0", - 10 + 10, ); } @@ -240,7 +240,7 @@ module.exports = function (phantomas) { // resp.timing is empty when handling data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D assert( typeof resp.timing !== "undefined", - "resp.timing is empty when handling " + resp.url + "resp.timing is empty when handling " + resp.url, ); // how long a given request stalled waiting for DNS, proxy, connection, SSL negotation, etc. @@ -290,7 +290,7 @@ module.exports = function (phantomas) { headerValue, entry.bodySize / 1024, entry.transferedSize / 1024, - entry.bodySize / entry.transferedSize + entry.bodySize / entry.transferedSize, ); } @@ -366,13 +366,13 @@ module.exports = function (phantomas) { "recv: HTTP %d <%s> [%s]", entry.status, entry.url, - entry.contentType + entry.contentType, ); phantomas.emit("recv", entry, resp); // @desc response has been received } phantomas.log("Response metadata: %j", entry); - } + }, ); // completion of the last HTTP request @@ -382,7 +382,7 @@ module.exports = function (phantomas) { phantomas.on("recv", (entry) => phantomas.setMetric( "httpTrafficCompleted", - entry.recvEndTime - loadStartedTime - ) + entry.recvEndTime - loadStartedTime, + ), ); }; diff --git a/core/modules/timeToFirstByte/timeToFirstByte.js b/core/modules/timeToFirstByte/timeToFirstByte.js index de8485ae7..fb00f5765 100644 --- a/core/modules/timeToFirstByte/timeToFirstByte.js +++ b/core/modules/timeToFirstByte/timeToFirstByte.js @@ -29,7 +29,7 @@ module.exports = function (phantomas) { "Time to first byte: set to %d ms for request to <%s> (HTTP %d)", entry.timeToFirstByte, entry.url, - entry.status + entry.status, ); phantomas.log("Time to last byte: set to %d ms", entry.timeToLastByte); diff --git a/core/scope.js b/core/scope.js index bafe4c528..99c33a4a9 100644 --- a/core/scope.js +++ b/core/scope.js @@ -69,7 +69,7 @@ } function getBacktrace() { - var stack = []; + let stack; try { throw new Error("backtrace"); @@ -81,7 +81,7 @@ } function getCaller(stepBack) { - var caller = false; + let caller; stepBack = stepBack || 0; @@ -112,7 +112,7 @@ try { origConsoleLog.call( console, - "log:" + stringify(Array.prototype.slice.call(arguments)) + "log:" + stringify(Array.prototype.slice.call(arguments)), ); // eslint-disable-next-line no-empty } catch (e) {} @@ -192,7 +192,7 @@ phantomas.log( "Spying " + (enabled ? "enabled" : "disabled") + - (reason ? " - " + reason : "") + (reason ? " - " + reason : ""), ); } @@ -208,7 +208,7 @@ phantomas.log( 'spy: attaching to "%s" function%s', fn, - reportResults ? " with results reporting" : "" + reportResults ? " with results reporting" : "", ); obj[fn] = function () { @@ -218,7 +218,7 @@ if (enabled && typeof callback === "function") { callback.apply( this, - reportResults === true ? [results].concat(args) : args + reportResults === true ? [results].concat(args) : args, ); } @@ -266,8 +266,8 @@ * Example: body.logged_out.vis-public.env-production > div > div */ function getDOMPath(node, dontGoUpTheDom /* = false */) { - var path = [], - entry = ""; + let path = [], + entry; if (node === window) { return "window"; @@ -303,8 +303,8 @@ 0, Array.prototype.indexOf.call( node.parentNode.children || node.parentNode.childNodes, - node - ) + node, + ), ) + "]"; } @@ -329,6 +329,6 @@ phantomas.log( "phantomas page scope initialized for <%s> (is an iframe: %s)", window.location.toString(), - window.parent !== window + window.parent !== window, ); })(window); diff --git a/examples/config.json.example b/examples/config.json.example index 4deb7d334..a4a0a64a4 100644 --- a/examples/config.json.example +++ b/examples/config.json.example @@ -1,24 +1,24 @@ { - "url": "http://phantomjs.org", - "verbose": true, - "reporter": "tap:no-skip", - "block-domain": "google-analytics.com, amazonaws.com", - "cookies": [ - { - "name": "mobile", - "value": "on", - "domain": ".phantomjs.org" - }, - { - "name": "foo", - "value": "bar" - } - ], - "asserts": { - "requests": 12, - "redirects": 0, - "domains": 2, - "timeToFirstByte": 600, - "httpTrafficCompleted": 1000 - } + "url": "http://phantomjs.org", + "verbose": true, + "reporter": "tap:no-skip", + "block-domain": "google-analytics.com, amazonaws.com", + "cookies": [ + { + "name": "mobile", + "value": "on", + "domain": ".phantomjs.org" + }, + { + "name": "foo", + "value": "bar" + } + ], + "asserts": { + "requests": 12, + "redirects": 0, + "domains": 2, + "timeToFirstByte": 600, + "httpTrafficCompleted": 1000 + } } diff --git a/examples/index.js b/examples/index.js index 0b3341e2a..38590c619 100755 --- a/examples/index.js +++ b/examples/index.js @@ -41,7 +41,7 @@ promise.on("recv", (response) => { response.method, response.url, response.contentType, - response.httpVersion + response.httpVersion, ); }); diff --git a/extensions/devices/devices.js b/extensions/devices/devices.js index 32d6bcc47..add30764f 100644 --- a/extensions/devices/devices.js +++ b/extensions/devices/devices.js @@ -26,7 +26,7 @@ module.exports = function (phantomas) { if (typeof device === "undefined") { phantomas.log( "No profile selected (available: %s)", - Object.keys(availableDevices).join(", ") + Object.keys(availableDevices).join(", "), ); return; } @@ -42,7 +42,7 @@ module.exports = function (phantomas) { 'Devices: %s provided - using "%s" profile: %j', device, profileName, - deviceProfile + deviceProfile, ); // @see https://github.com/GoogleChrome/puppeteer/blob/v1.11.0/docs/api.md#pageemulateoptions diff --git a/extensions/httpAuth/httpAuth.js b/extensions/httpAuth/httpAuth.js index 7450405a3..744914a40 100644 --- a/extensions/httpAuth/httpAuth.js +++ b/extensions/httpAuth/httpAuth.js @@ -18,7 +18,7 @@ module.exports = function (phantomas) { phantomas.log( "Set HTTP authentication: %s (pass: %s)", username, - new Array(password.length + 1).join("*") + new Array(password.length + 1).join("*"), ); }); }; diff --git a/extensions/pageSource/pageSource.js b/extensions/pageSource/pageSource.js index 2b926e901..28d219d40 100644 --- a/extensions/pageSource/pageSource.js +++ b/extensions/pageSource/pageSource.js @@ -11,7 +11,7 @@ module.exports = (phantomas) => { if (!phantomas.getParam("page-source")) { phantomas.log( - "To enable page-source of page being loaded run phantomas with --page-source option" + "To enable page-source of page being loaded run phantomas with --page-source option", ); return; } diff --git a/extensions/pageStorage/pageStorage.js b/extensions/pageStorage/pageStorage.js index 98ef448f5..e4a57f63a 100644 --- a/extensions/pageStorage/pageStorage.js +++ b/extensions/pageStorage/pageStorage.js @@ -23,7 +23,7 @@ module.exports = function (phantomas) { if (sessionStorage) { phantomas.log( "Injecting sessionStorage: %j", - JSON.stringify(sessionStorage) + JSON.stringify(sessionStorage), ); await injectStorage(page, sessionStorage, SESSION_STORAGE); } @@ -76,7 +76,7 @@ module.exports = function (phantomas) { storage, storageType, SESSION_STORAGE, - LOCAL_STORAGE + LOCAL_STORAGE, ); } }; diff --git a/extensions/screenshot/screenshot.js b/extensions/screenshot/screenshot.js index 375561470..d3abb7b25 100644 --- a/extensions/screenshot/screenshot.js +++ b/extensions/screenshot/screenshot.js @@ -11,7 +11,7 @@ module.exports = function (phantomas) { if (typeof param === "undefined") { phantomas.log( - "Screenshot: to enable screenshot of the page run phantomas with --screenshot option" + "Screenshot: to enable screenshot of the page run phantomas with --screenshot option", ); return; } @@ -19,7 +19,7 @@ module.exports = function (phantomas) { if (fullPage === true) { // the full page option is now disabled by default (bug #853) phantomas.log( - "Screenshot: --full-page-screenshot option enabled. Please note that the option can cause layout bugs and lazyloadableImagesUnderTheFold miscount" + "Screenshot: --full-page-screenshot option enabled. Please note that the option can cause layout bugs and lazyloadableImagesUnderTheFold miscount", ); } diff --git a/extensions/scroll/scroll.js b/extensions/scroll/scroll.js index 9ea818200..f8a11b2e2 100644 --- a/extensions/scroll/scroll.js +++ b/extensions/scroll/scroll.js @@ -10,7 +10,7 @@ module.exports = function (phantomas) { if (!scroll) { phantomas.log( - "Scroll: pass --scroll option to scroll down the page when it's loaded" + "Scroll: pass --scroll option to scroll down the page when it's loaded", ); return; } diff --git a/extensions/userAgent/userAgent.js b/extensions/userAgent/userAgent.js index 32ac3d35c..5655d7759 100644 --- a/extensions/userAgent/userAgent.js +++ b/extensions/userAgent/userAgent.js @@ -33,7 +33,7 @@ module.exports = function (phantomas) { if (typeof param !== "undefined") { phantomas.log( "userAgent: --user-agent option detected with value %s", - param + param, ); userAgent = param; } diff --git a/extensions/viewport/viewport.js b/extensions/viewport/viewport.js index 4b7d806e1..67bcddbb8 100644 --- a/extensions/viewport/viewport.js +++ b/extensions/viewport/viewport.js @@ -14,7 +14,7 @@ module.exports = function (phantomas) { if (viewport === undefined) { phantomas.log( - "No viewport option specified, will use the device default viewport" + "No viewport option specified, will use the device default viewport", ); return; } diff --git a/lib/browser.js b/lib/browser.js index dc7a9d383..19eea8b2b 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -54,7 +54,7 @@ Browser.prototype.init = async (phantomasOptions) => { if (env["DOCKERIZED"]) { debug("Docker environment detected"); debug( - "In case of problems refer to https://github.com/macbre/phantomas/blob/devel/Troubleshooting.md" + "In case of problems refer to https://github.com/macbre/phantomas/blob/devel/Troubleshooting.md", ); } @@ -68,7 +68,7 @@ Browser.prototype.init = async (phantomasOptions) => { "--no-sandbox", "--no-zygote", "--disable-gpu", - "--single-process" + "--single-process", ); } @@ -152,7 +152,7 @@ Browser.prototype.init = async (phantomasOptions) => { request.method, request.url, request._initiator.type, - request.headers + request.headers, ); this.events.emit("request", request); // @desc Emitted when page is about to send HTTP request @@ -184,7 +184,7 @@ Browser.prototype.init = async (phantomasOptions) => { // the browser sometimes looses trace of a request, let's ignore. networkDebug( "Can't find request id %d in previous requests", - data.requestId + data.requestId, ); return; } @@ -231,14 +231,14 @@ Browser.prototype.init = async (phantomasOptions) => { networkDebug( "Content for #%s received (%d bytes)", data.requestId, - body.length + body.length, ); } catch (err) { // In case the resource was dumped after a redirect // https://github.com/puppeteer/puppeteer/issues/2258 networkDebug( "Could not read the content of #%s. It was probably removed from the browser's buffer by a redirect.", - data.requestId + data.requestId, ); } @@ -259,7 +259,7 @@ Browser.prototype.init = async (phantomasOptions) => { 0)) / 1024 ).toFixed(1), - ((1.0 * response.dataLength) / 1024).toFixed(1) + ((1.0 * response.dataLength) / 1024).toFixed(1), ); this.events.emit("response", response); // @desc Emitted when page received a HTTP response }; @@ -267,13 +267,13 @@ Browser.prototype.init = async (phantomasOptions) => { // https://chromedevtools.github.io/devtools-protocol/tot/Network#event-loadingFinished // Fired when HTTP request has finished loading this.cdp.on("Network.loadingFinished", (data) => - this.onRequestLoaded("loadingFinished", data) + this.onRequestLoaded("loadingFinished", data), ); // https://chromedevtools.github.io/devtools-protocol/tot/Network#event-loadingFailed // Fired when HTTP request has failed to load (e.g. HTTP 404) this.cdp.on("Network.loadingFailed", (data) => - this.onRequestLoaded("loadingFailed", data) + this.onRequestLoaded("loadingFailed", data), ); // https://chromedevtools.github.io/devtools-protocol/tot/Network#event-dataReceived diff --git a/lib/collection.js b/lib/collection.js index a1746d2f0..d1a2c373b 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -26,7 +26,7 @@ collection.prototype = { sortedKeys = Object.keys(this.items).sort( function (a, b) { return this.items[b].cnt - this.items[a].cnt; - }.bind(this) + }.bind(this), ); // build new items dictionary diff --git a/lib/index.js b/lib/index.js index 767cabf94..5ab5b6843 100644 --- a/lib/index.js +++ b/lib/index.js @@ -78,7 +78,7 @@ function phantomas(url, opts) { // @see https://github.com/GoogleChrome/puppeteer/blob/v1.11.0/docs/api.md#pageselector-1 querySelectorAll: async function querySelectorAll( - selector + selector, ) /* istanbul ignore next */ { debug('querySelectorAll("%s")', selector); return page.$$(selector); @@ -152,15 +152,15 @@ function phantomas(url, opts) { "<%s> response code is HTTP %d %s", entry.url, entry.status, - entry.statusText + entry.statusText, ); // close the browser before leaving here, otherwise subsequent instances will have problems await browser.close(); reject( new Error( - "HTTP response code from <" + entry.url + "> is " + entry.status - ) + "HTTP response code from <" + entry.url + "> is " + entry.status, + ), ); } diff --git a/lib/metadata/generate.js b/lib/metadata/generate.js index 14da112f6..14a300176 100755 --- a/lib/metadata/generate.js +++ b/lib/metadata/generate.js @@ -74,7 +74,7 @@ function getModuleMetadata(moduleFile) { const localPath = moduleFile.replace( fs.realpathSync(__dirname + "/../../"), - "" + "", ); data.localPath = localPath; @@ -95,7 +95,7 @@ function getModuleMetadata(moduleFile) { debug( "Found duplicated definition of %s metric in %s module", metricName, - moduleName + moduleName, ); } continue; @@ -106,14 +106,14 @@ function getModuleMetadata(moduleFile) { metricComment = metricComment.split("@desc").pop().trim(); entry.desc = ""; - ["unreliable", "optional", "offenders", "gecko"].forEach(function ( - marker - ) { - if (metricComment.indexOf("@" + marker) > -1) { - entry[marker] = true; - metricComment = metricComment.replace("@" + marker, "").trim(); - } - }); + ["unreliable", "optional", "offenders", "gecko"].forEach( + function (marker) { + if (metricComment.indexOf("@" + marker) > -1) { + entry[marker] = true; + metricComment = metricComment.replace("@" + marker, "").trim(); + } + }, + ); // detect units (defaults to ms) if ((matches = metricComment.match(/\[([^\]]+)\]/)) !== null) { @@ -121,7 +121,7 @@ function getModuleMetadata(moduleFile) { metricComment = metricComment.replace(matches[0], "").trim(); } else if ( /^(number of|total number of|average specificity|total specificity|median of number|maximum number|maximum level)/.test( - metricComment + metricComment, ) ) { metricUnit = "number"; @@ -133,7 +133,7 @@ function getModuleMetadata(moduleFile) { // check if offenders are reported for this metric let offenderRegex = new RegExp( - "phantomas.addOffender\\([\\n\\r\\s]*[\"']" + metricName + "[\"']" + "phantomas.addOffender\\([\\n\\r\\s]*[\"']" + metricName + "[\"']", ); if (content.search(offenderRegex) > -1) { entry.offenders = true; @@ -145,7 +145,7 @@ function getModuleMetadata(moduleFile) { debug( "Metadata missing for %s metric in %s module", metricName, - moduleName + moduleName, ); } @@ -195,7 +195,7 @@ const coveredMetrics = getMetricsCoveredByTests(spec); debug( "Found %d metrics covered by integration-spec.yaml...", - coveredMetrics.length + coveredMetrics.length, ); // find all options covered by integration tests (take a look into integration-spec.yaml) @@ -204,7 +204,7 @@ const coveredOptions = getOptionsCoveredByTests(spec); debug( "Found %d options covered by integration-spec.yaml: --%s", coveredOptions.length, - coveredOptions.join(", --") + coveredOptions.join(", --"), ); // find all modules @@ -216,7 +216,7 @@ debug("Looking for modules in %s...", dir); glob.sync(dir + "/core/modules/**/*.js"), glob.sync(dir + "/modules/**/*.js"), glob.sync(dir + "/extensions/**/*.js"), - glob.sync(dir + "/lib/*.js") + glob.sync(dir + "/lib/*.js"), ) .forEach(function (moduleFile) { const data = getModuleMetadata(moduleFile); @@ -281,5 +281,5 @@ fs.writeFile(filename, content, function (err) { debug( "Metrics found: %d (tests coverage: %s%)", metadata.metricsCount, - ((coveredMetrics.length / metadata.metricsCount) * 100).toFixed(2) + ((coveredMetrics.length / metadata.metricsCount) * 100).toFixed(2), ); diff --git a/lib/metadata/make_docs.js b/lib/metadata/make_docs.js index aacdbf9e9..292ad3515 100644 --- a/lib/metadata/make_docs.js +++ b/lib/metadata/make_docs.js @@ -106,7 +106,7 @@ ${dumped} spec = yaml.load( fs .readFileSync(__dirname + "/../../test/integration-spec.yaml") - .toString() + .toString(), ); var offenders = {}; diff --git a/modules/ajaxRequests/scope.js b/modules/ajaxRequests/scope.js index 73ee007fa..9420ecff0 100644 --- a/modules/ajaxRequests/scope.js +++ b/modules/ajaxRequests/scope.js @@ -14,6 +14,6 @@ phantomas.log("synchronous XMLHttpRequest call to <%s>", url); } }, - true + true, ); })(window.__phantomas); diff --git a/modules/analyzeCss/analyzeCss.js b/modules/analyzeCss/analyzeCss.js index 3a4102c8d..dab500cc2 100644 --- a/modules/analyzeCss/analyzeCss.js +++ b/modules/analyzeCss/analyzeCss.js @@ -44,7 +44,7 @@ module.exports = function (phantomas) { if (phantomas.getParam("analyze-css") !== true) { phantomas.log( - "To enable CSS in-depth metrics please run phantomas with --analyze-css option" + "To enable CSS in-depth metrics please run phantomas with --analyze-css option", ); return; } @@ -211,7 +211,7 @@ module.exports = function (phantomas) { } resolve(); - }) + }), ); }); diff --git a/modules/analyzeCss/scope.js b/modules/analyzeCss/scope.js index f305abfa4..1960b9960 100644 --- a/modules/analyzeCss/scope.js +++ b/modules/analyzeCss/scope.js @@ -19,7 +19,7 @@ } else { phantomas.log( 'analyzeCss: inline