This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 19.2 KB
/
.eslintcache
1
[{"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\index.js":"1","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\App.js":"2","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\Home.js":"3","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\CreateEvent.js":"4","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\ReadEvent.js":"5","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\UpdateEvent.js":"6","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\data.js":"7","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\functions.js":"8","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\Firebase.js":"9","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\DateInfoCard.js":"10","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\reportWebVitals.js":"11","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\serviceWorkerRegistration.js":"12"},{"size":1298,"mtime":1610641608604,"results":"13","hashOfConfig":"14"},{"size":2899,"mtime":1610580585827,"results":"15","hashOfConfig":"14"},{"size":208,"mtime":1609169561722,"results":"16","hashOfConfig":"14"},{"size":8144,"mtime":1610550601096,"results":"17","hashOfConfig":"14"},{"size":4980,"mtime":1610551955723,"results":"18","hashOfConfig":"14"},{"size":7834,"mtime":1610554590019,"results":"19","hashOfConfig":"14"},{"size":589,"mtime":1609864094742,"results":"20","hashOfConfig":"14"},{"size":2326,"mtime":1610551919033,"results":"21","hashOfConfig":"14"},{"size":892,"mtime":1609859932516,"results":"22","hashOfConfig":"14"},{"size":1426,"mtime":1610641535624,"results":"23","hashOfConfig":"14"},{"size":364,"mtime":499162500000,"results":"24","hashOfConfig":"14"},{"size":5064,"mtime":1610577805890,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"85znrs",{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"37","usedDeprecatedRules":"30"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"30"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\index.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\App.js",[],["53","54"],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\Home.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\CreateEvent.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\ReadEvent.js",["55","56"],"import React, {useState, useEffect} from \"react\";\r\nimport { useParams, Link } from \"react-router-dom\";\r\nimport { typeValueToName } from \"../functions.js\";\r\nimport firebase from \"./Firebase.js\";\r\n\r\nconst ReadEvent = () => {\r\n\r\n const [event, setEvent] = useState({fetched: false, found: false})\r\n\r\n useEffect(() => { // TODO: Fix this, because it keeps giving a warning\r\n fetchEvent();\r\n }, []);\r\n\r\n const docRef = firebase.firestore().collection(\"Events\").doc(useParams().id);\r\n const fetchEvent = async() => {\r\n const response = docRef;\r\n await response.get().then((doc) => {\r\n if (doc.exists) {\r\n setEvent({\r\n id: doc.id,\r\n title: doc.data().title,\r\n allDay: doc.data().allDay,\r\n date: doc.data().date,\r\n start: doc.data().start,\r\n end: doc.data().end,\r\n type: doc.data().type,\r\n description: doc.data().description,\r\n fetched: true,\r\n found: true\r\n });\r\n } else {\r\n // doc.data() will be undefined in this case\r\n setEvent({\r\n fetched: true,\r\n found: false,\r\n errorMessage: \"Event does not exist\"\r\n })\r\n }\r\n }).catch((error) => {\r\n setEvent({\r\n fetched: true,\r\n found: false,\r\n errorMessage: `Error getting event data: ${error}`\r\n })\r\n });\r\n }\r\n\r\n const eventTimes = (startOrEnd) => {\r\n if (!event.allDay) {\r\n return(\r\n <li className=\"collection-item\"><div>{startOrEnd.charAt(0).toUpperCase() + startOrEnd.slice(1)}<span className=\"secondary-content\">{event[startOrEnd]}</span></div></li>\r\n );\r\n }\r\n }\r\n\r\n return (\r\n <div>\r\n {\r\n /* Contains a loading animation. Will be visible until the event is fetched, regardless if an existing one has been found or not. */\r\n }\r\n <div className={event.fetched ? \"hide\" : \"\"}>\r\n <div className=\"preloader-wrapper big active\">\r\n <div className=\"spinner-layer spinner-blue-only\">\r\n <div className=\"circle-clipper left\">\r\n <div className=\"circle\"></div>\r\n </div><div className=\"gap-patch\">\r\n <div className=\"circle\"></div>\r\n </div><div className=\"circle-clipper right\">\r\n <div className=\"circle\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n {\r\n /* Contains the readable event data. Will be hidden until the event is fetched and found (this means valid/non-empty). */\r\n }\r\n <div className={(event.fetched && event.found) ? \"\" : \"hide\"}>\r\n <ul className=\"collection with-header\">\r\n <li className=\"collection-header\"><h4>{event.title}</h4></li>\r\n <li className=\"collection-item\"><div>Date<span className=\"secondary-content\">{`${event.date} ${event.allDay ? \"All Day\" : \"\"}`}</span></div></li>\r\n {eventTimes(\"start\")}\r\n {eventTimes(\"end\")}\r\n <li className=\"collection-item\"><div>Type<span className=\"secondary-content\">\r\n {typeValueToName(event.type)}\r\n </span></div></li>\r\n <li className=\"collection-item\"><div>Description<span className=\"secondary-content\">{event.description}</span></div></li>\r\n </ul>\r\n <div>\r\n <Link to={`/updateEvent/${event.id}`} className=\"waves-effect waves-light btn\"><i className=\"material-icons left\">update</i>Update</Link>\r\n <a className=\"waves-effect waves-light btn\"><i className=\"material-icons left\">delete</i>Delete</a>\r\n </div>\r\n </div>\r\n {\r\n /* Contains a 404 page with error message. Will be hidden until the event is fetched but no valid one is found (this means non-valid/empty OR there's a db error). */\r\n }\r\n <div className={(event.fetched && !event.found) ? \"\" : \"hide\"}>\r\n <h4>404: Event not found</h4>\r\n <p>{event.errorMessage}</p>\r\n </div>\r\n {\r\n /* Contains a button to return to the previous page. Will always be shown. */\r\n }\r\n <div>\r\n <Link to=\"/\" className=\"waves-effect waves-light btn\"><i className=\"material-icons left\">arrow_back_ios</i>Back</Link>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default ReadEvent;\r\n\r\n//TODO: Make \"Go Back\" button actually go back, and not route to a predetermined path.","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\UpdateEvent.js",["57"],"import React, {useState, useEffect} from \"react\";\r\nimport M from \"materialize-css\";\r\nimport { useParams, Link } from \"react-router-dom\";\r\nimport { eventTypes } from \"../data.js\";\r\nimport { checkForm, typeValueToName } from \"../functions.js\";\r\nimport firebase from \"./Firebase.js\";\r\n\r\nconst UpdateEvent = () => {\r\n\r\n const [event, setEvent] = useState({\r\n id: \"\",\r\n title: \"\",\r\n allDay: false,\r\n date: \"\",\r\n start: \"\",\r\n end: \"\",\r\n type: \"\",\r\n description: \"\",\r\n fetched: false,\r\n found: false\r\n })\r\n\r\n useEffect(() => { // TODO: Fix this, because it keeps giving a warning\r\n fetchEvent();\r\n var selects = document.querySelectorAll('select');\r\n var options = document.querySelectorAll('option');\r\n M.FormSelect.init(selects, options); // Initializes the MaterilizeCSS object\r\n }, [])\r\n\r\n const docRef = firebase.firestore().collection(\"Events\").doc(useParams().id);\r\n const fetchEvent = async() => {\r\n const response = docRef;\r\n await response.get()\r\n .then((doc) => {\r\n if (doc.exists) {\r\n setEvent({\r\n id: doc.id,\r\n title: doc.data().title,\r\n allDay: doc.data().allDay,\r\n date: doc.data().date,\r\n start: doc.data().start,\r\n end: doc.data().end,\r\n type: doc.data().type,\r\n description: doc.data().description,\r\n fetched: true,\r\n found: true\r\n })\r\n } else {\r\n // doc.data() will be undefined in this case\r\n setEvent({\r\n fetched: true,\r\n found: false,\r\n errorMessage: \"Event does not exist\"\r\n })\r\n }\r\n }).catch((error) => {\r\n setEvent({\r\n fetched: true,\r\n found: false,\r\n errorMessage: `Error getting event data: ${error}`\r\n })\r\n });\r\n }\r\n\r\n //TODO: only activate button after 1 onchange has been triggered\r\n function updateEvent(e) {\r\n e.preventDefault();\r\n const checkResults = checkForm(event);\r\n if (checkResults.boolean === true) {\r\n firebase.firestore().collection(\"Events\").doc(event.id).set({\r\n title: event.title,\r\n allDay: event.allDay,\r\n date: event.date,\r\n start: event.allDay ? \"\" : event.start,\r\n end: event.allDay ? \"\" : event.end,\r\n type: event.type,\r\n description: event.description\r\n })\r\n .then(() => {\r\n setEvent({ ...event, status: \"Event updated succesfully\" });\r\n document.getElementById(\"back-button\").click()\r\n }, (reject) => { setEvent({ ...event, status: reject }); })\r\n } else {\r\n setEvent({ ...event, status: checkResults.message });\r\n }\r\n }\r\n\r\n const updateInput = (e) => {\r\n setEvent({\r\n ...event,\r\n [e.target.name]: e.target.value,\r\n status: \"\"\r\n });\r\n }\r\n\r\n const updateAllDay = (e) => {\r\n setEvent({\r\n ...event,\r\n [e.target.name]: e.target.checked,\r\n status: \"\"\r\n });\r\n }\r\n\r\n return (\r\n <div>\r\n <h2>Update Event</h2>\r\n <form onSubmit={updateEvent}>\r\n <div>\r\n <label>Title</label>\r\n <input name=\"title\" \r\n type=\"text\" \r\n placeholder=\"Event title...\"\r\n onChange={updateInput}\r\n value={event.title}\r\n />\r\n </div>\r\n <div className=\"switch\">\r\n <label>\r\n All Day?\r\n <input name=\"allDay\"\r\n type=\"checkbox\"\r\n onChange={updateAllDay}\r\n checked={event.allDay}\r\n />\r\n <span className=\"lever\"></span>\r\n </label>\r\n </div> \r\n <div>\r\n <label>Date</label>\r\n <input name=\"date\"\r\n type=\"date\"\r\n onChange={updateInput}\r\n value={event.date}\r\n />\r\n </div>\r\n <div>\r\n <label>Start time</label>\r\n <input name=\"start\"\r\n type=\"time\"\r\n onChange={updateInput}\r\n value={event.start}\r\n disabled={event.allDay ? true : false}\r\n />\r\n </div>\r\n <div>\r\n <label>End time</label>\r\n <input name=\"end\"\r\n type=\"time\"\r\n onChange={updateInput}\r\n value={event.end}\r\n disabled={event.allDay ? true : false}\r\n />\r\n </div>\r\n <div>\r\n <label>Type</label>\r\n <select name=\"type\"\r\n value={event.type}\r\n onChange={updateInput}\r\n >\r\n <option id={event.type}\r\n name={event.type}\r\n key={event.type}\r\n value={event.type}\r\n >\r\n {typeValueToName(event.type)}\r\n </option>\r\n {\r\n eventTypes.map((eventType) => {\r\n return (\r\n <option id={eventType.value}\r\n name={eventType.value}\r\n key={eventType.value}\r\n value={eventType.value}\r\n >\r\n {eventType.name}\r\n </option>\r\n );\r\n })\r\n }\r\n </select>\r\n </div>\r\n <div>\r\n <label>Description</label>\r\n <input name=\"description\"\r\n type=\"text\"\r\n placeholder=\"Description...\"\r\n onChange={updateInput}\r\n value={event.description}\r\n />\r\n </div> \r\n <button type=\"submit\">Save Changes</button>\r\n <p className=\"status-message\">{event.status}</p>\r\n </form>\r\n {\r\n /* Contains a button to return to the previous page. Will always be shown. */\r\n }\r\n <div>\r\n <Link id=\"back-button\" to={`/readEvent/${event.id}`} className=\"waves-effect waves-light btn\"><i className=\"material-icons left\">arrow_back_ios</i>Back</Link>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default UpdateEvent;\r\n\r\n//TODO: Make \"Go Back\" button actually go back, and not route to a predetermined path.","C:\\Smart Apps\\React\\gift-picker-app-react\\src\\data.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\functions.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\Firebase.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\components\\DateInfoCard.js",["58"],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\reportWebVitals.js",[],"C:\\Smart Apps\\React\\gift-picker-app-react\\src\\serviceWorkerRegistration.js",[],{"ruleId":"59","replacedBy":"60"},{"ruleId":"61","replacedBy":"62"},{"ruleId":"63","severity":1,"message":"64","line":12,"column":8,"nodeType":"65","endLine":12,"endColumn":10,"suggestions":"66"},{"ruleId":"67","severity":1,"message":"68","line":90,"column":21,"nodeType":"69","endLine":90,"endColumn":65},{"ruleId":"63","severity":1,"message":"64","line":28,"column":8,"nodeType":"65","endLine":28,"endColumn":10,"suggestions":"70"},{"ruleId":"63","severity":1,"message":"71","line":23,"column":8,"nodeType":"65","endLine":23,"endColumn":10,"suggestions":"72"},"no-native-reassign",["73"],"no-negated-in-lhs",["74"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'fetchEvent'. Either include it or remove the dependency array.","ArrayExpression",["75"],"jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","JSXOpeningElement",["76"],"React Hook useEffect has a missing dependency: 'fetchEvents'. Either include it or remove the dependency array.",["77"],"no-global-assign","no-unsafe-negation",{"desc":"78","fix":"79"},{"desc":"78","fix":"80"},{"desc":"81","fix":"82"},"Update the dependencies array to be: [fetchEvent]",{"range":"83","text":"84"},{"range":"85","text":"84"},"Update the dependencies array to be: [fetchEvents]",{"range":"86","text":"87"},[406,408],"[fetchEvent]",[889,891],[692,694],"[fetchEvents]"]