Skip to content

Commit 46df773

Browse files
Use default setting for object-curly-spacing ESLint rule
1 parent af48a9a commit 46df773

9 files changed

Lines changed: 19 additions & 20 deletions

CALEXT2_Event.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Event {
2626
}
2727

2828
draw (slot, targetDom) {
29-
const { hideOverflow } = slot;
29+
const {hideOverflow} = slot;
3030
const eventDom = this.dom;
3131
eventDom.style.opacity = 0;
3232
targetDom.appendChild(eventDom);
@@ -58,7 +58,7 @@ class Event {
5858
*/
5959

6060
makeEventDom () {
61-
const { locale } = this;
61+
const {locale} = this;
6262
const now = moment().locale(locale);
6363

6464
const isEventMultiSlots = (event, mESX, mEEX, mSSX, mSEX) => {
@@ -153,7 +153,7 @@ class Event {
153153
}
154154

155155
createEventTime () {
156-
const { locale } = this;
156+
const {locale} = this;
157157
const event = this.data;
158158
const makeEventTime = (innerHTML, classNameString) => {
159159
const div = document.createElement("div");

CALEXT2_Slot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Slot {
6666

6767
assignEvents (events) {
6868
for (let i = 0; i < events.length; i++) {
69-
const event = { ...events[i] };
69+
const event = {...events[i]};
7070
const eS = moment.unix(event.startDate).locale(this.locale);
7171
const eE = moment.unix(event.endDate).locale(this.locale);
7272
if (eE.isSameOrBefore(this.start) || eS.isSameOrAfter(this.end)) {

CALEXT2_View.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class View {
5252
transformEvents (events) {
5353
if (typeof this.config.transform === "function") {
5454
return events.map((e) => {
55-
const event = { ...e };
55+
const event = {...e};
5656
return this.config.transform(event);
5757
});
5858
}
@@ -86,7 +86,7 @@ class View {
8686
}
8787

8888
filterEvents (events) {
89-
const { calendars } = this;
89+
const {calendars} = this;
9090
const calendarFilter =
9191
Array.isArray(calendars) && calendars.length > 0
9292
? (e) => calendars.indexOf(e.calendarName) >= 0
@@ -123,7 +123,7 @@ class View {
123123

124124
drawDom () {
125125
const container = View.getRegionDom(this.config.position);
126-
const { children } = container;
126+
const {children} = container;
127127
const order = this.config.positionOrder;
128128
if (order === -1) {
129129
container.appendChild(this.moduleDom);
@@ -200,7 +200,7 @@ class View {
200200
makeModuleTitle () {
201201
if (!this.config.title) return;
202202
const headerTitle = this.moduleDom.getElementsByClassName("module-header");
203-
const slotStart = { ...this.slots[0].start };
203+
const slotStart = {...this.slots[0].start};
204204
let title;
205205
if (typeof this.config.title === "function") {
206206
title = this.config.title(moment(slotStart));
@@ -306,7 +306,7 @@ class View {
306306
}
307307

308308
getStartDay () {
309-
const { fromNow } = this.config;
309+
const {fromNow} = this.config;
310310
const now = moment().locale(this.locale);
311311
return now.add(fromNow, this.slotUnit).startOf("day");
312312
}

CALEXT2_ViewCell.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ViewCell extends View {
1818
}
1919

2020
getSlotPeriods () {
21-
const { showWeekends } = this.config;
21+
const {showWeekends} = this.config;
2222
const getSlotPeriod = (tDay, seq) => {
2323
const mtd = moment(tDay).locale(this.locale).add(seq, "week");
2424
const start = showWeekends
@@ -43,7 +43,7 @@ class ViewCell extends View {
4343
}
4444

4545
getSubSlotPeriods (start) {
46-
const { showWeekends } = this.config;
46+
const {showWeekends} = this.config;
4747
const days = showWeekends ? 7 : 5;
4848
const periods = [];
4949
const t = start;

CALEXT2_ViewMonth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ class ViewMonth extends ViewCell {
99
}
1010

1111
getStartDay () {
12-
const { fromNow } = this.config;
12+
const {fromNow} = this.config;
1313
const now = moment().locale(this.locale);
1414
return now.add(fromNow, "month").startOf("month").startOf("week");
1515
}
1616

1717
getEndWeek () {
18-
const { fromNow } = this.config;
18+
const {fromNow} = this.config;
1919
const now = moment().locale(this.locale);
2020
return now.add(fromNow, "month").endOf("month").startOf("week");
2121
}
2222

2323
makeSlots () {
2424
super.makeSlots();
2525
if (this.config.monthFormat) {
26-
const { fromNow } = this.config;
26+
const {fromNow} = this.config;
2727
const now = moment().locale(this.locale);
2828
now.add(fromNow, "month").startOf("month");
2929
const mt = document.createElement("div");

CALEXT2_WeekSlot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class WeekSlot extends Slot {
8888
};
8989

9090
const dayPeriods = this.getDayPeriods();
91-
const { timelineDom } = this;
91+
const {timelineDom} = this;
9292
const timelines = [];
9393
let tlDom;
9494
for (let j = 0; j < this.events.length; j++) {

MMM-CalendarExt2.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Module.register("MMM-CalendarExt2", {
338338
if (!arrs[i].locale && type === "view")
339339
arrs[i].locale = this.config.locale;
340340
if (arrs[i].filter && type === "calendar") {
341-
arrs[i].filter = JSON.stringify({ filter: arrs[i].filter.toString() });
341+
arrs[i].filter = JSON.stringify({filter: arrs[i].filter.toString()});
342342
}
343343
if (typeof arrs[i].scanInterval === "string") {
344344
arrs[i].scanInterval = eval(arrs[i].scanInterval);
@@ -443,7 +443,7 @@ Module.register("MMM-CalendarExt2", {
443443
},
444444

445445
sceneNext () {
446-
const { nextUid } = this.currentScene;
446+
const {nextUid} = this.currentScene;
447447
this.work(nextUid);
448448
return true;
449449
},
@@ -473,7 +473,7 @@ Module.register("MMM-CalendarExt2", {
473473
},
474474

475475
eventQuery (payload) {
476-
let events = this.events.map((e) => ({ ...e }));
476+
let events = this.events.map((e) => ({...e}));
477477
if (typeof payload.filter === "function") {
478478
events = events.filter(payload.filter);
479479
}

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const config = [
3737
"@stylistic/newline-per-chained-call": "off",
3838
"@stylistic/no-extra-parens": "off",
3939
"@stylistic/nonblock-statement-body-position": "off",
40-
"@stylistic/object-curly-spacing": ["error", "always"],
4140
"@stylistic/padded-blocks": "off",
4241
"@stylistic/quote-props": ["error", "consistent"],
4342
"camelcase": "off",

node_helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = NodeHelper.create({
8383
}
8484
}
8585

86-
let { url } = calendar;
86+
let {url} = calendar;
8787
url = url.replace("webcal://", "http://");
8888
try {
8989
response = await fetch(url, opts);

0 commit comments

Comments
 (0)