Skip to content

Commit

Permalink
Remove new-cap ESLint exclusion (prebid#1442)
Browse files Browse the repository at this point in the history
* Removed the new-cap lint exclusion.

* Removed the exclusion from the test directory as well.
  • Loading branch information
dbemiller authored Aug 1, 2017
1 parent 68511f9 commit be3fe46
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 30 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = {
"camelcase": "off",
"eqeqeq": "off",
"import/first": "off",
"new-cap": "off",
"no-control-regex": "off",
"no-redeclare": "off",
"no-return-assign": "off",
Expand Down
8 changes: 4 additions & 4 deletions modules/adbundBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var bidmanager = require('src/bidmanager.js');
var adloader = require('src/adloader');
var adaptermanager = require('src/adaptermanager');

var adBundAdapter = function adBundAdapter() {
function AdBundAdapter() {
var timezone = (new Date()).getTimezoneOffset();
var bidAPIs = [
'http://us-east-engine.adbund.xyz/prebid/ad/get',
Expand Down Expand Up @@ -62,8 +62,8 @@ var adBundAdapter = function adBundAdapter() {
return {
callBids: _callBids
};
};
}

adaptermanager.registerBidAdapter(new adBundAdapter(), 'adbund');
adaptermanager.registerBidAdapter(new AdBundAdapter(), 'adbund');

module.exports = adBundAdapter;
module.exports = AdBundAdapter;
8 changes: 4 additions & 4 deletions modules/mobfoxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const CONSTANTS = require('src/constants.json');
const utils = require('src/utils.js');
const adaptermanager = require('src/adaptermanager');

const mobfoxAdapter = function () {
function MobfoxAdapter() {
const BIDDER_CODE = 'mobfox';
const BID_REQUEST_BASE_URL = 'https://my.mobfox.com/request.php';

Expand Down Expand Up @@ -178,7 +178,7 @@ const mobfoxAdapter = function () {
return {
callBids: callBids
};
};
}

adaptermanager.registerBidAdapter(new mobfoxAdapter(), 'mobfox');
module.exports = mobfoxAdapter;
adaptermanager.registerBidAdapter(new MobfoxAdapter(), 'mobfox');
module.exports = MobfoxAdapter;
10 changes: 5 additions & 5 deletions modules/sekindoUMBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { getBidRequest } from 'src/utils.js';

var CONSTANTS = require('src/constants.json');
var utils = require('src/utils.js');
var bidfactory = require('src/bidfactory.js');
var bidmanager = require('src/bidmanager.js');
var adloader = require('src/adloader.js');
var adaptermanager = require('src/adaptermanager');

var sekindoUMAdapter;
sekindoUMAdapter = function sekindoUMAdapter() {
function SekindoUMAdapter() {
function _callBids(params) {
var bids = params.bids;
var bidsCount = bids.length;
Expand Down Expand Up @@ -83,8 +83,8 @@ sekindoUMAdapter = function sekindoUMAdapter() {
return {
callBids: _callBids
};
};
}

adaptermanager.registerBidAdapter(new sekindoUMAdapter(), 'sekindoUM');
adaptermanager.registerBidAdapter(new SekindoUMAdapter(), 'sekindoUM');

module.exports = sekindoUMAdapter;
module.exports = SekindoUMAdapter;
6 changes: 3 additions & 3 deletions modules/ucfunnelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import adaptermanager from 'src/adaptermanager';
const VER = 'ADGENT_PREBID-2017051801';
const UCFUNNEL_BIDDER_CODE = 'ucfunnel';

function ucfunnelAdapter() {
function UcfunnelAdapter() {
function _callBids(params) {
let bids = params.bids || [];

Expand Down Expand Up @@ -92,6 +92,6 @@ function ucfunnelAdapter() {
};
};

adaptermanager.registerBidAdapter(new ucfunnelAdapter(), UCFUNNEL_BIDDER_CODE);
adaptermanager.registerBidAdapter(new UcfunnelAdapter(), UCFUNNEL_BIDDER_CODE);

module.exports = ucfunnelAdapter;
module.exports = UcfunnelAdapter;
6 changes: 3 additions & 3 deletions modules/unrulyBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function createBidResponseHandler(bidRequestBids) {
}
}

function createUnrulyAdapter() {
function UnrulyAdapter() {
const adapter = {
exchangeUrl: 'https://targeting.unrulymedia.com/prebid',
callBids({ bids: bidRequestBids }) {
Expand Down Expand Up @@ -106,6 +106,6 @@ function createUnrulyAdapter() {
return adapter
}

adaptermanager.registerBidAdapter(new createUnrulyAdapter(), 'unruly')
adaptermanager.registerBidAdapter(new UnrulyAdapter(), 'unruly')

module.exports = createUnrulyAdapter
module.exports = UnrulyAdapter
1 change: 0 additions & 1 deletion test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = {
"no-unused-expressions": "off",
"import/no-duplicates": "off",
"no-template-curly-in-string": "off",
"new-cap": "off",
"no-global-assign": "off",
"no-path-concat": "off",
"no-redeclare": "off",
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/aardvarkBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('aardvark adapter tests', function () {
const expect = require('chai').expect;
const adapter = require('modules/aardvarkBidAdapter');
const Adapter = require('modules/aardvarkBidAdapter');
const bidmanager = require('src/bidmanager');
const adloader = require('src/adloader');
const constants = require('src/constants.json');
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('aardvark adapter tests', function () {
];

beforeEach(() => {
aardvark = new adapter();
aardvark = new Adapter();
sandbox = sinon.sandbox.create();
bidsRequestedOriginal = $$PREBID_GLOBAL$$._bidsRequested;
$$PREBID_GLOBAL$$._bidsRequested = [];
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/mantisBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

describe('mantis adapter tests', function () {
const expect = require('chai').expect;
const adapter = require('modules/mantisBidAdapter');
const Adapter = require('modules/mantisBidAdapter');
const bidmanager = require('src/bidmanager');
const adloader = require('src/adloader');
const constants = require('src/constants.json');

var mantis, sandbox;

beforeEach(() => {
mantis = new adapter();
mantis = new Adapter();
sandbox = sinon.sandbox.create();
});

Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/rhythmoneBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var r1 = require('../../../modules/rhythmoneBidAdapter');
var Adapter = require('../../../modules/rhythmoneBidAdapter');
var assert = require('assert');

describe('rhythmone adapter tests', function () {
Expand Down Expand Up @@ -31,7 +31,7 @@ describe('rhythmone adapter tests', function () {
var endEvent = function() {},
wonEvent = function() {}; ;

var z = new r1(
var z = new Adapter(
{
addBidResponse: function(placementcode, adResponse) {
it('should echo placementcode div-gpt-ad-1438287399331-0', function() {
Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/sekindoUMBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect} from 'chai';
import sekindoUMAdapter from '../../../modules/sekindoUMBidAdapter';
import SekindoUMAdapter from '../../../modules/sekindoUMBidAdapter';
var bidManager = require('src/bidmanager');

describe('sekindoUM Adapter Tests', () => {
Expand All @@ -21,7 +21,7 @@ describe('sekindoUM Adapter Tests', () => {
};

beforeEach(() => {
_sekindoUMAdapter = new sekindoUMAdapter();
_sekindoUMAdapter = new SekindoUMAdapter();
});

describe('sekindoUM callBids', () => {
Expand All @@ -46,7 +46,7 @@ describe('sekindoUM Adapter Tests', () => {
beforeEach(function () {
addBidResponseSpy = sinon.stub(bidManager, 'addBidResponse');
$$PREBID_GLOBAL$$._bidsRequested.push(bidderRequest);
_sekindoUMAdapter = new sekindoUMAdapter();
_sekindoUMAdapter = new SekindoUMAdapter();
});

afterEach(function () {
Expand Down

0 comments on commit be3fe46

Please sign in to comment.