From f497f1259ff0f0a40ce6cfdf2ddde4e8c3ab2a7b Mon Sep 17 00:00:00 2001 From: HannesOberreiter Date: Mon, 29 May 2023 16:06:47 +0200 Subject: [PATCH] style: :fire: remove unused variables --- analysis.js | 1 - index.js | 2 +- site/billiger.js | 5 ++--- site/changes.js | 1 - stuff.js | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/analysis.js b/analysis.js index 72f8261..fc7b465 100644 --- a/analysis.js +++ b/analysis.js @@ -1,5 +1,4 @@ const fs = require("fs"); -const axios = require("axios"); const stores = require("./stores"); const STORE_KEYS = Object.keys(stores); diff --git a/index.js b/index.js index 4f99e9f..626a152 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ const analysis = require("./analysis"); if (fs.existsSync(`${dataDir}/latest-canonical.json`)) { fs.copyFileSync(`${dataDir}/latest-canonical.json`, `site/latest-canonical.json`); - analysis.updateData(dataDir, (newItems) => { + analysis.updateData(dataDir, (_newItems) => { fs.copyFileSync(`${dataDir}/latest-canonical.json`, `site/latest-canonical.json`); }); } else { diff --git a/site/billiger.js b/site/billiger.js index 88f10c1..042fd76 100644 --- a/site/billiger.js +++ b/site/billiger.js @@ -2,7 +2,6 @@ let changeDates = []; let items = []; async function load() { - const today = currentDate(); items = await loadItems(); items.sort((a, b) => { if (a.store < b.store) { @@ -29,9 +28,9 @@ async function load() { showResults(items, currentDate()); } -function showResults(items, today) { +function showResults(items, _today) { const storeCheckboxes = STORE_KEYS.map(store => document.querySelector(`#${store}`)); - const checkedStores = STORE_KEYS.filter((store, i) => storeCheckboxes[i].checked) + const checkedStores = STORE_KEYS.filter((_store, i) => storeCheckboxes[i].checked) let changedItems = []; for (item of items) { if (item.priceHistory.length < 2) continue; diff --git a/site/changes.js b/site/changes.js index b708ae2..7f7d8b7 100644 --- a/site/changes.js +++ b/site/changes.js @@ -2,7 +2,6 @@ let changeDates = []; let items = []; async function load() { - const today = currentDate(); items = await loadItems(); items.sort((a, b) => { if (a.store < b.store) { diff --git a/stuff.js b/stuff.js index 69d8345..6b26d93 100644 --- a/stuff.js +++ b/stuff.js @@ -1,5 +1,4 @@ const fs = require("fs"); -const analysis = require("./analysis"); const stores = require("./stores"); const STORE_KEYS = Object.keys(stores);