From 02aac0c13ee532beea30c616b1999bc0c22e4138 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Mon, 26 Mar 2018 14:52:42 -0400 Subject: [PATCH] Remove use stricts --- controller/place.js | 2 -- controller/search.js | 2 -- helper/debug.js | 1 - helper/fieldValue.js | 2 -- helper/geojsonify_place_details.js | 2 -- helper/stackTraceLine.js | 2 -- middleware/access_log.js | 2 -- middleware/confidenceScoreFallback.js | 2 -- middleware/normalizeParentIds.js | 2 -- middleware/renamePlacenames.js | 2 -- query/autocomplete.js | 2 -- query/reverse.js | 2 -- query/search.js | 1 - query/search_original.js | 1 - sanitizer/sanitizeAll.js | 1 - schema.js | 1 - service/configurations/Interpolation.js | 1 - service/configurations/Language.js | 1 - service/configurations/Libpostal.js | 1 - service/configurations/PlaceHolder.js | 1 - service/configurations/PointInPolygon.js | 1 - test/unit/app.js | 1 - test/unit/controller/coarse_reverse.js | 1 - test/unit/controller/libpostal.js | 1 - test/unit/controller/place.js | 1 - test/unit/controller/placeholder.js | 1 - test/unit/controller/predicates/has_parsed_text_properties.js | 1 - test/unit/controller/predicates/has_request_errors.js | 1 - test/unit/controller/predicates/has_request_parameter.js | 1 - test/unit/controller/predicates/has_response_data.js | 1 - test/unit/controller/predicates/has_results_at_layers.js | 1 - test/unit/controller/predicates/is_addressit_parse.js | 1 - test/unit/controller/predicates/is_admin_only_analysis.js | 1 - test/unit/controller/predicates/is_coarse_reverse.js | 1 - test/unit/controller/predicates/is_only_non_admin_layers.js | 1 - .../predicates/is_request_sources_only_whosonfirst.js | 1 - test/unit/controller/search.js | 1 - test/unit/controller/search_with_ids.js | 1 - test/unit/controller/structured_libpostal.js | 1 - test/unit/middleware/changeLanguage.js | 1 - test/unit/middleware/interpolate.js | 1 - test/unit/query/MockQuery.js | 1 - test/unit/sanitizer/_geo_reverse.js | 1 - test/unit/schema.js | 1 - 44 files changed, 55 deletions(-) diff --git a/controller/place.js b/controller/place.js index 51ce58d9..ac851359 100644 --- a/controller/place.js +++ b/controller/place.js @@ -1,5 +1,3 @@ -'use strict'; - const _ = require('lodash'); const retry = require('retry'); diff --git a/controller/search.js b/controller/search.js index 721c0dde..cc04f19e 100644 --- a/controller/search.js +++ b/controller/search.js @@ -1,5 +1,3 @@ -'use strict'; - const _ = require('lodash'); const searchService = require('../service/search'); diff --git a/helper/debug.js b/helper/debug.js index cf8b833c..79279c66 100644 --- a/helper/debug.js +++ b/helper/debug.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); class Debug { diff --git a/helper/fieldValue.js b/helper/fieldValue.js index 6a9c5c10..11ddef2d 100644 --- a/helper/fieldValue.js +++ b/helper/fieldValue.js @@ -1,5 +1,3 @@ -'use strict'; - const _ = require('lodash'); function getStringValue(property) { diff --git a/helper/geojsonify_place_details.js b/helper/geojsonify_place_details.js index 4c2b60b7..91e12d73 100644 --- a/helper/geojsonify_place_details.js +++ b/helper/geojsonify_place_details.js @@ -1,5 +1,3 @@ -'use strict'; - const _ = require('lodash'); const field = require('./fieldValue'); diff --git a/helper/stackTraceLine.js b/helper/stackTraceLine.js index 67e56de2..e1312ae6 100644 --- a/helper/stackTraceLine.js +++ b/helper/stackTraceLine.js @@ -1,5 +1,3 @@ -'use strict'; - module.exports = () => { const stack = new Error().stack.split('\n'); let targetLine; diff --git a/middleware/access_log.js b/middleware/access_log.js index d87a2e32..e6df58d0 100644 --- a/middleware/access_log.js +++ b/middleware/access_log.js @@ -2,8 +2,6 @@ * Create a middleware that prints access logs via pelias-logger. */ -'use strict'; - var url = require( 'url' ); var _ = require( 'lodash' ); diff --git a/middleware/confidenceScoreFallback.js b/middleware/confidenceScoreFallback.js index 488bd721..96d378b8 100644 --- a/middleware/confidenceScoreFallback.js +++ b/middleware/confidenceScoreFallback.js @@ -1,5 +1,3 @@ -'use strict'; - /** * * Basic confidence score should be computed and returned for each item in the results. diff --git a/middleware/normalizeParentIds.js b/middleware/normalizeParentIds.js index 67a4874a..b5e02869 100644 --- a/middleware/normalizeParentIds.js +++ b/middleware/normalizeParentIds.js @@ -1,5 +1,3 @@ -'use strict'; - const logger = require('pelias-logger').get('api'); const Document = require('pelias-model').Document; const placeTypes = require('../helper/placeTypes'); diff --git a/middleware/renamePlacenames.js b/middleware/renamePlacenames.js index 9f63cb6e..d1f36d73 100644 --- a/middleware/renamePlacenames.js +++ b/middleware/renamePlacenames.js @@ -1,5 +1,3 @@ -'use strict'; - const _ = require('lodash'); const PARENT_PROPS = require('../helper/placeTypes'); diff --git a/query/autocomplete.js b/query/autocomplete.js index e7dbed3f..8d4cf257 100644 --- a/query/autocomplete.js +++ b/query/autocomplete.js @@ -1,5 +1,3 @@ -'use strict'; - const peliasQuery = require('pelias-query'); const defaults = require('./autocomplete_defaults'); const textParser = require('./text_parser_addressit'); diff --git a/query/reverse.js b/query/reverse.js index a9c1d25c..1e928344 100644 --- a/query/reverse.js +++ b/query/reverse.js @@ -1,5 +1,3 @@ -'use strict'; - const peliasQuery = require('pelias-query'); const defaults = require('./reverse_defaults'); const check = require('check-types'); diff --git a/query/search.js b/query/search.js index 991e239c..12837496 100644 --- a/query/search.js +++ b/query/search.js @@ -1,4 +1,3 @@ -'use strict'; const peliasQuery = require('pelias-query'); const defaults = require('./search_defaults'); diff --git a/query/search_original.js b/query/search_original.js index a6b666d6..c7b05248 100644 --- a/query/search_original.js +++ b/query/search_original.js @@ -1,4 +1,3 @@ -'use strict'; const peliasQuery = require('pelias-query'); const defaults = require('./search_defaults'); diff --git a/sanitizer/sanitizeAll.js b/sanitizer/sanitizeAll.js index af6e1510..113c3116 100644 --- a/sanitizer/sanitizeAll.js +++ b/sanitizer/sanitizeAll.js @@ -1,4 +1,3 @@ -'use strict'; function sanitize( req, sanitizers ){ // init an object to store clean (sanitized) input parameters if not initialized req.clean = req.clean || {}; diff --git a/schema.js b/schema.js index 440da818..00c31a2e 100644 --- a/schema.js +++ b/schema.js @@ -1,4 +1,3 @@ -'use strict'; const Joi = require('joi'); diff --git a/service/configurations/Interpolation.js b/service/configurations/Interpolation.js index 1bb08d77..9995e053 100644 --- a/service/configurations/Interpolation.js +++ b/service/configurations/Interpolation.js @@ -1,4 +1,3 @@ -'use strict'; const url = require('url'); diff --git a/service/configurations/Language.js b/service/configurations/Language.js index ef528d38..97096a87 100644 --- a/service/configurations/Language.js +++ b/service/configurations/Language.js @@ -1,4 +1,3 @@ -'use strict'; const url = require('url'); diff --git a/service/configurations/Libpostal.js b/service/configurations/Libpostal.js index 9cf1de2b..997a8a17 100644 --- a/service/configurations/Libpostal.js +++ b/service/configurations/Libpostal.js @@ -1,4 +1,3 @@ -'use strict'; const url = require('url'); diff --git a/service/configurations/PlaceHolder.js b/service/configurations/PlaceHolder.js index c25f8abc..a0ad6ee9 100644 --- a/service/configurations/PlaceHolder.js +++ b/service/configurations/PlaceHolder.js @@ -1,4 +1,3 @@ -'use strict'; const url = require('url'); diff --git a/service/configurations/PointInPolygon.js b/service/configurations/PointInPolygon.js index 58b52093..989b854a 100644 --- a/service/configurations/PointInPolygon.js +++ b/service/configurations/PointInPolygon.js @@ -1,4 +1,3 @@ -'use strict'; const url = require('url'); diff --git a/test/unit/app.js b/test/unit/app.js index 479e2af0..192e9034 100644 --- a/test/unit/app.js +++ b/test/unit/app.js @@ -1,4 +1,3 @@ -'use strict'; const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/coarse_reverse.js b/test/unit/controller/coarse_reverse.js index df231075..ce6bb886 100644 --- a/test/unit/controller/coarse_reverse.js +++ b/test/unit/controller/coarse_reverse.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../controller/coarse_reverse'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/libpostal.js b/test/unit/controller/libpostal.js index cf62fff5..708130c4 100644 --- a/test/unit/controller/libpostal.js +++ b/test/unit/controller/libpostal.js @@ -1,4 +1,3 @@ -'use strict'; const proxyquire = require('proxyquire').noCallThru(); const libpostal = require('../../../controller/libpostal'); diff --git a/test/unit/controller/place.js b/test/unit/controller/place.js index b76d69c9..8bbb5b00 100644 --- a/test/unit/controller/place.js +++ b/test/unit/controller/place.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../controller/place'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/placeholder.js b/test/unit/controller/placeholder.js index efb0fc2a..ede7982d 100644 --- a/test/unit/controller/placeholder.js +++ b/test/unit/controller/placeholder.js @@ -1,4 +1,3 @@ -'use strict'; const placeholder = require('../../../controller/placeholder'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/predicates/has_parsed_text_properties.js b/test/unit/controller/predicates/has_parsed_text_properties.js index 9307d46d..3ee955d7 100644 --- a/test/unit/controller/predicates/has_parsed_text_properties.js +++ b/test/unit/controller/predicates/has_parsed_text_properties.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const has_parsed_text_properties = require('../../../../controller/predicates/has_parsed_text_properties'); diff --git a/test/unit/controller/predicates/has_request_errors.js b/test/unit/controller/predicates/has_request_errors.js index bd1868aa..53a3925f 100644 --- a/test/unit/controller/predicates/has_request_errors.js +++ b/test/unit/controller/predicates/has_request_errors.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const has_request_errors = require('../../../../controller/predicates/has_request_errors'); diff --git a/test/unit/controller/predicates/has_request_parameter.js b/test/unit/controller/predicates/has_request_parameter.js index 099ba39d..9040fc07 100644 --- a/test/unit/controller/predicates/has_request_parameter.js +++ b/test/unit/controller/predicates/has_request_parameter.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const has_request_parameter = require('../../../../controller/predicates/has_request_parameter'); diff --git a/test/unit/controller/predicates/has_response_data.js b/test/unit/controller/predicates/has_response_data.js index f073fc4d..265e122b 100644 --- a/test/unit/controller/predicates/has_response_data.js +++ b/test/unit/controller/predicates/has_response_data.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const has_response_data = require('../../../../controller/predicates/has_response_data'); diff --git a/test/unit/controller/predicates/has_results_at_layers.js b/test/unit/controller/predicates/has_results_at_layers.js index f81e9045..d1984580 100644 --- a/test/unit/controller/predicates/has_results_at_layers.js +++ b/test/unit/controller/predicates/has_results_at_layers.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const has_results_at_layers = require('../../../../controller/predicates/has_results_at_layers'); diff --git a/test/unit/controller/predicates/is_addressit_parse.js b/test/unit/controller/predicates/is_addressit_parse.js index d11734ba..4d64e296 100644 --- a/test/unit/controller/predicates/is_addressit_parse.js +++ b/test/unit/controller/predicates/is_addressit_parse.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const is_addressit_parse = require('../../../../controller/predicates/is_addressit_parse'); diff --git a/test/unit/controller/predicates/is_admin_only_analysis.js b/test/unit/controller/predicates/is_admin_only_analysis.js index 4e90bf34..e6b5e323 100644 --- a/test/unit/controller/predicates/is_admin_only_analysis.js +++ b/test/unit/controller/predicates/is_admin_only_analysis.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const is_admin_only_analysis = require('../../../../controller/predicates/is_admin_only_analysis'); diff --git a/test/unit/controller/predicates/is_coarse_reverse.js b/test/unit/controller/predicates/is_coarse_reverse.js index 33b0611d..baeecd7c 100644 --- a/test/unit/controller/predicates/is_coarse_reverse.js +++ b/test/unit/controller/predicates/is_coarse_reverse.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const is_coarse_reverse = require('../../../../controller/predicates/is_coarse_reverse'); diff --git a/test/unit/controller/predicates/is_only_non_admin_layers.js b/test/unit/controller/predicates/is_only_non_admin_layers.js index 51e1b796..17d7f428 100644 --- a/test/unit/controller/predicates/is_only_non_admin_layers.js +++ b/test/unit/controller/predicates/is_only_non_admin_layers.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const is_only_non_admin_layers = require('../../../../controller/predicates/is_only_non_admin_layers'); diff --git a/test/unit/controller/predicates/is_request_sources_only_whosonfirst.js b/test/unit/controller/predicates/is_request_sources_only_whosonfirst.js index 24f861ad..b8fecd06 100644 --- a/test/unit/controller/predicates/is_request_sources_only_whosonfirst.js +++ b/test/unit/controller/predicates/is_request_sources_only_whosonfirst.js @@ -1,4 +1,3 @@ -'use strict'; const _ = require('lodash'); const is_request_sources_only_whosonfirst = require('../../../../controller/predicates/is_request_sources_only_whosonfirst'); diff --git a/test/unit/controller/search.js b/test/unit/controller/search.js index 3f80f7d1..078a4ece 100644 --- a/test/unit/controller/search.js +++ b/test/unit/controller/search.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../controller/search'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/search_with_ids.js b/test/unit/controller/search_with_ids.js index ff884be9..0723539d 100644 --- a/test/unit/controller/search_with_ids.js +++ b/test/unit/controller/search_with_ids.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../controller/search_with_ids'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/controller/structured_libpostal.js b/test/unit/controller/structured_libpostal.js index eb4aea12..d39d0532 100644 --- a/test/unit/controller/structured_libpostal.js +++ b/test/unit/controller/structured_libpostal.js @@ -1,4 +1,3 @@ -'use strict'; const proxyquire = require('proxyquire').noCallThru(); const libpostal = require('../../../controller/structured_libpostal'); diff --git a/test/unit/middleware/changeLanguage.js b/test/unit/middleware/changeLanguage.js index cc0688d9..7536810c 100644 --- a/test/unit/middleware/changeLanguage.js +++ b/test/unit/middleware/changeLanguage.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../middleware/changeLanguage'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/middleware/interpolate.js b/test/unit/middleware/interpolate.js index 6dbf1ae6..d90210ef 100644 --- a/test/unit/middleware/interpolate.js +++ b/test/unit/middleware/interpolate.js @@ -1,4 +1,3 @@ -'use strict'; const setup = require('../../../middleware/interpolate'); const proxyquire = require('proxyquire').noCallThru(); diff --git a/test/unit/query/MockQuery.js b/test/unit/query/MockQuery.js index e7202cc9..2cbcf78d 100644 --- a/test/unit/query/MockQuery.js +++ b/test/unit/query/MockQuery.js @@ -1,4 +1,3 @@ -'use strict'; module.exports = class MockQuery { constructor() { diff --git a/test/unit/sanitizer/_geo_reverse.js b/test/unit/sanitizer/_geo_reverse.js index c2fa6bd9..0afc2b15 100644 --- a/test/unit/sanitizer/_geo_reverse.js +++ b/test/unit/sanitizer/_geo_reverse.js @@ -1,4 +1,3 @@ -'use strict'; const sanitizer = require('../../../sanitizer/_geo_reverse')(); const defaults = require('../../../query/reverse_defaults'); diff --git a/test/unit/schema.js b/test/unit/schema.js index 1278ee59..93e93964 100644 --- a/test/unit/schema.js +++ b/test/unit/schema.js @@ -1,4 +1,3 @@ -'use strict'; const Joi = require('joi'); const schema = require('../../schema');