Skip to content

Commit 3ab2105

Browse files
committed
npm run fix
1 parent 9a3e368 commit 3ab2105

Some content is hidden

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

72 files changed

+162
-148
lines changed

functions/src/generate-sessions-speakers-schedule.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const isScheduleEnabled = async (): Promise<boolean> => {
1313
return doc.data().enabled === 'true' || doc.data().enabled === true;
1414
} else {
1515
functions.logger.error(
16-
'Schedule config is not set. Set the `config/schedule.enabled=true` Firestore value.'
16+
'Schedule config is not set. Set the `config/schedule.enabled=true` Firestore value.',
1717
);
1818
return false;
1919
}
@@ -82,7 +82,7 @@ async function generateAndSaveData(changedSpeaker?) {
8282
function saveGeneratedData(data: SessionMap | SpeakerMap | ScheduleMap, collectionName: string) {
8383
if (isEmpty(data)) {
8484
functions.logger.error(
85-
`Attempting to write empty data to Firestore collection: "${collectionName}".`
85+
`Attempting to write empty data to Firestore collection: "${collectionName}".`,
8686
);
8787
return;
8888
}

functions/src/mailchimp-subscribe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ function subscribeToMailchimp(mailchimpConfig, subscriberData, emailHash?: strin
6262
}
6363
})
6464
.catch((error) =>
65-
functions.logger.error(`Error occured during Mailchimp subscription: ${error}`)
65+
functions.logger.error(`Error occured during Mailchimp subscription: ${error}`),
6666
);
6767
}

functions/src/schedule-generator/speakers-sessions-schedule-map.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export function sessionsSpeakersScheduleMap(sessionsRaw, speakersRaw, scheduleRa
4141
day,
4242
timeslotsIndex,
4343
dayKey,
44-
subSessionIndex
44+
subSessionIndex,
4545
);
4646
const startTime = calculateStartTime(
4747
subSessionsLen,
4848
subSessionIndex,
4949
sessionIndex,
5050
sessions,
51-
timeslot
51+
timeslot,
5252
);
5353

5454
dayTags = combineTags(dayTags, subsession?.tags);
@@ -76,7 +76,7 @@ export function sessionsSpeakersScheduleMap(sessionsRaw, speakersRaw, scheduleRa
7676
speakersRaw,
7777
subsession.speakers,
7878
finalSubSession,
79-
speakers
79+
speakers,
8080
),
8181
};
8282
}
@@ -87,8 +87,8 @@ export function sessionsSpeakersScheduleMap(sessionsRaw, speakersRaw, scheduleRa
8787
sessionsLen !== 1
8888
? sessionIndex + 2
8989
: Object.keys(extensions).length
90-
? Object.keys(extensions)[0]
91-
: tracksNumber + 1;
90+
? Object.keys(extensions)[0]
91+
: tracksNumber + 1;
9292
const start = `${timeslotsIndex + 1} / ${sessionIndex + 1}`;
9393
const end = `${displayStart} / ${displayEnd}`;
9494

functions/src/schedule-notifications.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const removeUserTokens = (tokensToUsers) => {
3434
}, {});
3535

3636
transaction.set(ref, newVal);
37-
})
37+
}),
3838
);
3939
});
4040

@@ -46,7 +46,7 @@ const sendPushNotificationToUsers = async (userIds: string[], payload: Messaging
4646
'sendPushNotificationToUsers user ids',
4747
userIds,
4848
'with notification',
49-
payload
49+
payload,
5050
);
5151

