Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bracket and object spacing lint exceptions #2168

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ module.exports = {
"no-use-before-define": "off",
"no-useless-escape": "off",
"one-var": "off",
"standard/array-bracket-even-spacing": "off",
"standard/object-curly-even-spacing": "off"
}
};
6 changes: 3 additions & 3 deletions test/helpers/index_adapter_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ exports.matchBidsOnSID = function(lhs, rhs) {
var compared = compareOnKeys(lstore, rstore);
var matched = compared.intersection.map(function(pair) { return { configured: pair.left, sent: pair.right, name: pair.name } });

return { unmatched: { configured: compared.lhsOnly, sent: compared.rhsOnly }, matched: matched};
return { unmatched: { configured: compared.lhsOnly, sent: compared.rhsOnly }, matched: matched };
}

exports.matchBidsOnSize = function(lhs, rhs) {
Expand All @@ -220,12 +220,12 @@ exports.matchBidsOnSize = function(lhs, rhs) {
}

var lstore = createObjectFromArray(configured);
var rstore = createObjectFromArray(rhs.map(bid => [ bid.banner.w + 'x' + bid.banner.h, bid]));
var rstore = createObjectFromArray(rhs.map(bid => [ bid.banner.w + 'x' + bid.banner.h, bid ]));

var compared = compareOnKeys(lstore, rstore);
var matched = compared.intersection.map(function(pair) { return { configured: pair.left, sent: pair.right, name: pair.name } });

return { unmatched: { configured: compared.lhsOnly, sent: compared.rhsOnly }, matched: matched};
return { unmatched: { configured: compared.lhsOnly, sent: compared.rhsOnly }, matched: matched };
}

