From a002ebf9f1c294701424d7d89bbf88d746715250 Mon Sep 17 00:00:00 2001 From: noxil Date: Wed, 28 Aug 2024 04:13:35 +0200 Subject: [PATCH] fix(linting): reformat md files and fix linting in js --- .github/linters/.eslintrc.yml | 1 + README.md | 3 ++- archetypes/event.md | 2 +- assets/js/calendar.js | 19 +++++++++---------- assets/js/event.js | 8 ++++---- content/events/freifunktreffen.de.md | 1 - 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 525caf9..edfb1f0 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -2,5 +2,6 @@ ignorePatterns: ["layouts/page/single.json", "package.json", "package-lock.json", "assets/js/bootstrap.js"] parserOptions: ecmaVersion: latest + sourceType: module env: es6: true diff --git a/README.md b/README.md index e1c9fad..cd08a23 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ To display up to date information, we fetch and generate some data during the bu ## Events The events for the calendar are stored in simple markdown files. To create a new event, use the following commands: -``` + +```bash hugo new content --kind event events/.de.md hugo new content --kind event events/.en.md ``` diff --git a/archetypes/event.md b/archetypes/event.md index 48815c4..eb37322 100644 --- a/archetypes/event.md +++ b/archetypes/event.md @@ -10,4 +10,4 @@ end: "{{ dateFormat "2006-01-02T15:04:05" .Date }}" location: "Berlin" --- -Description of the event ... \ No newline at end of file +Description of the event ... diff --git a/assets/js/calendar.js b/assets/js/calendar.js index 9247306..63fbf46 100644 --- a/assets/js/calendar.js +++ b/assets/js/calendar.js @@ -4,15 +4,14 @@ import iCalendarPlugin from '@fullcalendar/icalendar' document.addEventListener('DOMContentLoaded', function () { const calendarEl = document.getElementById('calendar') - var calendar = new Calendar(calendarEl, { + const calendar = new Calendar(calendarEl, { plugins: [dayGridPlugin, iCalendarPlugin], - eventSources: [ - { - url: "index.ics", - format: 'ics' - }, - ] - }) -calendar.render() -}) \ No newline at end of file + { + url: 'index.ics', + format: 'ics' + } + ] + }) + calendar.render() +}) diff --git a/assets/js/event.js b/assets/js/event.js index 91754c7..7ab13e2 100644 --- a/assets/js/event.js +++ b/assets/js/event.js @@ -1,5 +1,5 @@ -import { datetime, RRule, RRuleSet, rrulestr } from 'rrule' +import rrulestr from 'rrule' -const rrule_element = document.querySelector("#rrule"); -const rrule_object = rrulestr(rrule_element.dataset.rrule) -rrule_element.innerHTML = rrule_object.toText() +const rruleElement = document.querySelector('#rrule') +const rruleObject = rrulestr(rruleElement.dataset.rrule) +rruleElement.innerHTML = rruleObject.toText() diff --git a/content/events/freifunktreffen.de.md b/content/events/freifunktreffen.de.md index 5ae3433..ae86f58 100644 --- a/content/events/freifunktreffen.de.md +++ b/content/events/freifunktreffen.de.md @@ -12,4 +12,3 @@ location: "Rungestraße 20, 10179 Berlin" Hier kannst du viele andere Freifunkende treffen und Kontakte schließen. Wir nutzen dieses Treffen, um Community-Themen zu besprechen und bei einem leckeren Getränk eine schöne Zeit zu haben. Die [c-base](https://www.openstreetmap.org/?mlat=52.51297&mlon=13.42011#map=17/52.51297/13.42011) ist an der Spree, ganz in der Nähe vom Bahnhof Jannowitzbrücke. Du möchtest ein Thema vorschlagen, dass wir als Community besprechen sollten? Schicke deinen Themenvorschlag über die Mailingliste. Komm gerne einfach vorbei, wir freuen uns immer über neue Menschen. -