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

1206 eslint repair camel case #13

Merged
merged 3 commits into from
Aug 1, 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
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = {
// Violations of these styles should be fixed, and the exceptions removed over time.
//
// See Issue #1111.
"camelcase": "off",
"eqeqeq": "off",
"no-return-assign": "off",
"no-throw-literal": "off",
Expand Down
2 changes: 1 addition & 1 deletion modules/adkernelAdnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const spec = {
return serverResponses.filter(rps => rps.body && rps.body.syncpages)
.map(rsp => rsp.body.syncpages)
.reduce((a, b) => a.concat(b), [])
.map(sync_url => ({type: 'iframe', url: sync_url}));
.map(syncUrl => ({type: 'iframe', url: syncUrl}));
}
};

Expand Down
2 changes: 1 addition & 1 deletion modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const spec = {
return serverResponses.filter(rsp => rsp.body && rsp.body.ext && rsp.body.ext.adk_usersync)
.map(rsp => rsp.body.ext.adk_usersync)
.reduce((a, b) => a.concat(b), [])
.map(sync_url => ({type: 'iframe', url: sync_url}));
.map(syncUrl => ({type: 'iframe', url: syncUrl}));
}
};

Expand Down
2 changes: 1 addition & 1 deletion modules/andbeyondBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const spec = {
return serverResponses.filter(rsp => rsp.body && rsp.body.ext && rsp.body.ext.adk_usersync)
.map(rsp => rsp.body.ext.adk_usersync)
.reduce((a, b) => a.concat(b), [])
.map(sync_url => ({type: 'iframe', url: sync_url}));
.map(syncUrl => ({type: 'iframe', url: syncUrl}));
}
};

