From eeb3f377807b030f8c41d5a10ec347444c84244f Mon Sep 17 00:00:00 2001 From: calebco Date: Tue, 17 Oct 2023 21:12:14 -0500 Subject: [PATCH] lint fixes & 2024 block removed --- client/src/App.js | 1 + client/src/features/form/FormScheduleEvent.js | 2 -- client/src/index.js | 1 + cypress/e2e/admin-dashboard.cy.js | 2 +- cypress/support/commands.js | 3 +-- server/models/Event.js | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client/src/App.js b/client/src/App.js index 6fabda93..b2a4048c 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -6,6 +6,7 @@ import { useAuthContext } from "contexts/AuthContext"; import LandingPage from "pages/LandingPage"; import CalendarPage from "pages/CalendarPage"; import { AdminDashboard } from "pages/AdminDashboard"; +// eslint-disable-next-line import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; function App() { diff --git a/client/src/features/form/FormScheduleEvent.js b/client/src/features/form/FormScheduleEvent.js index 9e421562..730aa925 100644 --- a/client/src/features/form/FormScheduleEvent.js +++ b/client/src/features/form/FormScheduleEvent.js @@ -80,7 +80,6 @@ export default function FormScheduleEvent() { className="p-1 px-2 appearance-none outline-non w-full text-gray-800" required min={format(new Date(), "yyyy-MM-dd")} - max="2023-12-31" /> @@ -116,7 +115,6 @@ export default function FormScheduleEvent() { className="p-1 px-2 appearance-none outline-non w-full text-gray-800" required min={format(new Date(), "yyyy-MM-dd")} - max="2023-12-31" /> diff --git a/client/src/index.js b/client/src/index.js index 97032794..22856d68 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -7,6 +7,7 @@ import ModalProvider from "contexts/ModalContext"; import EventsProvider from "contexts/EventsContext"; import FormModalProvider from "contexts/FormModalContext"; import { createRoot } from "react-dom/client"; +//eslint-disable-next-line import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; const rootElement = document.getElementById("root"); diff --git a/cypress/e2e/admin-dashboard.cy.js b/cypress/e2e/admin-dashboard.cy.js index d8b8539b..904a2b60 100644 --- a/cypress/e2e/admin-dashboard.cy.js +++ b/cypress/e2e/admin-dashboard.cy.js @@ -119,7 +119,7 @@ describe("Admin Dashboard", () => { }); it("Group event titles and descriptions", () => { - GROUP_TEST_EVENTS.forEach((test_event, i) => { + GROUP_TEST_EVENTS.forEach(test_event => { // Ensure test events rendered with correct title and description cy.get("#events") .find(`.group-event`) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index da6f3c3f..6fd2c776 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -49,7 +49,6 @@ Cypress.Commands.add("deleteOwnEvent", id => { } }); -Cypress.Commands.add("getAllEvents", userCode => { - // cy.login(userCode) +Cypress.Commands.add("getAllEvents", () => { return cy.request("GET", "/events"); }); diff --git a/server/models/Event.js b/server/models/Event.js index 7b9c403c..9a2826b4 100644 --- a/server/models/Event.js +++ b/server/models/Event.js @@ -6,7 +6,7 @@ const { Temporal } = require("@js-temporal/polyfill"); const STRING_MAX_LENGTH = 280; // Event's starting date should be less than (strictly) EVENT_MAX_DATE -const EVENT_MAX_DATE = "2024-01-01"; +const EVENT_MAX_DATE = "2030-01-01"; // Recurring events should span no more than MAX_RECURRENCE_PERIOD number of days const MAX_RECURRENCE_PERIOD = 90; const DAYS_OF_WEEK = ["1", "2", "3", "4", "5", "6", "7"];