exports.getBidResponse = function(configuredBids, urlJSON, optionalPriceLevel, optionalResponseIdentifier, optionalPassOnBid, optionalResponseParam) {
Expand Down
6 changes: 3 additions & 3 deletions test/spec/auctionmanager_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,11 +853,11 @@ describe('auctionmanager.js', function () {
});

it('should run auction after video bids have been cached', () => {
sinon.stub(store, 'store').callsArgWith(1, null, [{ uuid: 123}]);
sinon.stub(store, 'store').callsArgWith(1, null, [{ uuid: 123 }]);
sinon.stub(config, 'getConfig').withArgs('cache.url').returns('cache-url');

const bidsCopy = [Object.assign({}, bids[0], { mediaType: 'video'})];
const bids1Copy = [Object.assign({}, bids1[0], { mediaType: 'video'})];
const bidsCopy = [Object.assign({}, bids[0], { mediaType: 'video' })];
const bids1Copy = [Object.assign({}, bids1[0], { mediaType: 'video' })];

registerBidder(spec);
registerBidder(spec1);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/a4gBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect} from 'chai';
import { expect } from 'chai';
import { spec } from 'modules/a4gBidAdapter';

describe('a4gAdapterTests', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/adformBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Adform adapter', () => {

describe('interpretResponse', () => {
it('should respond with empty response when there is empty serverResponse', () => {
let result = spec.interpretResponse({ body: {}}, {});
let result = spec.interpretResponse({ body: {} }, {});
assert.deepEqual(result, []);
});
it('should respond with empty response when sizes doesn\'t match', () => {
Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('AppNexusAdapter', () => {
nativeParams: {
title: {required: true},
body: {required: true},
image: {required: true, sizes: [{ width: 100, height: 100 }] },
image: {required: true, sizes: [{ width: 100, height: 100 }]},
cta: {required: false},
sponsoredBy: {required: true}
}
Expand All @@ -194,7 +194,7 @@ describe('AppNexusAdapter', () => {
expect(payload.tags[0].native.layouts[0]).to.deep.equal({
title: {required: true},
description: {required: true},
main_image: {required: true, sizes: [{ width: 100, height: 100 }] },
main_image: {required: true, sizes: [{ width: 100, height: 100 }]},
ctatext: {required: false},
sponsored_by: {required: true}
});
Expand All @@ -215,7 +215,7 @@ describe('AppNexusAdapter', () => {
const payload = JSON.parse(request.data);

expect(payload.tags[0].native.layouts[0]).to.deep.equal({
main_image: {required: true, sizes: [{}] },
main_image: {required: true, sizes: [{}]},
});
});

Expand Down
8 changes: 4 additions & 4 deletions test/spec/modules/jcmBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ describe('jcmAdapter', () => {
describe('getUserSyncs', () => {
it('Verifies sync iframe option', () => {
expect(spec.getUserSyncs({})).to.be.undefined;
expect(spec.getUserSyncs({ iframeEnabled: false})).to.be.undefined;
const options = spec.getUserSyncs({ iframeEnabled: true});
expect(spec.getUserSyncs({ iframeEnabled: false })).to.be.undefined;
const options = spec.getUserSyncs({ iframeEnabled: true });
expect(options).to.not.be.undefined;
expect(options).to.have.lengthOf(1);
expect(options[0].type).to.equal('iframe');
expect(options[0].url).to.equal('//media.adfrontiers.com/hb/jcm_usersync.html');
});

it('Verifies sync image option', () => {
expect(spec.getUserSyncs({ image: false})).to.be.undefined;
const options = spec.getUserSyncs({ image: true});
expect(spec.getUserSyncs({ image: false })).to.be.undefined;
const options = spec.getUserSyncs({ image: true });
expect(options).to.not.be.undefined;
expect(options).to.have.lengthOf(1);
expect(options[0].type).to.equal('image');
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ describe('S2S Adapter', () => {
adapter: 'prebidServer'
};

config.setConfig({ s2sConfig: options});
config.setConfig({ s2sConfig: options });
sinon.assert.calledOnce(logErrorSpy);
});

Expand Down
12 changes: 6 additions & 6 deletions test/spec/modules/pulsepointBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ describe('PulsePoint Adapter Tests', () => {
const nativeResponse = {
'native': {
assets: [
{ title: { text: 'Ad Title'} },
{ data: { type: 1, value: 'Sponsored By: Brand' }},
{ title: { text: 'Ad Title' } },
{ data: { type: 1, value: 'Sponsored By: Brand' } },
{ img: { type: 3, url: 'http://images.cdn.brand.com/123' } }
],
link: { url: 'http://brand.clickme.com/' },
Expand Down Expand Up @@ -240,21 +240,21 @@ describe('PulsePoint Adapter Tests', () => {
expect(spec.isBidRequestValid({ params: {} })).to.equal(false);
expect(spec.isBidRequestValid({ params: { ct: 123 } })).to.equal(false);
expect(spec.isBidRequestValid({ params: { cp: 123 } })).to.equal(false);
expect(spec.isBidRequestValid({ params: { ct: 123, cp: 234 }})).to.equal(true);
expect(spec.isBidRequestValid({ params: { ct: 123, cp: 234 } })).to.equal(true);
});

it('Verifies sync options', () => {
expect(spec.getUserSyncs({})).to.be.undefined;
expect(spec.getUserSyncs({ iframeEnabled: false})).to.be.undefined;
const options = spec.getUserSyncs({ iframeEnabled: true});
expect(spec.getUserSyncs({ iframeEnabled: false })).to.be.undefined;
const options = spec.getUserSyncs({ iframeEnabled: true });
expect(options).to.not.be.undefined;
expect(options).to.have.lengthOf(1);
expect(options[0].type).to.equal('iframe');
expect(options[0].url).to.equal('//bh.contextweb.com/visitormatch');
});

it('Verifies image pixel sync', () => {
const options = spec.getUserSyncs({ pixelEnabled: true});
const options = spec.getUserSyncs({ pixelEnabled: true });
expect(options).to.not.be.undefined;
expect(options).to.have.lengthOf(1);
expect(options[0].type).to.equal('image');
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/somoaudienceBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Somo Audience Adapter Tests', () => {
expect(spec.isBidRequestValid({})).to.equal(false);
expect(spec.isBidRequestValid(bidderBadSet[0])).to.equal(false);
expect(spec.isBidRequestValid({ params: {} })).to.equal(false);
expect(spec.isBidRequestValid({ params: { placementId: '12345' }})).to.equal(true);
expect(spec.isBidRequestValid({ params: { placementId: '12345' } })).to.equal(true);
});

it('Verifies buildRequests', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/unit/core/bidderFactory_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('bidders created by newBidder', () => {
const bidder = newBidder(spec);
const url = 'test.url.com';
const data = { arg: 2 };
const options = { contentType: 'application/json'};
const options = { contentType: 'application/json' };
spec.isBidRequestValid.returns(true);
spec.buildRequests.returns({
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion test/spec/unit/pbjs_api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ describe('Unit: Prebid Module', function () {
const customConfigObject = {
'buckets': [
{ 'precision': 2, 'min': 0, 'max': 5, 'increment': 0.01 },
{ 'precision': 2, 'min': 5, 'max': 8, 'increment': 0.05},
{ 'precision': 2, 'min': 5, 'max': 8, 'increment': 0.05 },
{ 'precision': 2, 'min': 8, 'max': 20, 'increment': 0.5 },
{ 'precision': 2, 'min': 20, 'max': 25, 'increment': 1 }
]
Expand Down