Expand Down
12 changes: 6 additions & 6 deletions modules/audienceNetworkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const method = 'GET';
const url = 'https://an.facebook.com/v2/placementbid.json';
const supportedMediaTypes = ['banner', 'video'];
const netRevenue = true;
const hb_bidder = 'fan';
const hbBidder = 'fan';
const platver = '$prebid.version$';
const platform = '241394079772386';
const adapterver = '1.0.0';
Expand Down Expand Up @@ -205,14 +205,14 @@ const interpretResponse = ({ body }, { adformats, requestIds, sizes }) => {
// transform to bidResponse
.map((bid, i) => {
const {
bid_id: fb_bidid,
bid_id: fbBidid,
placement_id: creativeId,
bid_price_cents: cpm
} = bid;

const format = adformats[i];
const [width, height] = expandSize(flattenSize(sizes[i]));
const ad = createAdHtml(creativeId, format, fb_bidid);
const ad = createAdHtml(creativeId, format, fbBidid);
const requestId = requestIds[i];

const bidResponse = {
Expand All @@ -227,16 +227,16 @@ const interpretResponse = ({ body }, { adformats, requestIds, sizes }) => {
netRevenue,
currency,
// Audience Network attributes
hb_bidder,
fb_bidid,
hb_bidder: hbBidder,
fb_bidid: fbBidid,
fb_format: format,
fb_placementid: creativeId
};
// Video attributes
if (isVideo(format)) {
const pageurl = getTopWindowUrlEncoded();
bidResponse.mediaType = 'video';
bidResponse.vastUrl = `https://an.facebook.com/v1/instream/vast.xml?placementid=${creativeId}&pageurl=${pageurl}&playerwidth=${width}&playerheight=${height}&bidid=${fb_bidid}`;
bidResponse.vastUrl = `https://an.facebook.com/v1/instream/vast.xml?placementid=${creativeId}&pageurl=${pageurl}&playerwidth=${width}&playerheight=${height}&bidid=${fbBidid}`;
}
return bidResponse;
});
Expand Down
40 changes: 20 additions & 20 deletions modules/bridgewellBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,35 +164,35 @@ export const spec = {
return;
}

let req_nativeLayout = req.mediaTypes.native;
let res_native = matchedResponse.native;
let reqNativeLayout = req.mediaTypes.native;
let resNative = matchedResponse.native;

// check title
let title = req_nativeLayout.title;
let title = reqNativeLayout.title;
if (title && title.required) {
if (typeof res_native.title !== 'string') {
if (typeof resNative.title !== 'string') {
return;
} else if (title.len && title.len < res_native.title.length) {
} else if (title.len && title.len < resNative.title.length) {
return;
}
}

// check body
let body = req_nativeLayout.body;
let body = reqNativeLayout.body;
if (body && body.required) {
if (typeof res_native.body !== 'string') {
if (typeof resNative.body !== 'string') {
return;
}
}

// check image
let image = req_nativeLayout.image;
let image = reqNativeLayout.image;
if (image && image.required) {
if (res_native.image) {
if (typeof res_native.image.url !== 'string') { // check image url
if (resNative.image) {
if (typeof resNative.image.url !== 'string') { // check image url
return;
} else {
if (res_native.image.width !== image.sizes[0] || res_native.image.height !== image.sizes[1]) { // check image sizes
if (resNative.image.width !== image.sizes[0] || resNative.image.height !== image.sizes[1]) { // check image sizes
return;
}
}
Expand All @@ -202,21 +202,21 @@ export const spec = {
}

// check sponsoredBy
let sponsoredBy = req_nativeLayout.sponsoredBy;
let sponsoredBy = reqNativeLayout.sponsoredBy;
if (sponsoredBy && sponsoredBy.required) {
if (typeof res_native.sponsoredBy !== 'string') {
if (typeof resNative.sponsoredBy !== 'string') {
return;
}
}

// check icon
let icon = req_nativeLayout.icon;
let icon = reqNativeLayout.icon;
if (icon && icon.required) {
if (res_native.icon) {
if (typeof res_native.icon.url !== 'string') { // check icon url
if (resNative.icon) {
if (typeof resNative.icon.url !== 'string') { // check icon url
return;
} else {
if (res_native.icon.width !== icon.sizes[0] || res_native.icon.height !== icon.sizes[0]) { // check image sizes
if (resNative.icon.width !== icon.sizes[0] || resNative.icon.height !== icon.sizes[0]) { // check image sizes
return;
}
}
Expand All @@ -226,12 +226,12 @@ export const spec = {
}

// check clickUrl
if (typeof res_native.clickUrl !== 'string') {
if (typeof resNative.clickUrl !== 'string') {
return;
}

// check clickTracker
let clickTrackers = res_native.clickTrackers;
let clickTrackers = resNative.clickTrackers;
if (clickTrackers) {
if (clickTrackers.length === 0) {
return;
Expand All @@ -241,7 +241,7 @@ export const spec = {
}

// check impressionTrackers
let impressionTrackers = res_native.impressionTrackers;
let impressionTrackers = resNative.impressionTrackers;
if (impressionTrackers) {
if (impressionTrackers.length === 0) {
return;
Expand Down
10 changes: 5 additions & 5 deletions modules/etargetBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {registerBidder} from 'src/adapters/bidderFactory';
import { BANNER, VIDEO } from 'src/mediaTypes';

const BIDDER_CODE = 'etarget';
const country_map = {
const countryMap = {
1: 'sk',
2: 'cz',
3: 'hu',
Expand All @@ -28,18 +28,18 @@ export const spec = {
var i, l, bid, reqParams, netRevenue, gdprObject;
var request = [];
var bids = JSON.parse(JSON.stringify(validBidRequests));
var last_contry = 'sk';
var lastContry = 'sk';
for (i = 0, l = bids.length; i < l; i++) {
bid = bids[i];
if (country_map[bid.params.country]) {
last_contry = country_map[bid.params.country];
if (countryMap[bid.params.country]) {
lastContry = countryMap[bid.params.country];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda bothers me that this is spelled wrong.. but whatever. its not ours

}
reqParams = bid.params;
reqParams.transactionId = bid.transactionId;
request.push(formRequestUrl(reqParams));
}

request.unshift('//' + last_contry + '.search.etargetnet.com/hb/?hbget=1');
request.unshift('//' + lastContry + '.search.etargetnet.com/hb/?hbget=1');
netRevenue = 'net';

if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) {
Expand Down
4 changes: 2 additions & 2 deletions modules/nasmediaAdmixerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ export const spec = {
function getOsType() {
let ua = navigator.userAgent.toLowerCase();
let os = ['android', 'ios', 'mac', 'linux', 'window'];
let regexp_os = [/android/i, /iphone|ipad/i, /mac/i, /linux/i, /window/i];
let regexpOs = [/android/i, /iphone|ipad/i, /mac/i, /linux/i, /window/i];

return find(os, (tos, idx) => {
if (ua.match(regexp_os[idx])) {
if (ua.match(regexpOs[idx])) {
return os[idx];
}
}) || 'etc';
Expand Down
24 changes: 12 additions & 12 deletions modules/polluxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,41 @@ export const spec = {
return [];
}
const payload = [];
let custom_url = null;
let customUrl = null;
for (let i = 0; i < validBidRequests.length; i++) {
const bid = validBidRequests[i];
const request = {
bidId: bid.bidId,
zones: bid.params.zone,
sizes: bid.sizes
};
if (bid.bidderUrl && !custom_url) {
custom_url = bid.bidderUrl;
if (bid.bidderUrl && !customUrl) {
customUrl = bid.bidderUrl;
}
payload.push(request);
}
const payloadString = JSON.stringify(payload);
// build url parameters
const domain = utils.getParameterByName('domain');
const tracker2 = utils.getParameterByName('tracker2');
const url_params = {};
const urlParams = {};
if (domain) {
url_params.domain = domain;
urlParams.domain = domain;
} else {
url_params.domain = utils.getTopWindowUrl();
urlParams.domain = utils.getTopWindowUrl();
}
if (tracker2) {
url_params.tracker2 = tracker2;
urlParams.tracker2 = tracker2;
}
// build url
let bidder_url = custom_url || PLX_ENDPOINT_URL;
if (url_params) {
bidder_url = bidder_url + '?' + utils.parseQueryStringParameters(url_params);
let bidderUrl = customUrl || PLX_ENDPOINT_URL;
if (urlParams) {
bidderUrl = bidderUrl + '?' + utils.parseQueryStringParameters(urlParams);
}
utils.logMessage('== ' + BIDDER_CODE + ' == request built: ' + bidder_url);
utils.logMessage('== ' + BIDDER_CODE + ' == request built: ' + bidderUrl);
return {
method: 'POST',
url: bidder_url,
url: bidderUrl,
data: payloadString
};
},
Expand Down
42 changes: 21 additions & 21 deletions modules/realvuAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
}
if (a.riff === '') {
a.riff = a.r;
let vr_score = z.score(a, 'v:r');
if (vr_score != null) {
if (a.r == 'no' && vr_score > 75) {
let vrScore = z.score(a, 'v:r');
if (vrScore != null) {
if (a.r == 'no' && vrScore > 75) {
a.riff = 'yes';
}
}
let vv0_score = z.score(a, 'v:v0');
if (vv0_score != null) {
if (a.r == 'yes' && vv0_score < (30 + 25 * Math.random())) {
let vv0Score = z.score(a, 'v:v0');
if (vv0Score != null) {
if (a.r == 'yes' && vv0Score < (30 + 25 * Math.random())) {
a.riff = 'no';
}
}
Expand Down Expand Up @@ -439,20 +439,20 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
return par.offsetParent;
}
}
let not_friendly = false;
let notFriendly = false;
let ain = null;
let tn = a.tagName;
if (tn == 'HEAD' || tn == 'SCRIPT') return null;
if (tn == 'IFRAME') {
ain = this.doc(a);
if (ain == null) {
not_friendly = true;
notFriendly = true;
} else {
a = ain;
tn = a.tagName;
}
}
if (not_friendly || tn == 'OBJECT' || tn == 'IMG' || tn == 'EMBED' || tn == 'SVG' || tn == 'CANVAS' ||
if (notFriendly || tn == 'OBJECT' || tn == 'IMG' || tn == 'EMBED' || tn == 'SVG' || tn == 'CANVAS' ||
(tn == 'DIV' && a.style.backgroundImage)) {
let w1 = a.offsetWidth;
let h1 = a.offsetHeight;
Expand Down Expand Up @@ -658,12 +658,12 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
return null;
},
// API functions
addUnitById: function (partner_id, unit_id, callback, delay) {
let p1 = partner_id;
addUnitById: function (partnerId, unitId, callback, delay) {
let p1 = partnerId;
if (typeof (p1) == 'string') {
p1 = {
partner_id: partner_id,
unit_id: unit_id,
partner_id: partnerId,
unit_id: unitId,
callback: callback,
delay: delay
};
Expand All @@ -676,25 +676,25 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
// b==true - add/update, b==false - update only
if (args.cpm == 0) return; // collect only bids submitted
const boost = window.top1.realvu_aa;
let push_bid = false;
let pushBid = false;
let adi = null;
if (!b) { // update only if already checked in by xyzBidAdapter
for (let i = 0; i < boost.ads.length; i++) {
adi = boost.ads[i];
if (adi.unit_id == args.adUnitCode) {
push_bid = true;
pushBid = true;
break;
}
}
} else {
push_bid = true;
pushBid = true;
adi = window.top1.realvu_aa.check({
unit_id: args.adUnitCode,
size: args.size,
partner_id: partnerId
});
}
if (push_bid) {
if (pushBid) {
let pb = {
bidder: args.bidder,
cpm: args.cpm,
Expand All @@ -715,10 +715,10 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
checkBidWon: function(partnerId, args, b) {
// b==true - add/update, b==false - update only
const z = this;
const unit_id = args.adUnitCode;
const unitId = args.adUnitCode;
for (let i = 0; i < z.ads.length; i++) {
let adi = z.ads[i];
if (adi.unit_id == unit_id) {
if (adi.unit_id == unitId) {
for (let j = 0; j < adi.bids.length; j++) {
let bj = adi.bids[j];
if (bj.adId == args.adId) {
Expand Down Expand Up @@ -754,10 +754,10 @@ window.top1.realvu_aa = window.top1.realvu_aa || {
return rpt;
},

getStatusById: function (unit_id) { // return status object
getStatusById: function (unitId) { // return status object
for (let i = 0; i < this.ads.length; i++) {
let adi = this.ads[i];
if (adi.unit_id == unit_id) return this.fmt(adi);
if (adi.unit_id == unitId) return this.fmt(adi);
}
return null;
},
Expand Down
Loading