Skip to content

Commit

Permalink
Enforce Dangling Commas
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Feb 26, 2016
1 parent dedcd4f commit de7a14d
Show file tree
Hide file tree
Showing 140 changed files with 931 additions and 852 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"array-bracket-spacing": [2, "never"],
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"comma-dangle": [2, "always-multiline"],
"computed-property-spacing": [2, "never"],
"curly": 2,
"dot-location": [2, "property"],
Expand Down
6 changes: 3 additions & 3 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {openadstream} from '../ads/openadstream';
* @const {!Object<string: boolean>}
*/
const AMP_EMBED_ALLOWED = {
taboola: true
taboola: true,
};

register('a9', a9);
Expand Down Expand Up @@ -207,7 +207,7 @@ function triggerDimensions(width, height) {
function triggerResizeRequest(width, height) {
nonSensitiveDataPostMessage('embed-size', {
width: width,
height: height
height: height,
});
}

Expand Down Expand Up @@ -283,7 +283,7 @@ function reportRenderedEntityIdentifier(entityId) {
assert(typeof entityId == 'string',
'entityId should be a string %s', entityId);
nonSensitiveDataPostMessage('entity-id', {
id: entityId
id: entityId,
});
}

Expand Down
2 changes: 1 addition & 1 deletion ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const adPreconnect = {
'https://trends.revcontent.com',
'https://cdn.revcontent.com',
'https://img.revcontent.com',
]
],
};

/**
Expand Down
2 changes: 1 addition & 1 deletion ads/adform.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {writeScript, validateSrcPrefix, validateExactlyOne} from '../src/3p';
// Valid adform ad source hosts
const hosts = {
track: 'https://track.adform.net/',
adx: 'https://adx.adform.net/'
adx: 'https://adx.adform.net/',
};

/**
Expand Down
2 changes: 1 addition & 1 deletion ads/doubleclick.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function doubleclick(global, data) {
function doubleClickWithGpt(global, data) {
const dimensions = [[
parseInt(data.overrideWidth || data.width, 10),
parseInt(data.overrideHeight || data.height, 10)
parseInt(data.overrideHeight || data.height, 10),
]];

if (global.context.clientId) {
Expand Down
2 changes: 1 addition & 1 deletion ads/mediaimpact.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function mediaimpact(global, data) {
}, false);
asmiSetup = {
view: 'm',
async: true
async: true,
};
loadScript(global, 'https://ec-ns.sascdn.com/diff/251/divscripte/amp.js?dom=' + window.context.location.host, () => {
if (!document.getElementById('sas_' + data.slot.replace('sas_',''))) {
Expand Down
6 changes: 3 additions & 3 deletions ads/plista.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {loadScript, checkData} from '../src/3p';
export function plista(global, data) {
checkData(data, [
'publickey', 'widgetname', 'urlprefix',
'item', 'geo', 'categories', 'countrycode'
'item', 'geo', 'categories', 'countrycode',
]);
const div = global.document.createElement('div');
div.setAttribute('data-display', 'plista_widget_' + data.widgetname);
Expand All @@ -33,14 +33,14 @@ export function plista(global, data) {
publickey: data.publickey,
widgets: [{
name: data.widgetname,
pre: data.urlprefix
pre: data.urlprefix,
}],
item: data.item,
geo: data.geo,
categories: data.categories,
noCache: true,
useDocumentReady: false,
dataMode: 'data-display'
dataMode: 'data-display',
};

// load the plista modules asynchronously
Expand Down
2 changes: 1 addition & 1 deletion ads/smartadserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function smartadserver(global, data) {
'pageId': data.page,
'formatId': data.format,
'target': data.target,
'tagId': data.tag
'tagId': data.tag,
});
});
});
Expand Down
6 changes: 3 additions & 3 deletions ads/taboola.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function taboola(global, data) {
// setup default values for referrer and url
const params = {
referrer: data.referrer || global.context.referrer,
url: data.url || global.context.canonicalUrl
url: data.url || global.context.canonicalUrl,
};

// copy none blacklisted attribute to the 'params' map
Expand All @@ -52,7 +52,7 @@ export function taboola(global, data) {
placement: data.placement,
mode: data.mode,
framework: 'amp',
container: 'c'
container: 'c',
},
params,
{flush: true}]
Expand All @@ -65,7 +65,7 @@ export function taboola(global, data) {
global._taboola.push({
visible: true,
rects: c,
placement: data.placement
placement: data.placement,
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion builtins/amp-ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {userNotificationManagerFor} from '../src/user-notification';

/** @private @const These tags are allowed to have fixed positioning */
const POSITION_FIXED_TAG_WHITELIST = {
'AMP-LIGHTBOX': true
'AMP-LIGHTBOX': true,
};

/**
Expand Down
10 changes: 5 additions & 5 deletions extensions/amp-access/0.1/amp-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export class AccessService {
broadcastReauthorize_() {
this.viewer_.broadcast({
'type': 'amp-access-reauthorize',
'origin': this.pubOrigin_
'origin': this.pubOrigin_,
});
}

Expand Down Expand Up @@ -338,7 +338,7 @@ export class AccessService {
return this.getReaderId_().then(readerId => {
const vars = {
'READER_ID': readerId,
'ACCESS_READER_ID': readerId // A synonym.
'ACCESS_READER_ID': readerId, // A synonym.
};
if (useAuthData) {
vars['AUTHDATA'] = field => {
Expand Down Expand Up @@ -373,7 +373,7 @@ export class AccessService {
AUTHORIZATION_TIMEOUT,
this.xhr_.fetchJson(url, {
credentials: 'include',
requireAmpResponseSourceOrigin: true
requireAmpResponseSourceOrigin: true,
}));
}).catch(error => {
this.analyticsEvent_('access-authorization-failed');
Expand Down Expand Up @@ -662,9 +662,9 @@ export class AccessService {
credentials: 'include',
requireAmpResponseSourceOrigin: true,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
'Content-Type': 'application/x-www-form-urlencoded',
},
body: ''
body: '',
});
}).then(() => {
log.fine(TAG, 'Pingback complete');
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-access/0.1/amp-login-done-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class LoginDoneDialog {
opener./*OK*/postMessage({
sentinel: 'amp',
type: 'result',
result: response
result: response,
}, target);

this.win.setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-access/0.1/login-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class LoginDialog {
if (this.dialog_) {
this.dialog_./*OK*/postMessage({
sentinel: 'amp',
type: 'result-ack'
type: 'result-ack',
}, returnOrigin);
}
this.loginDone_(e.data.result);
Expand Down
6 changes: 3 additions & 3 deletions extensions/amp-access/0.1/test/test-access-expr.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('evaluateAccessExpr', () => {
str: 'A',
num: 11,
bool: true,
}
},
};

expect(evaluateAccessExpr('obj.bool = true', resp)).to.be.true;
Expand All @@ -226,8 +226,8 @@ describe('evaluateAccessExpr', () => {
obj: {
str: 'A',
child: {
str: 'B'
}
str: 'B',
},
},
};

Expand Down
Loading

0 comments on commit de7a14d

Please sign in to comment.