Skip to content

Commit 2cefac6

Browse files
committed
prettier files
1 parent d5b72fa commit 2cefac6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+589
-574
lines changed

.eslintrc.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ module.exports = {
22
env: {
33
browser: true,
44
es6: true,
5-
node: true
5+
node: true,
66
},
77
extends: 'eslint:recommended',
88
parser: 'babel-eslint',
99
parserOptions: {
1010
ecmaVersion: 2015,
11-
sourceType: 'module'
11+
sourceType: 'module',
1212
},
1313
plugins: ['import'],
1414
rules: {
@@ -32,7 +32,7 @@ module.exports = {
3232
'no-multiple-empty-lines': ['warn'],
3333
'no-multi-spaces': [
3434
'warn',
35-
{ exceptions: { VariableDeclarator: true, ImportDeclaration: true } }
35+
{ exceptions: { VariableDeclarator: true, ImportDeclaration: true } },
3636
],
3737
'no-restricted-globals': ['error', 'fdescribe', 'fit'],
3838
'no-shadow': ['error'],
@@ -41,14 +41,14 @@ module.exports = {
4141
'no-unreachable': ['error'],
4242
'no-unused-vars': [
4343
'error',
44-
{ argsIgnorePattern: '^_', ignoreRestSiblings: true, args: 'after-used' }
44+
{ argsIgnorePattern: '^_', ignoreRestSiblings: true, args: 'after-used' },
4545
],
4646
'no-prototype-builtins': ['off'],
4747
'no-var': ['error'],
4848
'object-shorthand': ['warn'],
4949
'prefer-const': ['error'],
5050
'prefer-rest-params': ['error'],
5151
'prefer-spread': ['warn'],
52-
'prefer-template': ['warn']
53-
}
52+
'prefer-template': ['warn'],
53+
},
5454
};

bundle_size.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const path = require('path');
44
const newDistPath = './dist';
55
const oldDistPath = './dist_old';
66

7-
const getFileSizes = folderPath => {
7+
const getFileSizes = (folderPath) => {
88
return fs.readdirSync(folderPath).reduce((res, fileName) => {
99
res[fileName] = fs.readFileSync(path.join(folderPath, fileName)).byteLength;
1010
return res;

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// https://jestjs.io/docs/en/configuration.html
33

44
module.exports = {
5-
clearMocks: true
5+
clearMocks: true,
66
};

spec/creative_companion_parser.spec.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { parseCreativeCompanion } from '../src/parser/creative_companion_parser'
22
import { getNodesFromXml } from './utils/utils';
33
import { companionAds } from './samples/companion_ads';
44

5-
describe('parseCreativeCompanion', function() {
5+
describe('parseCreativeCompanion', function () {
66
const creativeElement = getNodesFromXml(companionAds);
77
const creativeAttributes = {
88
id: '1',
99
adId: '1234',
1010
sequence: '1',
11-
apiFramework: null
11+
apiFramework: null,
1212
};
1313
let creative = null;
1414

@@ -25,7 +25,7 @@ describe('parseCreativeCompanion', function() {
2525
id: '1',
2626
adId: '1234',
2727
sequence: '1',
28-
apiFramework: null
28+
apiFramework: null,
2929
});
3030
});
3131

@@ -55,20 +55,20 @@ describe('parseCreativeCompanion', function() {
5555
apiFramework: 'VPAID',
5656
adSlotID: '1',
5757
pxratio: '2',
58-
renderingMode: 'end-card'
58+
renderingMode: 'end-card',
5959
});
6060
});
6161

6262
it('gets the static resources and their creative types', () => {
6363
expect(companion.staticResources).toEqual([
6464
{
6565
url: 'http://example.com/companion1-static-resource1',
66-
creativeType: 'image/jpeg'
66+
creativeType: 'image/jpeg',
6767
},
6868
{
6969
url: 'http://example.com/companion1-static-resource2',
70-
creativeType: 'image/jpeg'
71-
}
70+
creativeType: 'image/jpeg',
71+
},
7272
]);
7373
expect(companion.iframeResources).toEqual([]);
7474
expect(companion.htmlResources).toEqual([]);
@@ -80,7 +80,7 @@ describe('parseCreativeCompanion', function() {
8080

8181
it('gets tracking events', () => {
8282
expect(companion.trackingEvents).toEqual({
83-
creativeView: ['http://example.com/companion1-creativeview']
83+
creativeView: ['http://example.com/companion1-creativeview'],
8484
});
8585
});
8686

@@ -94,12 +94,12 @@ describe('parseCreativeCompanion', function() {
9494
expect(companion.companionClickTrackingURLTemplates).toEqual([
9595
{
9696
id: '1',
97-
url: 'http://example.com/companion1-clicktracking-first'
97+
url: 'http://example.com/companion1-clicktracking-first',
9898
},
9999
{
100100
id: '2',
101-
url: 'http://example.com/companion1-clicktracking-second'
102-
}
101+
url: 'http://example.com/companion1-clicktracking-second',
102+
},
103103
]);
104104
});
105105

@@ -132,14 +132,14 @@ describe('parseCreativeCompanion', function() {
132132
apiFramework: 'VPAID',
133133
adSlotID: '2',
134134
pxratio: '1',
135-
renderingMode: 'concurrent'
135+
renderingMode: 'concurrent',
136136
});
137137
});
138138

139139
it('gets the iframe resources', () => {
140140
expect(companion.staticResources).toEqual([]);
141141
expect(companion.iframeResources).toEqual([
142-
'http://www.example.com/companion2-example.php'
142+
'http://www.example.com/companion2-example.php',
143143
]);
144144
expect(companion.htmlResources).toEqual([]);
145145
});
@@ -150,7 +150,7 @@ describe('parseCreativeCompanion', function() {
150150

151151
it('gets tracking events', () => {
152152
expect(companion.trackingEvents).toEqual({
153-
creativeView: ['http://example.com/companion2-creativeview']
153+
creativeView: ['http://example.com/companion2-creativeview'],
154154
});
155155
});
156156

@@ -193,15 +193,15 @@ describe('parseCreativeCompanion', function() {
193193
apiFramework: 'VPAID',
194194
adSlotID: '3',
195195
pxratio: '1',
196-
renderingMode: 'default'
196+
renderingMode: 'default',
197197
});
198198
});
199199

200200
it('gets the html resources', () => {
201201
expect(companion.staticResources).toEqual([]);
202202
expect(companion.iframeResources).toEqual([]);
203203
expect(companion.htmlResources).toEqual([
204-
'<a href="http://www.example.com" target="_blank">Some call to action HTML!</a>'
204+
'<a href="http://www.example.com" target="_blank">Some call to action HTML!</a>',
205205
]);
206206
});
207207

@@ -211,7 +211,7 @@ describe('parseCreativeCompanion', function() {
211211

212212
it('gets tracking events', () => {
213213
expect(companion.trackingEvents).toEqual({
214-
creativeView: ['http://example.com/companion3-creativeview']
214+
creativeView: ['http://example.com/companion3-creativeview'],
215215
});
216216
});
217217

spec/creatives_parser.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { parserUtils } from '../src/parser/parser_utils';
33
import { getNodesFromXml } from './utils/utils';
44
import { creatives } from './samples/creatives';
55

6-
describe('CreativesParser', function() {
7-
describe('ParseCreatives', function() {
6+
describe('CreativesParser', function () {
7+
describe('ParseCreatives', function () {
88
let parsedCreatives;
99

1010
beforeAll(() => {

0 commit comments

Comments
 (0)