-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 12.5 KB
/
.eslintcache
1
[{"D:\\Javascript\\react-image-slider-carousel\\src\\index.js":"1","D:\\Javascript\\react-image-slider-carousel\\src\\App.js":"2","D:\\Javascript\\react-image-slider-carousel\\src\\reportWebVitals.js":"3","D:\\Javascript\\react-image-slider-carousel\\src\\components\\ImageSlider.js":"4","D:\\Javascript\\react-image-slider-carousel\\src\\components\\Login.js":"5","D:\\Javascript\\react-image-slider-carousel\\src\\redux store\\Store.js":"6","D:\\Javascript\\react-image-slider-carousel\\src\\redux store\\Action.js":"7","D:\\Javascript\\react-image-slider-carousel\\src\\components\\StarRatings.js":"8","D:\\Javascript\\react-image-slider-carousel\\src\\firebase\\index.js":"9"},{"size":244,"mtime":1629406878382,"results":"10","hashOfConfig":"11"},{"size":728,"mtime":1628988994012,"results":"12","hashOfConfig":"11"},{"size":375,"mtime":1628276931874,"results":"13","hashOfConfig":"11"},{"size":2135,"mtime":1629498947030,"results":"14","hashOfConfig":"11"},{"size":2101,"mtime":1630603542870,"results":"15","hashOfConfig":"11"},{"size":655,"mtime":1628467263796,"results":"16","hashOfConfig":"11"},{"size":470,"mtime":1628467234488,"results":"17","hashOfConfig":"11"},{"size":3331,"mtime":1630300982855,"results":"18","hashOfConfig":"11"},{"size":659,"mtime":1628701063276,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"1tdhaod",{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"27"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30","usedDeprecatedRules":"22"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"22"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"41","usedDeprecatedRules":"22"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},"D:\\Javascript\\react-image-slider-carousel\\src\\index.js",[],["45","46"],"D:\\Javascript\\react-image-slider-carousel\\src\\App.js",[],"D:\\Javascript\\react-image-slider-carousel\\src\\reportWebVitals.js",[],["47","48"],"D:\\Javascript\\react-image-slider-carousel\\src\\components\\ImageSlider.js",["49"],"import React, { useState,useEffect } from 'react';\r\nimport { FaArrowAltCircleRight, FaArrowAltCircleLeft } from 'react-icons/fa';\r\nimport { useHistory,useParams } from 'react-router-dom';\r\n\r\nimport { storage } from '../firebase';\r\n\r\nconst ImageSlider = () => {\r\n const [current, setCurrent] = useState(0);\r\n const history = useHistory();\r\n const params = useParams();\r\n const [url,seturl] = useState([]);\r\n\r\n\r\nuseEffect(() => {\r\n\r\n if(parseInt(params.id)<1||parseInt(params.id)>71){\r\n history.push(`/`)\r\n }\r\n\r\n async function asynccall(){\r\n //async function will request images from the storage buckets.\r\n var path = await storage.ref().child(`${params.id}`).listAll().then((res)=>{\r\n res.items.forEach((item)=>{\r\n item.getDownloadURL().then((url)=>{\r\n seturl(arr=>[...arr,url])\r\n })\r\n \r\n })\r\n }).catch(error=>console.log(error))\r\n return path;\r\n }\r\n asynccall();\r\n}, [])\r\n\r\nconst length = url.length;\r\n\r\nconst nextSlide = (e) => {\r\n // function will call next slide.\r\n e.preventDefault(); \r\n if(current<=length-2){\r\n setCurrent(current + 1); \r\n }else{\r\n history.push(`/Rating/${params.id}&${params.name}`);\r\n }\r\n };\r\n\r\n const prevSlide = (e) => {\r\n // function will call previous slide.\r\n e.preventDefault();\r\n setCurrent(current === 0 ? length - 1 : current - 1);\r\n };\r\n\r\n if (!Array.isArray(url) || url.length <= 0) {\r\n //if statement will check wether the array is empty.\r\n return null;\r\n }\r\n\r\n return (\r\n\r\n <section className='slider'>\r\n <FaArrowAltCircleLeft className='left-arrow' onClick={prevSlide} />\r\n {url.map((slide, index) => {\r\n return (\r\n <div\r\n className={index === current ? 'slide active' : 'slide'}\r\n key={index}\r\n >\r\n {index === current && (\r\n <img src={slide} alt={'Slides'} className='image' />\r\n )}\r\n </div>\r\n );\r\n })}\r\n <FaArrowAltCircleRight className='right-arrow' onClick={nextSlide} />\r\n\r\n\r\n </section>\r\n );\r\n};\r\n\r\nexport default ImageSlider;\r\n","D:\\Javascript\\react-image-slider-carousel\\src\\components\\Login.js",["50"],"import React, { useState } from 'react'\r\nimport { useHistory } from \"react-router-dom\";\r\nimport loginimage from '../assets/images/welcome_jury.jpg'\r\nexport default function Login() {\r\n const history = useHistory();\r\n const [name,setname] =useState('')\r\n const [id,setId] = useState(1)\r\n \r\n \r\n\r\n function type(val){\r\n setname(val.target.value)\r\n }\r\n\r\n function typenumber(val){\r\n setId(val.target.value)\r\n }\r\n\r\n function checkinput(){\r\n if(name===''){\r\n alert('Please Enter Your Name')\r\n }else{\r\n history.push(`/Images/${id}&${name}`)\r\n }\r\n\r\n }\r\n return (\r\n <div className=\"Login\">\r\n <div className=\"loginimage\">\r\n <img src={loginimage}></img>\r\n </div>\r\n <div className=\"Login-box\">\r\n <table>\r\n <tbody> \r\n <tr>\r\n <td>\r\n <label>Name</label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td> \r\n <input type=\"text\" name=\"Name\" placeholder=\"Enter Your Full Name...\" required autoFocus onChange={type} ></input>\r\n </td>\r\n \r\n \r\n <td>\r\n If\r\n </td>\r\n <td>\r\n <input type=\"number\" name=\"number\" placeholder=\"Number\" maxLength=\"4\" size=\"4\" onChange={typenumber}></input>\r\n </td>\r\n \r\n \r\n <td> \r\n <button onClick={checkinput}>Enter</button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n Note: Only add the number if you want to jump to a particular number\r\n </div>\r\n )\r\n}\r\n","D:\\Javascript\\react-image-slider-carousel\\src\\redux store\\Store.js",[],["51","52"],"D:\\Javascript\\react-image-slider-carousel\\src\\redux store\\Action.js",[],"D:\\Javascript\\react-image-slider-carousel\\src\\components\\StarRatings.js",["53"],"import React, { useEffect, useState } from 'react'\r\nimport { useHistory,useParams } from 'react-router-dom';\r\nimport {Rating} from 'react-simple-star-rating'\r\nimport { db,storage } from '../firebase';\r\nimport ReactPaginate from 'react-paginate';\r\n\r\n\r\n\r\nexport default function StarRatings() {\r\n const [rating, setRating] = useState(null);\r\n const history = useHistory();\r\n const params = useParams();\r\n const [comment,setComment] = useState('');\r\n const [prefixesLength,setprefixesLength] = useState(0);\r\n const [message,setMessage]= useState('');\r\n\r\n \r\n const handleRating = (rate) => {\r\n //Setting the rate\r\n setRating(rate)\r\n }\r\n\r\n async function Submit(){\r\n \r\n if(rating===null){\r\n //message if no rateing is found\r\n setMessage('Please select rating!')\r\n return \r\n }\r\n \r\n //If rating if found then will send to database\r\n var database = await db.collection(params.name).doc(params.id)\r\n database.set({id:params.id,rating:rating,\r\n comment:comment}).catch(error=>console.log(error))\r\n\r\n //if statement for sending the user to other website or next slide.\r\n if(prefixesLength-params.id===0){\r\n window.location.assign('https://www.supertecture.com');\r\n }else{\r\n return (history.push(`/Images/${parseInt(params.id, 10)+1}&${params.name}`));\r\n }\r\n\r\n }\r\n\r\n useEffect(()=>{\r\n\r\n if(parseInt(params.id)<1||parseInt(params.id)>71){\r\n history.push(`/`)\r\n }\r\n\r\n //Code to get the list of all the folder from the bucket.\r\n async function hello(){\r\n var path = await storage.ref().child('').listAll().then((res)=>{\r\n return setprefixesLength(res.prefixes.length);\r\n }).catch(error=>console.log(error))\r\n return path;\r\n }\r\n hello()\r\n },[])\r\n\r\n function type(val){\r\n //Code for inputing the value.\r\n setComment(val.target.value)\r\n }\r\n\r\n function handlePageClick(event){\r\n //if statement for sending the user to other website or next slide.\r\n console.log(event.selected+1)\r\n history.push(`/Images/${event.selected+1}&${params.name}`)\r\n\r\n } \r\n\r\n\r\n\r\n return (\r\n <div className=\"rating-container\">\r\n <ReactPaginate\r\n previousLabel={'<'}\r\n nextLabel={'>'}\r\n breakLabel={'...'}\r\n breakClassName={'break-me'}\r\n forcePage={parseInt(params.id, 10)-1}\r\n pageCount={prefixesLength}\r\n marginPagesDisplayed={2}\r\n pageRangeDisplayed={5}\r\n onPageChange={handlePageClick}\r\n containerClassName={'pagination'}\r\n activeClassName={'active'}\r\n />\r\n <div><h1>Rating Group {params.id}</h1></div>\r\n <textarea rows=\"10\" cols=\"35\" placeholder=\"Post your comment here...\" onChange={type}></textarea> \r\n <div>\r\n <Rating onClick={handleRating} ratingValue={rating} transition size={28} stars={10}>\r\n <svg fill=\"currentColor\" width={40} height={30} viewBox=\"0 0 24 24\">\r\n <path d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\" />\r\n </svg>\r\n </Rating> \r\n </div> \r\n <div style={{color:'red'}}>\r\n {message}\r\n </div>\r\n <button onClick={Submit}>Submit</button>\r\n </div>\r\n )\r\n}\r\n","D:\\Javascript\\react-image-slider-carousel\\src\\firebase\\index.js",[],["54","55"],{"ruleId":"56","replacedBy":"57"},{"ruleId":"58","replacedBy":"59"},{"ruleId":"56","replacedBy":"60"},{"ruleId":"58","replacedBy":"61"},{"ruleId":"62","severity":1,"message":"63","line":33,"column":4,"nodeType":"64","endLine":33,"endColumn":6,"suggestions":"65"},{"ruleId":"66","severity":1,"message":"67","line":30,"column":21,"nodeType":"68","endLine":30,"endColumn":43},{"ruleId":"56","replacedBy":"69"},{"ruleId":"58","replacedBy":"70"},{"ruleId":"62","severity":1,"message":"63","line":59,"column":5,"nodeType":"64","endLine":59,"endColumn":7,"suggestions":"71"},{"ruleId":"56","replacedBy":"72"},{"ruleId":"58","replacedBy":"73"},"no-native-reassign",["74"],"no-negated-in-lhs",["75"],["74"],["75"],"react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'history' and 'params.id'. Either include them or remove the dependency array.","ArrayExpression",["76"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement",["74"],["75"],["77"],["74"],["75"],"no-global-assign","no-unsafe-negation",{"desc":"78","fix":"79"},{"desc":"78","fix":"80"},"Update the dependencies array to be: [history, params.id]",{"range":"81","text":"82"},{"range":"83","text":"82"},[959,961],"[history, params.id]",[1752,1754]]