5252
const tokensPromise = userIds.map((id) => {
@@ -99,7 +99,7 @@ export const scheduleNotifications = functions.pubsub
9999

100100
const schedule = scheduleSnapshot.docs.reduce(
101101
(acc, doc) => ({ ...acc, [doc.id]: doc.data() }),
102-
{}
102+
{},
103103
);
104104
const todayDay = moment().utcOffset(notificationsConfig.timezone).format('YYYY-MM-DD');
105105

@@ -110,16 +110,16 @@ export const scheduleNotifications = functions.pubsub
110110
const upcomingTimeslot = schedule[todayDay].timeslots.filter((timeslot) => {
111111
const timeslotTime = moment(
112112
`${timeslot.startTime}${notificationsConfig.timezone}`,
113-
`${FORMAT}Z`
113+
`${FORMAT}Z`,
114114
).subtract(10, 'minutes');
115115
return timeslotTime.isBetween(beforeTime, afterTime);
116116
});
117117

118118
const upcomingSessions = upcomingTimeslot.reduce((_result, timeslot) =>
119119
timeslot.sessions.reduce(
120120
(aggregatedSessions, current) => [...aggregatedSessions, ...current.items],
121-
[]
122-
)
121+
[],
122+
),
123123
);
124124
const usersIdsSnapshot = await getFirestore().collection('featuredSessions').get();
125125

@@ -132,20 +132,20 @@ export const scheduleNotifications = functions.pubsub
132132

133133
const usersIds = usersIdsSnapshot.docs.reduce(
134134
(acc, doc) => ({ ...acc, [doc.id]: doc.data() }),
135-
{}
135+
{},
136136
);
137137

138138
const userIdsFeaturedSession = Object.keys(usersIds).filter(
139139
(userId) =>
140140
!!Object.keys(usersIds[userId]).filter(
141-
(sessionId) => sessionId.toString() === upcomingSession.toString()
142-
).length
141+
(sessionId) => sessionId.toString() === upcomingSession.toString(),
142+
).length,
143143
);
144144

145145
const session = sessionInfoSnapshot.data();
146146
const end = moment(
147147
`${upcomingTimeslot[0].startTime}${notificationsConfig.timezone}`,
148-
`${FORMAT}Z`
148+
`${FORMAT}Z`,
149149
);
150150
const fromNow = end.fromNow();
151151

