From 940295ffe2077369e77588afdc7d1eb404c4a8a5 Mon Sep 17 00:00:00 2001 From: dbemiller Date: Mon, 31 Jul 2017 16:13:53 -0400 Subject: [PATCH] Removed all the unused variables. (#1449) --- .eslintrc.js | 1 - modules/indexExchangeBidAdapter.js | 5 ----- modules/memeglobalBidAdapter.js | 4 ---- modules/mobfoxBidAdapter.js | 1 - modules/rhythmoneBidAdapter.js | 3 --- modules/roxotAnalyticsAdapter.js | 1 - modules/ucfunnelBidAdapter.js | 1 - src/AnalyticsAdapter.js | 5 +---- 8 files changed, 1 insertion(+), 20 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8cdd5c498c1..cb518aa2e43 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -31,7 +31,6 @@ module.exports = { "no-return-assign": "off", "no-throw-literal": "off", "no-undef": "off", - "no-unused-vars": "off", "no-use-before-define": "off", "no-useless-call": "off", "no-useless-escape": "off", diff --git a/modules/indexExchangeBidAdapter.js b/modules/indexExchangeBidAdapter.js index 08e857067b8..ae50fc93c1e 100644 --- a/modules/indexExchangeBidAdapter.js +++ b/modules/indexExchangeBidAdapter.js @@ -425,15 +425,11 @@ var IndexExchangeAdapter = function IndexExchangeAdapter() { // Our standard is to always bid for all known slots. cygnus_index_args.slots = []; - var expectedBids = 0; - // Grab the slot level data for cygnus_index_args for (var i = 0; i < bidArr.length; i++) { var bid = bidArr[i]; var sizeID = 0; - expectedBids++; - // Expecting nested arrays for sizes if (!(bid.sizes[0] instanceof Array)) { bid.sizes = [bid.sizes]; @@ -551,7 +547,6 @@ var IndexExchangeAdapter = function IndexExchangeAdapter() { try { var indexObj = _IndexRequestData.targetIDToBid; - var lookupObj = cygnus_index_args; // Grab all the bids for each slot for (var adSlotId in slotIdMap) { diff --git a/modules/memeglobalBidAdapter.js b/modules/memeglobalBidAdapter.js index 40bb5b367b2..c47c8ed7381 100644 --- a/modules/memeglobalBidAdapter.js +++ b/modules/memeglobalBidAdapter.js @@ -5,7 +5,6 @@ var bidmanager = require('src/bidmanager.js'); var adloader = require('src/adloader'); var adaptermanager = require('src/adaptermanager'); -var defaultPlacementForBadBid = null; var bidderName = 'memeglobal'; /** * Adapter for requesting bids from Meme Global Media Group @@ -19,9 +18,6 @@ var MemeGlobalAdapter = function MemeGlobalAdapter() { if (!bids) return; - // assign the first adUnit (placement) for bad bids; - defaultPlacementForBadBid = bids[0].placementCode; - for (var i = 0; i < bids.length; i++) { _requestBid(bids[i]); } diff --git a/modules/mobfoxBidAdapter.js b/modules/mobfoxBidAdapter.js index aaf4328ac23..99e58656d66 100644 --- a/modules/mobfoxBidAdapter.js +++ b/modules/mobfoxBidAdapter.js @@ -1,6 +1,5 @@ const bidfactory = require('src/bidfactory.js'); const bidmanager = require('src/bidmanager.js'); -const adloader = require('src/adloader'); const ajax = require('src/ajax.js'); const CONSTANTS = require('src/constants.json'); const utils = require('src/utils.js'); diff --git a/modules/rhythmoneBidAdapter.js b/modules/rhythmoneBidAdapter.js index 5ba6bff78b9..8edb78110bd 100644 --- a/modules/rhythmoneBidAdapter.js +++ b/modules/rhythmoneBidAdapter.js @@ -11,7 +11,6 @@ function RhythmoneAdapter (bidManager, global, loader) { defaultZone = '1r', defaultPath = 'mvo', debug = false, - requestCompleted = false, placementCodes = {}, loadStart, configuredPlacements = [], @@ -245,8 +244,6 @@ function RhythmoneAdapter (bidManager, global, loader) { // send quality control beacon here sendAuditBeacon(bidParams.placementId); - requestCompleted = true; - logToConsole('response text: ' + txt); if (code !== -1) { diff --git a/modules/roxotAnalyticsAdapter.js b/modules/roxotAnalyticsAdapter.js index 99ea6bc9977..0d5704da371 100644 --- a/modules/roxotAnalyticsAdapter.js +++ b/modules/roxotAnalyticsAdapter.js @@ -1,4 +1,3 @@ -import {ajax} from 'src/ajax'; import adapter from 'src/AnalyticsAdapter'; import CONSTANTS from 'src/constants.json'; import adaptermanager from 'src/adaptermanager'; diff --git a/modules/ucfunnelBidAdapter.js b/modules/ucfunnelBidAdapter.js index 59a3151b1d6..d5fda8a4e36 100644 --- a/modules/ucfunnelBidAdapter.js +++ b/modules/ucfunnelBidAdapter.js @@ -1,4 +1,3 @@ -import * as Adapter from 'src/adapter.js'; import bidfactory from 'src/bidfactory'; import bidmanager from 'src/bidmanager'; import * as utils from 'src/utils'; diff --git a/src/AnalyticsAdapter.js b/src/AnalyticsAdapter.js index 8f8a4b12551..b41885d3277 100644 --- a/src/AnalyticsAdapter.js +++ b/src/AnalyticsAdapter.js @@ -17,7 +17,6 @@ const LIBRARY = 'library'; const ENDPOINT = 'endpoint'; const BUNDLE = 'bundle'; -var _timedOutBidders = []; var _sampled = true; export default function AnalyticsAdapter({ url, analyticsType, global, handler }) { @@ -91,9 +90,7 @@ export default function AnalyticsAdapter({ url, analyticsType, global, handler } const { eventType, args } = event; - if (eventType === BID_TIMEOUT) { - _timedOutBidders = args.bidderCode; - } else { + if (eventType !== BID_TIMEOUT) { _enqueue.call(_this, { eventType, args }); } });