-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 13.9 KB
/
.eslintcache
1
[{"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\reportWebVitals.js":"1","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\App.js":"2","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Home.js":"3","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Header.js":"4","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Product.js":"5","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\StateProvider.js":"6","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\index.js":"7","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\reducer.js":"8","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\serviceWorker.js":"9","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\firebase.js":"10","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Login.js":"11","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Subtotal.js":"12","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Checkout.js":"13","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\CheckoutProduct.js":"14"},{"size":362,"mtime":499162500000,"results":"15","hashOfConfig":"16"},{"size":1218,"mtime":1606532106209,"results":"17","hashOfConfig":"16"},{"size":2588,"mtime":1606532103325,"results":"18","hashOfConfig":"16"},{"size":2018,"mtime":1606532087002,"results":"19","hashOfConfig":"16"},{"size":1053,"mtime":1606513415617,"results":"20","hashOfConfig":"16"},{"size":485,"mtime":1606506293341,"results":"21","hashOfConfig":"16"},{"size":719,"mtime":1606512501784,"results":"22","hashOfConfig":"16"},{"size":1117,"mtime":1606532081840,"results":"23","hashOfConfig":"16"},{"size":5000,"mtime":1606512316527,"results":"24","hashOfConfig":"16"},{"size":664,"mtime":1606532104776,"results":"25","hashOfConfig":"16"},{"size":2262,"mtime":1606532085215,"results":"26","hashOfConfig":"16"},{"size":1073,"mtime":1606532079258,"results":"27","hashOfConfig":"16"},{"size":1095,"mtime":1606532068513,"results":"28","hashOfConfig":"16"},{"size":1306,"mtime":1606532061612,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1wzs6qo",{"filePath":"32","messages":"33","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34","usedDeprecatedRules":"35"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"42","usedDeprecatedRules":"35"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"45"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"56","usedDeprecatedRules":"35"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"59"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"35"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\reportWebVitals.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\App.js",["65","66"],"import React , { useEffect } from \"react\";\nimport \"./App.css\";\nimport { BrowserRouter as Router, Route, Switch } from \"react-router-dom\";\nimport Home from \"./Home\";\nimport Header from \"./Header\";\nimport Login from \"./Login\";\nimport Checkout from \"./Checkout\";\nimport { auth } from \"./firebase\";\n\nimport { useStateValue } from \"./StateProvider\";\n\nfunction App() {\n const [{}, dispatch] = useStateValue () ;\n useEffect(() => {\n // will only run once when the app component loads...\n \n auth.onAuthStateChanged((authUser) => {\n console.log(\"THE USER IS >>> \", authUser);\n \n if (authUser) {\n // the user just logged in / the user was logged in\n \n dispatch({\n type: \"SET_USER\",\n user: authUser,\n });\n } else {\n // the user is logged out\n dispatch({\n type: \"SET_USER\",\n user: null,\n });\n }\n });\n }, []);\nreturn (\n <div className=\"app\">\n <Router>\n <Switch>\n <Route path=\"/login\">\n <Header />\n <Login />\n</Route>\n<Route path=\"/checkout\">\n<Header />\n<Checkout />\n</Route>\n\n <Route path=\"/\">\n <Header />\n <Home />\n</Route>\n </Switch>\n </Router>\n </div>\n);\n\n}\n\n\nexport default App;",["67","68"],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Home.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Header.js",["69","70"],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Product.js",["71"],"import React from \"react\";\r\nimport \"./Product.css\";\r\nimport { useStateValue } from \"./StateProvider\";\r\n\r\nfunction Product({ id, title, image, price, rating }) {\r\n const [{ basket }, dispatch] = useStateValue();\r\n\r\n const addToBasket = () => {\r\n // dispatch the item into the data layer\r\n dispatch({\r\n type: \"ADD_TO_BASKET\",\r\n item: {\r\n id: id,\r\n title: title,\r\n image: image,\r\n price: price,\r\n rating: rating,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n <div className=\"product\">\r\n <div className=\"product__info\">\r\n <p>{title}</p>\r\n <p className=\"product__price\">\r\n <small>$</small>\r\n <strong>{price}</strong>\r\n </p>\r\n <div className=\"product__rating\">\r\n {Array(rating)\r\n .fill()\r\n .map((_, i) => (\r\n <p>🌟</p>\r\n ))}\r\n </div>\r\n </div>\r\n\r\n <img src={image} alt=\"\" />\r\n\r\n <button onClick={addToBasket}>Add to Basket</button>\r\n </div>\r\n );\r\n}\r\n\r\nexport default Product;","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\StateProvider.js",[],["72","73"],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\index.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\reducer.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\serviceWorker.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\firebase.js",[],"C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Login.js",["74"],"import React, { useState } from 'react';\r\nimport './Login.css'\r\nimport { Link, useHistory } from \"react-router-dom\";\r\nimport { auth } from \"./firebase\";\r\n\r\nfunction Login() {\r\n const history = useHistory();\r\n const [email, setEmail] = useState('');\r\n const [password, setPassword] = useState('');\r\n\r\n const signIn = e => {\r\n e.preventDefault();\r\n\r\n auth\r\n .signInWithEmailAndPassword(email, password)\r\n .then(auth => {\r\n history.push('/')\r\n })\r\n .catch(error => alert(error.message))\r\n }\r\n\r\n const register = e => {\r\n e.preventDefault();\r\n\r\n auth\r\n .createUserWithEmailAndPassword(email, password)\r\n .then((auth) => {\r\n // it successfully created a new user with email and password\r\n if (auth) {\r\n history.push('/')\r\n }\r\n })\r\n .catch(error => alert(error.message))\r\n }\r\n\r\n return (\r\n <div className='login'>\r\n <Link to='/'>\r\n <img\r\n className=\"login__logo\"\r\n src='https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Amazon_logo.svg/1024px-Amazon_logo.svg.png' \r\n />\r\n </Link>\r\n\r\n <div className='login__container'>\r\n <h1>Sign-in</h1>\r\n\r\n <form>\r\n <h5>E-mail</h5>\r\n <input type='text' value={email} onChange={e => setEmail(e.target.value)} />\r\n\r\n <h5>Password</h5>\r\n <input type='password' value={password} onChange={e => setPassword(e.target.value)} />\r\n\r\n <button type='submit' onClick={signIn} className='login__signInButton'>Sign In</button>\r\n </form>\r\n\r\n <p>\r\n By signing-in you agree to the AMAZON FAKE CLONE Conditions of Use & Sale. Please\r\n see our Privacy Notice, our Cookies Notice and our Interest-Based Ads Notice.\r\n </p>\r\n\r\n <button onClick={register} className='login__registerButton'>Create your Amazon Account</button>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Login ;","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Subtotal.js",["75","76"],"import React from \"react\";\r\nimport \"./Subtotal.css\";\r\nimport CurrencyFormat from \"react-currency-format\";\r\nimport { useStateValue } from \"./StateProvider\";\r\nimport { getBasketTotal } from \"./reducer\";\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\nfunction Subtotal() {\r\n const history = useHistory();\r\n const [{ basket }, dispatch] = useStateValue();\r\n\r\n return (\r\n <div className=\"subtotal\">\r\n <CurrencyFormat\r\n renderText={(value) => (\r\n <>\r\n <p>\r\n {/* Part of the homework */}\r\n Subtotal ({basket.length} items): <strong>{value}</strong>\r\n </p>\r\n <small className=\"subtotal__gift\">\r\n <input type=\"checkbox\" /> This order contains a gift\r\n </small>\r\n </>\r\n )}\r\n decimalScale={2}\r\n value={getBasketTotal(basket)} // Part of the homework\r\n displayType={\"text\"}\r\n thousandSeparator={true}\r\n prefix={\"$\"}\r\n />\r\n\r\n <button>Proceed to Checkout</button>\r\n </div>\r\n );\r\n}\r\n\r\nexport default Subtotal;","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\Checkout.js",["77"],"import React from \"react\";\r\nimport \"./Checkout.css\";\r\nimport Subtotal from \"./Subtotal\";\r\nimport { useStateValue } from \"./StateProvider\";\r\nimport CheckoutProduct from \"./CheckoutProduct\";\r\n\r\nfunction Checkout() {\r\n const [{ basket, user }, dispatch] = useStateValue();\r\n\r\n return (\r\n <div className=\"checkout\">\r\n <div className=\"checkout__left\">\r\n <img\r\n className=\"checkout__ad\"\r\n src=\"https://images-na.ssl-images-amazon.com/images/G/02/UK_CCMP/TM/OCC_Amazon1._CB423492668_.jpg\"\r\n alt=\"\"\r\n />\r\n\r\n <div>\r\n <h3>Hello, {user?.email}</h3>\r\n <h2 className=\"checkout__title\">Your shopping Basket</h2>\r\n\r\n {basket.map(item => (\r\n <CheckoutProduct\r\n id={item.id}\r\n title={item.title}\r\n image={item.image}\r\n price={item.price}\r\n rating={item.rating}\r\n />\r\n ))}\r\n\r\n </div>\r\n </div>\r\n\r\n <div className=\"checkout__right\">\r\n <Subtotal />\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default Checkout;","C:\\Users\\sle\\Desktop\\amazon-clone\\src\\CheckoutProduct.js",["78","79"],{"ruleId":"80","severity":1,"message":"81","line":13,"column":10,"nodeType":"82","messageId":"83","endLine":13,"endColumn":12},{"ruleId":"84","severity":1,"message":"85","line":35,"column":6,"nodeType":"86","endLine":35,"endColumn":8,"suggestions":"87"},{"ruleId":"88","replacedBy":"89"},{"ruleId":"90","replacedBy":"91"},{"ruleId":"92","severity":1,"message":"93","line":10,"column":28,"nodeType":"94","messageId":"95","endLine":10,"endColumn":36},{"ruleId":"96","severity":1,"message":"97","line":21,"column":9,"nodeType":"98","endLine":24,"endColumn":11},{"ruleId":"92","severity":1,"message":"99","line":6,"column":12,"nodeType":"94","messageId":"95","endLine":6,"endColumn":18},{"ruleId":"88","replacedBy":"100"},{"ruleId":"90","replacedBy":"101"},{"ruleId":"96","severity":1,"message":"97","line":39,"column":17,"nodeType":"98","endLine":42,"endColumn":19},{"ruleId":"92","severity":1,"message":"102","line":9,"column":9,"nodeType":"94","messageId":"95","endLine":9,"endColumn":16},{"ruleId":"92","severity":1,"message":"93","line":10,"column":22,"nodeType":"94","messageId":"95","endLine":10,"endColumn":30},{"ruleId":"92","severity":1,"message":"93","line":8,"column":28,"nodeType":"94","messageId":"95","endLine":8,"endColumn":36},{"ruleId":"92","severity":1,"message":"99","line":6,"column":14,"nodeType":"94","messageId":"95","endLine":6,"endColumn":20},{"ruleId":"96","severity":1,"message":"97","line":18,"column":13,"nodeType":"98","endLine":18,"endColumn":67},"no-empty-pattern","Unexpected empty object pattern.","ObjectPattern","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.","ArrayExpression",["103"],"no-native-reassign",["104"],"no-negated-in-lhs",["105"],"no-unused-vars","'dispatch' is assigned a value but never used.","Identifier","unusedVar","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","'basket' is assigned a value but never used.",["104"],["105"],"'history' is assigned a value but never used.",{"desc":"106","fix":"107"},"no-global-assign","no-unsafe-negation","Update the dependencies array to be: [dispatch]",{"range":"108","text":"109"},[905,907],"[dispatch]"]