From 30819758c88977a096f59a64858137b7db56f428 Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Tue, 17 Oct 2023 23:52:31 -0400 Subject: [PATCH] bump action fix lint --- .eslintrc.json | 3 ++- .github/workflows/static.yml | 2 +- assets/js/main.js | 29 ++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index cc7e9e6..fe39eff 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -93,7 +93,7 @@ ], "new-parens": "off", "newline-per-chained-call": "off", - "no-alert": "error", + "no-alert": "off", "no-array-constructor": "error", "no-await-in-loop": "error", "no-bitwise": "off", @@ -190,6 +190,7 @@ "no-useless-constructor": "error", "no-useless-rename": "error", "no-useless-return": "error", + "no-unused-vars": "off", "no-var": "off", "no-void": "off", "no-warning-comments": "error", diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index f568f4e..be35258 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v3 - name: Build diff --git a/assets/js/main.js b/assets/js/main.js index 082a715..14085ab 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,16 +1,15 @@ function fetchMeetings(query, callback) { - const script = document.createElement('script'); - script.src = query + '&callback=' + callback.name; + const script = document.createElement("script"); + script.src = query + "&callback=" + callback.name; document.body.appendChild(script); } function handleMeetingsData(meetings) { - const csvContent = 'data:text/csv;charset=utf-8,' + encodeURIComponent( - convertToCSV(meetings) - ); - const downloadLink = document.getElementById('downloadLink'); + const csvContent = + "data:text/csv;charset=utf-8," + encodeURIComponent(convertToCSV(meetings)); + const downloadLink = document.getElementById("downloadLink"); downloadLink.href = csvContent; - downloadLink.style.display = 'block'; + downloadLink.style.display = "block"; } function convertToCSV(data) { @@ -18,30 +17,30 @@ function convertToCSV(data) { const keys = Object.keys(data[0]); // header row - csvRows.push(keys.join(',')); + csvRows.push(keys.join(",")); data.forEach((row) => { const values = keys.map((key) => { let value = row[key]; - if (typeof value === 'string') { + if (typeof value === "string") { // Escape double quotes and wrap in double quotes if it contains a comma - if (value.includes(',') || value.includes('"')) { + if (value.includes(",") || value.includes('"')) { value = `"${value.replace(/"/g, '""')}"`; } } return value; }); - csvRows.push(values.join(',')); + csvRows.push(values.join(",")); }); - return csvRows.join('\n'); + return csvRows.join("\n"); } function exportToCSV() { - const query = document.getElementById('query').value; - if (!query.includes('/client_interface/jsonp')) { - alert('Invalid BMLT query URL, must use jsonp endpoint.'); + const query = document.getElementById("query").value; + if (!query.includes("/client_interface/jsonp")) { + alert("Invalid BMLT query URL, must use jsonp endpoint."); return; }