From 3d4f4bc75fb86152b7d1e537a39e6cea353ced1b Mon Sep 17 00:00:00 2001 From: soulgalore Date: Wed, 28 Jan 2015 15:42:07 +0100 Subject: [PATCH] added eslint & use strict --- bin/sitespeed.js | 8 ++++++++ lib/aggregators/aggregator.js | 6 ++++-- lib/aggregators/browsertime/genericTimeMetric.js | 2 ++ lib/aggregators/gpsi/requests.js | 1 + lib/aggregators/gpsi/score.js | 1 + lib/aggregators/har/genericTimeMetric.js | 7 ++++--- lib/aggregators/headless/genericTimeMetric.js | 1 + lib/aggregators/webpagetest/TTFB.js | 1 + lib/aggregators/webpagetest/bytes.js | 1 + lib/aggregators/webpagetest/firstPaint.js | 1 + lib/aggregators/webpagetest/imageSavings.js | 1 + lib/aggregators/webpagetest/imageTotal.js | 1 + lib/aggregators/webpagetest/loadTime.js | 1 + lib/aggregators/webpagetest/render.js | 1 + lib/aggregators/webpagetest/request.js | 1 + lib/aggregators/webpagetest/serverRTT.js | 1 + lib/aggregators/webpagetest/speedIndex.js | 1 + lib/aggregators/webpagetest/userTimings.js | 1 + lib/aggregators/webpagetest/visualComplete.js | 1 + lib/aggregators/wptAggregator.js | 2 ++ lib/aggregators/wptMetric.js | 2 ++ lib/aggregators/yslow/browserScaledImages.js | 2 ++ lib/aggregators/yslow/cacheTime.js | 2 ++ lib/aggregators/yslow/criticalPathScore.js | 2 ++ lib/aggregators/yslow/cssImagesPerPage.js | 2 ++ lib/aggregators/yslow/cssPerPage.js | 2 ++ lib/aggregators/yslow/cssWeight.js | 2 ++ lib/aggregators/yslow/cssWeightPerPage.js | 6 ++++-- lib/aggregators/yslow/docWeight.js | 2 ++ lib/aggregators/yslow/domElements.js | 2 ++ lib/aggregators/yslow/fontsPerPage.js | 2 ++ lib/aggregators/yslow/imagesPerPage.js | 2 ++ lib/aggregators/yslow/imagesWeight.js | 2 ++ lib/aggregators/yslow/imagesWeightPerPage.js | 2 ++ lib/aggregators/yslow/jsPerPage.js | 2 ++ lib/aggregators/yslow/jsSyncInHead.js | 2 ++ lib/aggregators/yslow/jsWeight.js | 2 ++ lib/aggregators/yslow/jsWeightPerPage.js | 2 ++ lib/aggregators/yslow/maxRequestsPerHost.js | 2 ++ lib/aggregators/yslow/noduplicates.js | 2 ++ lib/aggregators/yslow/numberOfDomains.js | 2 ++ lib/aggregators/yslow/pageWeight.js | 2 ++ lib/aggregators/yslow/pagesWithSPOF.js | 1 + lib/aggregators/yslow/redirectsPerPage.js | 1 + lib/aggregators/yslow/requests.js | 2 ++ lib/aggregators/yslow/requestsWithoutExpires.js | 2 ++ lib/aggregators/yslow/requestsWithoutGzip.js | 2 ++ lib/aggregators/yslow/ruleScore.js | 7 +++++++ lib/aggregators/yslow/singleDomainRequests.js | 2 ++ lib/aggregators/yslow/spofPerPage.js | 2 ++ lib/aggregators/yslow/timeSinceLastMod.js | 2 ++ lib/analyze/analyzer.js | 2 ++ lib/analyze/browsertime.js | 1 + lib/analyze/gpsi.js | 1 + lib/analyze/headless.js | 2 ++ lib/analyze/screenshots.js | 2 ++ lib/analyze/webpagetest.js | 1 + lib/analyze/yslow.js | 2 ++ lib/analyzeMultipleSites.js | 7 +++++++ lib/analyzeOneSite.js | 8 ++++++++ lib/cli.js | 1 + lib/collector.js | 1 + lib/collectors/assets.js | 3 ++- lib/collectors/assetsByTiming.js | 1 + lib/collectors/domains.js | 2 +- lib/collectors/pages.js | 2 ++ lib/config.js | 7 +++++++ lib/crawler/crawler.js | 2 ++ lib/graphite.js | 1 + lib/headless/headlessTiming.js | 6 ++++-- lib/postTasks/copyAssets.js | 2 ++ lib/postTasks/renderAssetsHTML.js | 2 ++ lib/postTasks/renderDomainsHTML.js | 2 ++ lib/postTasks/renderErrorsHTML.js | 2 ++ lib/postTasks/renderHotlistsHTML.js | 2 ++ lib/postTasks/renderPagesHTML.js | 2 ++ lib/postTasks/renderRules.js | 2 ++ lib/postTasks/renderScreenshots.js | 4 +++- lib/postTasks/renderSummaryHTML.js | 3 ++- lib/postTasks/sendToGraphite.js | 3 ++- lib/postTasks/storeResult.js | 2 ++ lib/postTasks/storeSummary.js | 2 ++ lib/requestTiming.js | 3 ++- lib/siteHTMLRenderer.js | 1 + lib/sitesHTMLRenderer.js | 1 + lib/sitespeed.js | 1 + lib/tests/jUnitTestSuites.js | 10 +++++++++- lib/tests/tap.js | 4 +++- lib/tests/testRenderer.js | 2 ++ lib/util/fileHelpers.js | 7 +++++++ lib/util/hbHelpers.js | 2 ++ lib/util/hotlist.js | 9 ++++++++- lib/util/htmlRenderer.js | 7 +++++++ lib/util/util.js | 1 + lib/util/yslowUtil.js | 4 +++- package.json | 2 +- 96 files changed, 223 insertions(+), 20 deletions(-) diff --git a/bin/sitespeed.js b/bin/sitespeed.js index 55f46d9d6..98ef5ae4a 100755 --- a/bin/sitespeed.js +++ b/bin/sitespeed.js @@ -1,5 +1,13 @@ #!/usr/bin/env node +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; + var Sitespeed = require('../lib/sitespeed'), config = require('../lib/cli'), winston = require('winston'); diff --git a/lib/aggregators/aggregator.js b/lib/aggregators/aggregator.js index ab48de745..c3424c8f6 100644 --- a/lib/aggregators/aggregator.js +++ b/lib/aggregators/aggregator.js @@ -4,8 +4,10 @@ * and other contributors * Released under the Apache 2.0 License */ -var Stats = require('fast-stats').Stats; -var util = require('../util/util'); +'use strict'; + +var Stats = require('fast-stats').Stats, + util = require('../util/util'); /** * Create a aggregator that collects and aggregates statistics from web pages. diff --git a/lib/aggregators/browsertime/genericTimeMetric.js b/lib/aggregators/browsertime/genericTimeMetric.js index b575d7d9a..47e8c381d 100644 --- a/lib/aggregators/browsertime/genericTimeMetric.js +++ b/lib/aggregators/browsertime/genericTimeMetric.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Stats = require('fast-stats').Stats; var util = require('../../util/util'); var timeMetrics = {}; diff --git a/lib/aggregators/gpsi/requests.js b/lib/aggregators/gpsi/requests.js index ea9e48a43..bcd197f88 100644 --- a/lib/aggregators/gpsi/requests.js +++ b/lib/aggregators/gpsi/requests.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Aggregator = require('../aggregator'), winston = require('winston'); diff --git a/lib/aggregators/gpsi/score.js b/lib/aggregators/gpsi/score.js index bcc0c98d3..a9c64d401 100644 --- a/lib/aggregators/gpsi/score.js +++ b/lib/aggregators/gpsi/score.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Aggregator = require('../aggregator'); module.exports = new Aggregator('scoreGPSI', 'Google Page Speed Insights Score', diff --git a/lib/aggregators/har/genericTimeMetric.js b/lib/aggregators/har/genericTimeMetric.js index 23856c8fe..6a73690bf 100644 --- a/lib/aggregators/har/genericTimeMetric.js +++ b/lib/aggregators/har/genericTimeMetric.js @@ -4,8 +4,9 @@ * and other contributors * Released under the Apache 2.0 License */ -var Stats = require('fast-stats').Stats; -var util = require('../../util/util'); +'use strict'; +var Stats = require('fast-stats').Stats, + util = require('../../util/util'); var timeMetrics = {}; var descriptions = {}; @@ -70,4 +71,4 @@ exports.generateResults = function() { exports.clear = function() { timeMetrics = {}; -}; \ No newline at end of file +}; diff --git a/lib/aggregators/headless/genericTimeMetric.js b/lib/aggregators/headless/genericTimeMetric.js index a486233a9..7b1f52197 100644 --- a/lib/aggregators/headless/genericTimeMetric.js +++ b/lib/aggregators/headless/genericTimeMetric.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Stats = require('fast-stats').Stats; var util = require('../../util/util'); var timeMetrics = {}; diff --git a/lib/aggregators/webpagetest/TTFB.js b/lib/aggregators/webpagetest/TTFB.js index bb9bf919b..e5fd608a3 100644 --- a/lib/aggregators/webpagetest/TTFB.js +++ b/lib/aggregators/webpagetest/TTFB.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('TTFBWPT', diff --git a/lib/aggregators/webpagetest/bytes.js b/lib/aggregators/webpagetest/bytes.js index 40e5dddfd..ce36459b9 100644 --- a/lib/aggregators/webpagetest/bytes.js +++ b/lib/aggregators/webpagetest/bytes.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('BytesWPT', diff --git a/lib/aggregators/webpagetest/firstPaint.js b/lib/aggregators/webpagetest/firstPaint.js index 7539c054b..28b6f8574 100644 --- a/lib/aggregators/webpagetest/firstPaint.js +++ b/lib/aggregators/webpagetest/firstPaint.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('FirstPaintWPT', diff --git a/lib/aggregators/webpagetest/imageSavings.js b/lib/aggregators/webpagetest/imageSavings.js index 2669014dc..29fd798da 100644 --- a/lib/aggregators/webpagetest/imageSavings.js +++ b/lib/aggregators/webpagetest/imageSavings.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('ImageSavingsWPT', diff --git a/lib/aggregators/webpagetest/imageTotal.js b/lib/aggregators/webpagetest/imageTotal.js index 231eb61c0..14355da7f 100644 --- a/lib/aggregators/webpagetest/imageTotal.js +++ b/lib/aggregators/webpagetest/imageTotal.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('ImageTotalWPT', diff --git a/lib/aggregators/webpagetest/loadTime.js b/lib/aggregators/webpagetest/loadTime.js index 6220c356e..3c51b1a2a 100644 --- a/lib/aggregators/webpagetest/loadTime.js +++ b/lib/aggregators/webpagetest/loadTime.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('LoadTimeWPT', diff --git a/lib/aggregators/webpagetest/render.js b/lib/aggregators/webpagetest/render.js index a8dda0b52..9804ddf12 100644 --- a/lib/aggregators/webpagetest/render.js +++ b/lib/aggregators/webpagetest/render.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('RenderWPT', diff --git a/lib/aggregators/webpagetest/request.js b/lib/aggregators/webpagetest/request.js index 9b4c9781c..66b7e2a8d 100644 --- a/lib/aggregators/webpagetest/request.js +++ b/lib/aggregators/webpagetest/request.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('RequestsWPT', diff --git a/lib/aggregators/webpagetest/serverRTT.js b/lib/aggregators/webpagetest/serverRTT.js index 4fc5bcd46..1a4cde40f 100644 --- a/lib/aggregators/webpagetest/serverRTT.js +++ b/lib/aggregators/webpagetest/serverRTT.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('ServerRTTWPT', diff --git a/lib/aggregators/webpagetest/speedIndex.js b/lib/aggregators/webpagetest/speedIndex.js index 8bd4abc4b..0d5ade154 100644 --- a/lib/aggregators/webpagetest/speedIndex.js +++ b/lib/aggregators/webpagetest/speedIndex.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('SpeedIndexWPT', diff --git a/lib/aggregators/webpagetest/userTimings.js b/lib/aggregators/webpagetest/userTimings.js index 18635e4bf..388b18791 100644 --- a/lib/aggregators/webpagetest/userTimings.js +++ b/lib/aggregators/webpagetest/userTimings.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('userTiming', diff --git a/lib/aggregators/webpagetest/visualComplete.js b/lib/aggregators/webpagetest/visualComplete.js index 26c2d4acd..c55891f67 100644 --- a/lib/aggregators/webpagetest/visualComplete.js +++ b/lib/aggregators/webpagetest/visualComplete.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var WPTAggregator = require('../wptAggregator'); module.exports = new WPTAggregator('VisualCompleteWPT', diff --git a/lib/aggregators/wptAggregator.js b/lib/aggregators/wptAggregator.js index dfe78468d..fb344e320 100644 --- a/lib/aggregators/wptAggregator.js +++ b/lib/aggregators/wptAggregator.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../util/util'); var WPTMetric = require('./wptMetric'); var views = ['firstView', 'repeatView']; diff --git a/lib/aggregators/wptMetric.js b/lib/aggregators/wptMetric.js index 170db411f..88ad4d343 100644 --- a/lib/aggregators/wptMetric.js +++ b/lib/aggregators/wptMetric.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Stats = require('fast-stats').Stats; function WPTMetric(metricName, view, location, browser, connectivity) { diff --git a/lib/aggregators/yslow/browserScaledImages.js b/lib/aggregators/yslow/browserScaledImages.js index 2fc9fb0a1..f49b8a4c0 100644 --- a/lib/aggregators/yslow/browserScaledImages.js +++ b/lib/aggregators/yslow/browserScaledImages.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('browserScaledImages', diff --git a/lib/aggregators/yslow/cacheTime.js b/lib/aggregators/yslow/cacheTime.js index 367b5df78..932fcaca6 100644 --- a/lib/aggregators/yslow/cacheTime.js +++ b/lib/aggregators/yslow/cacheTime.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/criticalPathScore.js b/lib/aggregators/yslow/criticalPathScore.js index 14c98f3a5..78675e0e3 100644 --- a/lib/aggregators/yslow/criticalPathScore.js +++ b/lib/aggregators/yslow/criticalPathScore.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('criticalPathScore', diff --git a/lib/aggregators/yslow/cssImagesPerPage.js b/lib/aggregators/yslow/cssImagesPerPage.js index 55dfe9e23..a1c9c8b55 100644 --- a/lib/aggregators/yslow/cssImagesPerPage.js +++ b/lib/aggregators/yslow/cssImagesPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('cssImagesPerPage', diff --git a/lib/aggregators/yslow/cssPerPage.js b/lib/aggregators/yslow/cssPerPage.js index 91a7aa35f..703854d47 100644 --- a/lib/aggregators/yslow/cssPerPage.js +++ b/lib/aggregators/yslow/cssPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('cssPerPage', 'Number of CSS files per page', diff --git a/lib/aggregators/yslow/cssWeight.js b/lib/aggregators/yslow/cssWeight.js index f038456db..4d581e68d 100644 --- a/lib/aggregators/yslow/cssWeight.js +++ b/lib/aggregators/yslow/cssWeight.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('cssWeight', 'CSS Weight', diff --git a/lib/aggregators/yslow/cssWeightPerPage.js b/lib/aggregators/yslow/cssWeightPerPage.js index d80e72253..ca15b634b 100644 --- a/lib/aggregators/yslow/cssWeightPerPage.js +++ b/lib/aggregators/yslow/cssWeightPerPage.js @@ -4,8 +4,10 @@ * and other contributors * Released under the Apache 2.0 License */ -var Aggregator = require('../aggregator'); -var util = require('../../util/yslowUtil'); +'use strict'; + +var Aggregator = require('../aggregator'), + util = require('../../util/yslowUtil'); module.exports = new Aggregator('cssWeightPerPage', 'CSS File Weight Per Page', 'Do not download large front-end CSS framework when you only use small parts of it.', diff --git a/lib/aggregators/yslow/docWeight.js b/lib/aggregators/yslow/docWeight.js index ae35dccb9..275b79d53 100644 --- a/lib/aggregators/yslow/docWeight.js +++ b/lib/aggregators/yslow/docWeight.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('docWeight', 'Document Weight', diff --git a/lib/aggregators/yslow/domElements.js b/lib/aggregators/yslow/domElements.js index e9fcc814c..b6d948ed4 100644 --- a/lib/aggregators/yslow/domElements.js +++ b/lib/aggregators/yslow/domElements.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('domElements', 'Number of DOM elements', diff --git a/lib/aggregators/yslow/fontsPerPage.js b/lib/aggregators/yslow/fontsPerPage.js index 4e323d7ad..ff7d55912 100644 --- a/lib/aggregators/yslow/fontsPerPage.js +++ b/lib/aggregators/yslow/fontsPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('fontsPerPage', 'Number of font files per page', diff --git a/lib/aggregators/yslow/imagesPerPage.js b/lib/aggregators/yslow/imagesPerPage.js index b186b7690..505446db9 100644 --- a/lib/aggregators/yslow/imagesPerPage.js +++ b/lib/aggregators/yslow/imagesPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('imagesPerPage', 'Number of images per page', diff --git a/lib/aggregators/yslow/imagesWeight.js b/lib/aggregators/yslow/imagesWeight.js index 090e54564..68c95df8d 100644 --- a/lib/aggregators/yslow/imagesWeight.js +++ b/lib/aggregators/yslow/imagesWeight.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('imageWeight', 'Image Weight', diff --git a/lib/aggregators/yslow/imagesWeightPerPage.js b/lib/aggregators/yslow/imagesWeightPerPage.js index 527c2d3d7..a2e25a1d5 100644 --- a/lib/aggregators/yslow/imagesWeightPerPage.js +++ b/lib/aggregators/yslow/imagesWeightPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); var util = require('../../util/yslowUtil'); diff --git a/lib/aggregators/yslow/jsPerPage.js b/lib/aggregators/yslow/jsPerPage.js index a509edf47..0cf82d578 100644 --- a/lib/aggregators/yslow/jsPerPage.js +++ b/lib/aggregators/yslow/jsPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('jsPerPage', 'Number of JS files per page', diff --git a/lib/aggregators/yslow/jsSyncInHead.js b/lib/aggregators/yslow/jsSyncInHead.js index 7597ec2c5..2314a3489 100644 --- a/lib/aggregators/yslow/jsSyncInHead.js +++ b/lib/aggregators/yslow/jsSyncInHead.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('jsSyncInHead', diff --git a/lib/aggregators/yslow/jsWeight.js b/lib/aggregators/yslow/jsWeight.js index 95bc4317b..5434dc31a 100644 --- a/lib/aggregators/yslow/jsWeight.js +++ b/lib/aggregators/yslow/jsWeight.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('jsWeight', 'JS Weight', diff --git a/lib/aggregators/yslow/jsWeightPerPage.js b/lib/aggregators/yslow/jsWeightPerPage.js index 3e6ad3083..8b0963dbf 100644 --- a/lib/aggregators/yslow/jsWeightPerPage.js +++ b/lib/aggregators/yslow/jsWeightPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); var util = require('../../util/yslowUtil'); diff --git a/lib/aggregators/yslow/maxRequestsPerHost.js b/lib/aggregators/yslow/maxRequestsPerHost.js index eb02da5dd..258b1dd18 100644 --- a/lib/aggregators/yslow/maxRequestsPerHost.js +++ b/lib/aggregators/yslow/maxRequestsPerHost.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/noduplicates.js b/lib/aggregators/yslow/noduplicates.js index 8cb83f393..fbd1b1ea5 100644 --- a/lib/aggregators/yslow/noduplicates.js +++ b/lib/aggregators/yslow/noduplicates.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('noDuplicates', 'Remove duplicate JS and CSS', diff --git a/lib/aggregators/yslow/numberOfDomains.js b/lib/aggregators/yslow/numberOfDomains.js index 8dc1425e2..86a97fb22 100644 --- a/lib/aggregators/yslow/numberOfDomains.js +++ b/lib/aggregators/yslow/numberOfDomains.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/pageWeight.js b/lib/aggregators/yslow/pageWeight.js index 1ecf782ac..f8853e590 100644 --- a/lib/aggregators/yslow/pageWeight.js +++ b/lib/aggregators/yslow/pageWeight.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/pagesWithSPOF.js b/lib/aggregators/yslow/pagesWithSPOF.js index 7778cb69f..6949aec8f 100644 --- a/lib/aggregators/yslow/pagesWithSPOF.js +++ b/lib/aggregators/yslow/pagesWithSPOF.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Aggregator = require('../aggregator'); module.exports = new Aggregator('pagesWithSPOF', 'Pages with SPOF', diff --git a/lib/aggregators/yslow/redirectsPerPage.js b/lib/aggregators/yslow/redirectsPerPage.js index c10732d69..dfafef9de 100644 --- a/lib/aggregators/yslow/redirectsPerPage.js +++ b/lib/aggregators/yslow/redirectsPerPage.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Aggregator = require('../aggregator'); module.exports = new Aggregator('redirectsPerPage', 'Redirects Per Page', diff --git a/lib/aggregators/yslow/requests.js b/lib/aggregators/yslow/requests.js index 02e08b7ec..f30b69752 100644 --- a/lib/aggregators/yslow/requests.js +++ b/lib/aggregators/yslow/requests.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('requests', 'Number of requests per page', diff --git a/lib/aggregators/yslow/requestsWithoutExpires.js b/lib/aggregators/yslow/requestsWithoutExpires.js index 9c59916c9..8f0303f04 100644 --- a/lib/aggregators/yslow/requestsWithoutExpires.js +++ b/lib/aggregators/yslow/requestsWithoutExpires.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/requestsWithoutGzip.js b/lib/aggregators/yslow/requestsWithoutGzip.js index 1d0b445a3..d3a2f7524 100644 --- a/lib/aggregators/yslow/requestsWithoutGzip.js +++ b/lib/aggregators/yslow/requestsWithoutGzip.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('requestsWithoutGzip', 'Requests without GZip', diff --git a/lib/aggregators/yslow/ruleScore.js b/lib/aggregators/yslow/ruleScore.js index 9027c085d..305305c0c 100644 --- a/lib/aggregators/yslow/ruleScore.js +++ b/lib/aggregators/yslow/ruleScore.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; var Aggregator = require('../aggregator'); module.exports = new Aggregator('ruleScore', 'Rule Score', diff --git a/lib/aggregators/yslow/singleDomainRequests.js b/lib/aggregators/yslow/singleDomainRequests.js index 7d30b901c..664514ad0 100644 --- a/lib/aggregators/yslow/singleDomainRequests.js +++ b/lib/aggregators/yslow/singleDomainRequests.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/aggregators/yslow/spofPerPage.js b/lib/aggregators/yslow/spofPerPage.js index bf3e11b58..e3d72f12b 100644 --- a/lib/aggregators/yslow/spofPerPage.js +++ b/lib/aggregators/yslow/spofPerPage.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var Aggregator = require('../aggregator'); module.exports = new Aggregator('spofPerPage', diff --git a/lib/aggregators/yslow/timeSinceLastMod.js b/lib/aggregators/yslow/timeSinceLastMod.js index 98b1ca7fc..52a5a62d5 100644 --- a/lib/aggregators/yslow/timeSinceLastMod.js +++ b/lib/aggregators/yslow/timeSinceLastMod.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../../util/yslowUtil'); var Aggregator = require('../aggregator'); diff --git a/lib/analyze/analyzer.js b/lib/analyze/analyzer.js index 6b9bdd59b..3306d1f90 100644 --- a/lib/analyze/analyzer.js +++ b/lib/analyze/analyzer.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var yslow = require('./yslow'), gpsi = require('./gpsi'), browsertime = require('./browsertime'), diff --git a/lib/analyze/browsertime.js b/lib/analyze/browsertime.js index 2f6a8e472..3d50094db 100644 --- a/lib/analyze/browsertime.js +++ b/lib/analyze/browsertime.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var util = require('../util/util'), fs = require('fs-extra'), diff --git a/lib/analyze/gpsi.js b/lib/analyze/gpsi.js index 21eeb288f..bc4889b8d 100644 --- a/lib/analyze/gpsi.js +++ b/lib/analyze/gpsi.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var path = require('path'), util = require('../util/util'), diff --git a/lib/analyze/headless.js b/lib/analyze/headless.js index fcc5736cc..777a44ed5 100644 --- a/lib/analyze/headless.js +++ b/lib/analyze/headless.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var path = require('path'), childProcess = require('child_process'), phantomPath = require('phantomjs').path, diff --git a/lib/analyze/screenshots.js b/lib/analyze/screenshots.js index ce7f924c0..c02e8d748 100644 --- a/lib/analyze/screenshots.js +++ b/lib/analyze/screenshots.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var path = require('path'), childProcess = require('child_process'), phantomPath = require('phantomjs').path, diff --git a/lib/analyze/webpagetest.js b/lib/analyze/webpagetest.js index b6fe00c2e..5e785d9e6 100644 --- a/lib/analyze/webpagetest.js +++ b/lib/analyze/webpagetest.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var path = require('path'), util = require('../util/util'), diff --git a/lib/analyze/yslow.js b/lib/analyze/yslow.js index b87eeb38b..3779cda64 100644 --- a/lib/analyze/yslow.js +++ b/lib/analyze/yslow.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var path = require('path'), childProcess = require('child_process'), phantomPath = require('phantomjs').path, diff --git a/lib/analyzeMultipleSites.js b/lib/analyzeMultipleSites.js index 9f66bc13a..b348886de 100644 --- a/lib/analyzeMultipleSites.js +++ b/lib/analyzeMultipleSites.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; var path = require('path'), dateFormat = require('dateformat'), fs = require('fs-extra'), diff --git a/lib/analyzeOneSite.js b/lib/analyzeOneSite.js index 85b2979b7..cad82dcd4 100644 --- a/lib/analyzeOneSite.js +++ b/lib/analyzeOneSite.js @@ -1,3 +1,11 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; + var crawler = require('./crawler/crawler'), Analyzer = require('./analyze/analyzer'), SiteHTMLRenderer = require('./siteHTMLRenderer'), diff --git a/lib/cli.js b/lib/cli.js index 3cd14991b..845b00b3e 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var fs = require('fs-extra'), fileHelper = require('./util/fileHelpers'), defaultConfig = require('../conf/defaultConfig'), diff --git a/lib/collector.js b/lib/collector.js index 9d18d5ea1..d38927186 100644 --- a/lib/collector.js +++ b/lib/collector.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var fs = require('fs-extra'), path = require('path'), winston = require('winston'), diff --git a/lib/collectors/assets.js b/lib/collectors/assets.js index 9c35ffb6b..1006f466f 100644 --- a/lib/collectors/assets.js +++ b/lib/collectors/assets.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var util = require('../util/util'), yslowUtil = require('../util/yslowUtil'), @@ -49,4 +50,4 @@ exports.generateResults = function() { exports.clear = function() { assets = {}; -}; \ No newline at end of file +}; diff --git a/lib/collectors/assetsByTiming.js b/lib/collectors/assetsByTiming.js index 91d700a1d..afd9fa9c2 100644 --- a/lib/collectors/assetsByTiming.js +++ b/lib/collectors/assetsByTiming.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var util = require('../util/util'), assets = {}, diff --git a/lib/collectors/domains.js b/lib/collectors/domains.js index 3db1bcc62..f77fe41a4 100644 --- a/lib/collectors/domains.js +++ b/lib/collectors/domains.js @@ -4,7 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ - +'use strict'; var util = require('../util/util'), domains = {}, RequestTiming = require('../requestTiming'), diff --git a/lib/collectors/pages.js b/lib/collectors/pages.js index bf632c5fb..aa2b43006 100644 --- a/lib/collectors/pages.js +++ b/lib/collectors/pages.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var util = require('../util/util'), yslowUtil = require('../util/yslowUtil'); diff --git a/lib/config.js b/lib/config.js index 66e302bb6..5f7e6a6aa 100644 --- a/lib/config.js +++ b/lib/config.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; var urlParser = require('url'), defaultConfig = require('../conf/defaultConfig'), dateFormat = require('dateformat'), diff --git a/lib/crawler/crawler.js b/lib/crawler/crawler.js index aadf9c30f..98dfec75b 100644 --- a/lib/crawler/crawler.js +++ b/lib/crawler/crawler.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var spawn = require('cross-spawn'), path = require('path'), urlParser = require('url'), diff --git a/lib/graphite.js b/lib/graphite.js index 46f909542..a9f9b5e71 100644 --- a/lib/graphite.js +++ b/lib/graphite.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var util = require('./util/util'), winston = require('winston'), net = require('net'); diff --git a/lib/headless/headlessTiming.js b/lib/headless/headlessTiming.js index e045082e2..5127ac935 100644 --- a/lib/headless/headlessTiming.js +++ b/lib/headless/headlessTiming.js @@ -4,8 +4,10 @@ * and other contributors * Released under the Apache 2.0 License */ -var Stats = require('fast-stats').Stats; -var util = require('../util/util'); +'use strict'; + +var Stats = require('fast-stats').Stats, + util = require('../util/util'); var timeMetrics = ['domainLookupTime', 'redirectionTime', 'serverConnectionTime', 'serverResponseTime', 'pageDownloadTime', 'domInteractiveTime', 'domContentLoadedTime', 'pageLoadTime', 'frontEndTime', 'backEndTime' ]; diff --git a/lib/postTasks/copyAssets.js b/lib/postTasks/copyAssets.js index 0f0c832fa..208499dcc 100644 --- a/lib/postTasks/copyAssets.js +++ b/lib/postTasks/copyAssets.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var fs = require('fs-extra'), path = require('path'); diff --git a/lib/postTasks/renderAssetsHTML.js b/lib/postTasks/renderAssetsHTML.js index 34402582b..96cd49be2 100644 --- a/lib/postTasks/renderAssetsHTML.js +++ b/lib/postTasks/renderAssetsHTML.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var render = require('../util/htmlRenderer'); exports.task = function(result, config, cb) { diff --git a/lib/postTasks/renderDomainsHTML.js b/lib/postTasks/renderDomainsHTML.js index 19908435b..2798ef9dd 100644 --- a/lib/postTasks/renderDomainsHTML.js +++ b/lib/postTasks/renderDomainsHTML.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var render = require('../util/htmlRenderer'); exports.task = function(result, config, cb) { diff --git a/lib/postTasks/renderErrorsHTML.js b/lib/postTasks/renderErrorsHTML.js index 22ff46769..ba71e53ce 100644 --- a/lib/postTasks/renderErrorsHTML.js +++ b/lib/postTasks/renderErrorsHTML.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var render = require('../util/htmlRenderer'); exports.task = function(result, config, cb) { diff --git a/lib/postTasks/renderHotlistsHTML.js b/lib/postTasks/renderHotlistsHTML.js index 2c7826900..2bfea4fd1 100644 --- a/lib/postTasks/renderHotlistsHTML.js +++ b/lib/postTasks/renderHotlistsHTML.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var hotlistUtil = require('../util/hotlist'), render = require('../util/htmlRenderer'), util = require('../util/util'); diff --git a/lib/postTasks/renderPagesHTML.js b/lib/postTasks/renderPagesHTML.js index c3a0c01f4..1af87cb52 100644 --- a/lib/postTasks/renderPagesHTML.js +++ b/lib/postTasks/renderPagesHTML.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var columnsMetaData = require('../../conf/columnsMetaData.json'), render = require('../util/htmlRenderer'); diff --git a/lib/postTasks/renderRules.js b/lib/postTasks/renderRules.js index 1a27fa8c1..107206fb4 100644 --- a/lib/postTasks/renderRules.js +++ b/lib/postTasks/renderRules.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var render = require('../util/htmlRenderer'); exports.task = function(result, config, cb) { diff --git a/lib/postTasks/renderScreenshots.js b/lib/postTasks/renderScreenshots.js index e610b8903..2eb6f67cc 100644 --- a/lib/postTasks/renderScreenshots.js +++ b/lib/postTasks/renderScreenshots.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var render = require('../util/htmlRenderer'); exports.task = function(result, config, cb) { if (config.screenshot) { @@ -20,4 +22,4 @@ exports.task = function(result, config, cb) { } else { cb(); } -}; \ No newline at end of file +}; diff --git a/lib/postTasks/renderSummaryHTML.js b/lib/postTasks/renderSummaryHTML.js index a6b6dfd33..96a690567 100644 --- a/lib/postTasks/renderSummaryHTML.js +++ b/lib/postTasks/renderSummaryHTML.js @@ -4,10 +4,11 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var async = require('async'), render = require('../util/htmlRenderer'); - exports.task = function(result, config, cb) { if (config.html) { // TODO change to reduce diff --git a/lib/postTasks/sendToGraphite.js b/lib/postTasks/sendToGraphite.js index 6e27f73eb..852b20e3b 100644 --- a/lib/postTasks/sendToGraphite.js +++ b/lib/postTasks/sendToGraphite.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Graphite = require('../graphite'); exports.task = function(result, config, cb) { @@ -16,4 +17,4 @@ exports.task = function(result, config, cb) { cb(); } -}; \ No newline at end of file +}; diff --git a/lib/postTasks/storeResult.js b/lib/postTasks/storeResult.js index 9688f3236..dce84b002 100644 --- a/lib/postTasks/storeResult.js +++ b/lib/postTasks/storeResult.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var path = require('path'), winston = require('winston'), fs = require('fs-extra'); diff --git a/lib/postTasks/storeSummary.js b/lib/postTasks/storeSummary.js index e7bff2d8f..75529b59f 100644 --- a/lib/postTasks/storeSummary.js +++ b/lib/postTasks/storeSummary.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var path = require('path'), winston = require('winston'), fs = require('fs-extra'); diff --git a/lib/requestTiming.js b/lib/requestTiming.js index 5ab9e06d4..205f885a8 100644 --- a/lib/requestTiming.js +++ b/lib/requestTiming.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var Stats = require('fast-stats').Stats; /** @@ -31,4 +32,4 @@ RequestTiming.prototype.stats = function() { return this.stats; }; -module.exports = RequestTiming; \ No newline at end of file +module.exports = RequestTiming; diff --git a/lib/siteHTMLRenderer.js b/lib/siteHTMLRenderer.js index d6f699f0f..fa8964e65 100644 --- a/lib/siteHTMLRenderer.js +++ b/lib/siteHTMLRenderer.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var ySlowUtil = require('./util/yslowUtil'), util = require('./util/util'), render = require('./util/htmlRenderer'); diff --git a/lib/sitesHTMLRenderer.js b/lib/sitesHTMLRenderer.js index 2d3873bbc..86f7c45e6 100644 --- a/lib/sitesHTMLRenderer.js +++ b/lib/sitesHTMLRenderer.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var render = require('./util/htmlRenderer'), columnsMetaData = require('../conf/columnsMetaData.json'); diff --git a/lib/sitespeed.js b/lib/sitespeed.js index a100f114a..08230b0c8 100644 --- a/lib/sitespeed.js +++ b/lib/sitespeed.js @@ -4,6 +4,7 @@ * and other contributors * Released under theApache 2.0 License */ +'use strict'; var path = require('path'), async = require('async'), conf = require('./config.js'), diff --git a/lib/tests/jUnitTestSuites.js b/lib/tests/jUnitTestSuites.js index afb554f2b..393c25262 100644 --- a/lib/tests/jUnitTestSuites.js +++ b/lib/tests/jUnitTestSuites.js @@ -1,3 +1,11 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; + var builder = require('xmlbuilder'); function JUnitTestSuites(filename, config) { @@ -63,4 +71,4 @@ JUnitTestSuites.prototype.render = function(cb) { cb(); }; -module.exports = JUnitTestSuites; \ No newline at end of file +module.exports = JUnitTestSuites; diff --git a/lib/tests/tap.js b/lib/tests/tap.js index 1e02df2e0..125cb924e 100644 --- a/lib/tests/tap.js +++ b/lib/tests/tap.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var tap = require('tape'), EOL = require('os').EOL; @@ -35,4 +37,4 @@ exports.writeTap = function(results, cb) { }); }); -}; \ No newline at end of file +}; diff --git a/lib/tests/testRenderer.js b/lib/tests/testRenderer.js index 9b117cedc..cfa8ad6e1 100644 --- a/lib/tests/testRenderer.js +++ b/lib/tests/testRenderer.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var JUnitTestSuites = require('./jUnitTestSuites'), tap = require('./tap'), async = require('async'), diff --git a/lib/util/fileHelpers.js b/lib/util/fileHelpers.js index 0039ae343..0b60399d5 100644 --- a/lib/util/fileHelpers.js +++ b/lib/util/fileHelpers.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; var fs = require('fs-extra'), path = require('path'), EOL = require('os').EOL, diff --git a/lib/util/hbHelpers.js b/lib/util/hbHelpers.js index 3ad6e2044..1bc825504 100644 --- a/lib/util/hbHelpers.js +++ b/lib/util/hbHelpers.js @@ -4,6 +4,8 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; + var hb = require('handlebars'), util = require('./util'), yslowUtil = require('./yslowUtil'); diff --git a/lib/util/hotlist.js b/lib/util/hotlist.js index 9b997c7f5..10c39b2fa 100644 --- a/lib/util/hotlist.js +++ b/lib/util/hotlist.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; module.exports = { getAssetsBySize: function(assets, limit) { @@ -86,4 +93,4 @@ module.exports = { } -}; \ No newline at end of file +}; diff --git a/lib/util/htmlRenderer.js b/lib/util/htmlRenderer.js index 8fa4ab32f..e4d5bc395 100644 --- a/lib/util/htmlRenderer.js +++ b/lib/util/htmlRenderer.js @@ -1,3 +1,10 @@ +/** + * Sitespeed.io - How speedy is your site? (http://www.sitespeed.io) + * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog + * and other contributors + * Released under the Apache 2.0 License + */ +'use strict'; var fs = require('fs-extra'), hb = require('handlebars'), path = require('path'), diff --git a/lib/util/util.js b/lib/util/util.js index 79809c12f..38c905a7d 100644 --- a/lib/util/util.js +++ b/lib/util/util.js @@ -4,6 +4,7 @@ * and other contributors * Released under the Apache 2.0 License */ +'use strict'; var crypto = require('crypto'), url = require('url'), path = require('path'), diff --git a/lib/util/yslowUtil.js b/lib/util/yslowUtil.js index 46c8d7da9..f772d1868 100644 --- a/lib/util/yslowUtil.js +++ b/lib/util/yslowUtil.js @@ -5,6 +5,8 @@ * Released under the Apache 2.0 License */ +'use strict'; + /** * Here are utility methods handling YSlow objects, * mostly the component object @@ -198,4 +200,4 @@ module.exports = { ); } -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index 9494a3878..8c1b7d5ea 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "mocha": "1.20.x", "expect.js": "0.3.x", - "jshint": "2.5.x" + "eslint": "0.13.x" }, "main": "./lib/sitespeed.js", "dependencies": {