functions/src/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const calculateStartTime = (
4747
subSessionIndex: number,
4848
sessionIndex: number,
4949
sessions: any,
50-
timeslot: any
50+
timeslot: any,
5151
) => {
5252
return subSessionsLen > 1 && subSessionIndex > 0
5353
? sessions[timeslot.sessions[sessionIndex].items[subSessionIndex - 1]].endTime
@@ -61,7 +61,7 @@ export const calculateEndTime = (
6161
day: any,
6262
timeslotsIndex: number,
6363
dayKey: string,
64-
subSessionIndex: number
64+
subSessionIndex: number,
6565
) => {
6666
const endTimeRaw = timeslot.sessions[sessionIndex].extend
6767
? day.timeslots[timeslotsIndex + timeslot.sessions[sessionIndex].extend - 1].endTime
@@ -77,7 +77,7 @@ const getEndTime = (
7777
startTime: string,
7878
endTime: string,
7979
totalNumber: number,
80-
number: number
80+
number: number,
8181
) => {
8282
const timezone = new Date().toString().match(/([A-Z]+[+-][0-9]+.*)/)[1];
8383
const timeStart = new Date(`${date} ${startTime} ${timezone}`).getTime();

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html itemscope itemtype="http://schema.org/Event" lang="en">
33
<head>
44
<base href="{{ basepath }}" />

public/service-worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ async function unregisterAndClearCaches() {
1919
}
2020

2121
unregisterAndClearCaches().catch((error) =>
22-
console.error(`Error unregistering service worker: ${error}`)
22+
console.error(`Error unregistering service worker: ${error}`),
2323
);

scripts/firestore-init/partners.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const importPartners = () => {
2525
.doc(`${partnerId}`)
2626
.collection('items')
2727
.doc(`${id}`.padStart(3, '0')),
28-
item
28+
item,
2929
);
3030
});
3131
} else {

scripts/firestore-init/team.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const importTeam = () => {
2020
team.members.forEach((member, id) => {
2121
batch.set(
2222
firestore.collection('team').doc(`${teamId}`).collection('members').doc(`${id}`),
23-
member
23+
member,
2424
);
2525
});
2626
} else {

src/components/about-block.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('about-block', () => {
2222

2323
it('renders details', async () => {
2424
const { shadowRootForWithin } = await fixture(
25-
html`<about-block data-testid="block"></about-block>`
25+
html`<about-block data-testid="block"></about-block>`,
2626
);
2727
const { getByText } = within(shadowRootForWithin);
2828

src/components/auth-required.test.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ describe('auth-required', () => {
1919
let shadowRoot!: ShadowRoot;
2020

2121
beforeAll(async () => {
22-
const render = await fixture<AuthRequired>(
23-
html`
24-
<auth-required>
25-
<p slot="prompt">Please sign in</p>
26-
<div>Welcome</div>
27-
</auth-required>
28-
`
29-
);
22+
const render = await fixture<AuthRequired>(html`
23+
<auth-required>
24+
<p slot="prompt">Please sign in</p>
25+
<div>Welcome</div>
26+
</auth-required>
27+
`);
3028

3129
element = render.element;
3230
shadowRoot = render.shadowRoot;

src/components/hero/hero-block.test.ts

+15-19
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ describe('hero-block', () => {
3131
});
3232

3333
it('accepts values', async () => {
34-
const { element, shadowRoot } = await fixture<HeroBlock>(
35-
html`
36-
<hero-block
37-
background-image="/example.jpg"
38-
background-color="#000"
39-
font-color="#fff"
40-
hide-logo
41-
></hero-block>
42-
`
43-
);
34+
const { element, shadowRoot } = await fixture<HeroBlock>(html`
35+
<hero-block
36+
background-image="/example.jpg"
37+
background-color="#000"
38+
font-color="#fff"
39+
hide-logo
40+
></hero-block>
41+
`);
4442
expect(element.backgroundImage).toBe('/example.jpg');
4543
expect(element.backgroundColor).toBe('#000');
4644
expect(element.fontColor).toBe('#fff');
@@ -50,14 +48,12 @@ describe('hero-block', () => {
5048
});
5149

5250
it('displays slot elements', async () => {
53-
const { shadowRoot } = await fixture<HeroBlock>(
54-
html`
55-
<hero-block>
56-
<p>default slot</p>
57-
<p slot="bottom">bottom slot</p>
58-
</hero-block>
59-
`
60-
);
51+
const { shadowRoot } = await fixture<HeroBlock>(html`
52+
<hero-block>
53+
<p>default slot</p>
54+
<p slot="bottom">bottom slot</p>
55+
</hero-block>
56+
`);
6157
const slots = shadowRoot.querySelectorAll('slot');
6258
expect(slots).toHaveLength(2);
6359
expect(screen.getByText('default slot')).toBeVisible();
@@ -70,7 +66,7 @@ describe('hero-block', () => {
7066

7167
it('renders an image', async () => {
7268
const { shadowRoot } = await fixture<HeroBlock>(
73-
html`<hero-block background-image="/example.jpg"></hero-block>`
69+
html`<hero-block background-image="/example.jpg"></hero-block>`,
7470
);
7571
expect(shadowRoot.querySelector('.hero-image')).toHaveAttribute('src', '/example.jpg');
7672
});

src/components/markdown/remote-markdown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class RemoteMarkDown extends ThemedElement {
2323
() => html``,
2424
() => html`Loading...`,
2525
() => html`Error loading content`,
26-
(data) => html`<toc-markdown content="${data}"></toc-markdown>`
26+
(data) => html`<toc-markdown content="${data}"></toc-markdown>`,
2727
);
2828
}
2929

src/components/markdown/toc-markdown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class TocMarkdown extends Markdown {
138138
<div class="container">
139139
<div class="content" layout justified horizontal wrap>
140140
${Object.keys(this.headerIds).map((headerId) =>
141-
this.renderHeader(headerId, this.headerIds[headerId]!)
141+
this.renderHeader(headerId, this.headerIds[headerId]!),
142142
)}
143143
</div>
144144
</div>

src/elements/content-loader.ts

+24-10
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,38 @@ export class ContentLoader extends PolymerElement {
9393
var(--title-skeleton), var(--desc-line-skeleton), var(--desc-line-skeleton),
9494
var(--avatar-skeleton), var(--footer-skeleton), var(--card-skeleton);
9595
96-
background-size: var(--blur-size), var(--title-width) var(--title-height),
96+
background-size:
97+
var(--blur-size),
98+
var(--title-width) var(--title-height),
9799
var(--desc-line-1-width) var(--desc-line-height),
98-
var(--desc-line-2-width) var(--desc-line-height), var(--avatar-size) var(--avatar-size),
99-
100% var(--footer-height), 100% 100%;
100-
101-
background-position: var(--load-from) 0, var(--title-position),
102-
var(--desc-line-1-position), var(--desc-line-2-position), var(--avatar-position),
103-
var(--footer-position), 0 0;
100+
var(--desc-line-2-width) var(--desc-line-height),
101+
var(--avatar-size) var(--avatar-size),
102+
100% var(--footer-height),
103+
100% 100%;
104+
105+
background-position:
106+
var(--load-from) 0,
107+
var(--title-position),
108+
var(--desc-line-1-position),
109+
var(--desc-line-2-position),
110+
var(--avatar-position),
111+
var(--footer-position),
112+
0 0;
104113
105114
background-repeat: no-repeat;
106115
animation: loading var(--animation-time) infinite;
107116
}
108117
109118
@keyframes loading {
110119
to {
111-
background-position: var(--load-to) 0, var(--title-position),
112-
var(--desc-line-1-position), var(--desc-line-2-position), var(--avatar-position),
113-
var(--footer-position), 0 0;
120+
background-position:
121+
var(--load-to) 0,
122+
var(--title-position),
123+
var(--desc-line-1-position),
124+
var(--desc-line-2-position),
125+
var(--avatar-position),
126+
var(--footer-position),
127+
0 0;
114128
}
115129
}
116130
</style>

src/elements/featured-videos.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ export class FeaturedVideos extends ReduxMixin(PolymerElement) {
289289
const cardRect = lastVideo.getBoundingClientRect();
290290
const cardWidth = cardRect.width;
291291
const videosContainerWidth = parseInt(
292-
getComputedStyle(this.videoList, null).getPropertyValue('width')
292+
getComputedStyle(this.videoList, null).getPropertyValue('width'),
293293
);
294294
const videosWidth = parseInt(getComputedStyle(this.videosElm, null).getPropertyValue('width'));
295295
const maxRightPosition = -(videosWidth - videosContainerWidth) - 16;
296296
const currentPosition = parseInt(
297-
getComputedStyle(this.videosElm, null).getPropertyValue('transform').split(',')[4] || ''
297+
getComputedStyle(this.videosElm, null).getPropertyValue('transform').split(',')[4] || '',
298298
);
299299

300300
return {

src/elements/feedback-block.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class FeedbackBlock extends ReduxMixin(PolymerElement) {
140140
contentRating: this.contentRating,
141141
styleRating: this.styleRating,
142142
comment: this.comment || '',
143-
})
143+
}),
144144
);
145145

146146
if (setFeedback.fulfilled.match(resultAction)) {
@@ -153,7 +153,7 @@ export class FeedbackBlock extends ReduxMixin(PolymerElement) {
153153
title: 'Retry',
154154
callback: () => this.setFeedback(),
155155
},
156-
})
156+
}),
157157
);
158158
}
159159
}
@@ -172,7 +172,7 @@ export class FeedbackBlock extends ReduxMixin(PolymerElement) {
172172
parentId: this.sessionId,
173173
userId: this.user.data.uid,
174174
id: this.user.data.uid,
175-
})
175+
}),
176176
);
177177

178178
if (deleteFeedback.fulfilled.match(resultAction)) {
@@ -185,7 +185,7 @@ export class FeedbackBlock extends ReduxMixin(PolymerElement) {
185185
title: 'Retry',
186186
callback: () => this.deleteFeedback(),
187187
},
188-
})
188+
}),
189189
);
190190
}
191191
}

0 commit comments

Comments
 (0)