Skip to content

Commit 9f3a75c

Browse files
committed
Calendar: Make eslint happy
1 parent 10b0bb1 commit 9f3a75c

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

calendar/api/parent/ext-calendar-items.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ this.calendar_items = class extends ExtensionAPI {
3131
// TODO for some reason using promisifyCalendar directly causes an error
3232
// "proxy must report the same value for the non-writable, non-configurable property"
3333
// Patch Lightning to proxy an empty object instead. https://github.com/azu/proxy-frozen-object
34-
//let pcal = cal.async.promisifyCalendar(calendar.wrappedJSObject);
35-
//let [item] = await pcal.getItem(id);
34+
// let pcal = cal.async.promisifyCalendar(calendar.wrappedJSObject);
35+
// let [item] = await pcal.getItem(id);
3636
let deferred = PromiseUtils.defer();
3737
let listener = cal.async.promiseOperationListener(deferred);
3838
calendar.getItem(id, listener);

calendar/api/parent/ext-calendar-provider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ExtCalendarProvider extends cal.provider.BaseClass {
114114
async adoptItem(aItem, aListener) {
115115
try {
116116
let items = await this.extension.emit("calendar.provider.onItemCreated", this, aItem);
117-
let { item, metadata } = items.find(({ item }) => item) || {};
117+
let { item, metadata } = items.find(props => props.item) || {};
118118
if (!item) {
119119
throw new Components.Exception("Did not receive item from extension", Cr.NS_ERROR_FAILURE);
120120
}
@@ -152,7 +152,7 @@ class ExtCalendarProvider extends cal.provider.BaseClass {
152152
aNewItem,
153153
aOldItem
154154
);
155-
let { item, metadata } = items.find(({ item }) => item) || {};
155+
let { item, metadata } = items.find(props => props.item) || {};
156156
if (!item) {
157157
throw new Components.Exception("Did not receive item from extension", Cr.NS_ERROR_FAILURE);
158158
}

calendar/background.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,14 @@ lightning.provider.onSync.addListener(async (calendar) => {
6363
title: "New Event",
6464
startDate: icalDate(new Date()),
6565
endDate: icalDate(new Date()),
66-
metadata: {
67-
etag: 123
68-
}
66+
metadata: { etag: 123 }
6967
});
7068
} else if (ticks[calendar.id] == 1) {
7169
await lightning.items.update(calendar.cacheId, "findme", {
7270
title: "Updated",
7371
startDate: icalDate(new Date()),
7472
endDate: icalDate(new Date()),
75-
metadata: {
76-
etag: 234
77-
}
73+
metadata: { etag: 234 }
7874
});
7975
} else if (ticks[calendar.id] == 2) {
8076
await lightning.calendars.clear(calendar.cacheId);

0 commit comments

Comments
 (0)