-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 19.6 KB
/
.eslintcache
1
[{"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\index.js":"1","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\App.js":"2","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\reportWebVitals.js":"3","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\store.js":"4","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Navbar.js":"5","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Backdrop.js":"6","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\HomeScreen.js":"7","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\SideDrawer.js":"8","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\ProductScreen.js":"9","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\CartScreen.js":"10","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\Auth.js":"11","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\Auth.js":"12","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\cartReducers.js":"13","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\productReducers.js":"14","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Product.js":"15","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\CartItem.js":"16","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\#.js":"17","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\Login.js":"18","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\cartActions.js":"19","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\productActions.js":"20","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\AuthConstants.js":"21","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\cartConstants.js":"22","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\productConstants.js":"23","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\AuthActions.js":"24","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\api\\index.js":"25"},{"size":623,"mtime":1608532274000,"results":"26","hashOfConfig":"27"},{"size":1144,"mtime":1621458252758,"results":"28","hashOfConfig":"27"},{"size":362,"mtime":1608532274000,"results":"29","hashOfConfig":"27"},{"size":901,"mtime":1621008082946,"results":"30","hashOfConfig":"27"},{"size":2069,"mtime":1621970458874,"results":"31","hashOfConfig":"27"},{"size":162,"mtime":1608532274000,"results":"32","hashOfConfig":"27"},{"size":1170,"mtime":1608532274000,"results":"33","hashOfConfig":"27"},{"size":1347,"mtime":1621458057588,"results":"34","hashOfConfig":"27"},{"size":2386,"mtime":1621949303128,"results":"35","hashOfConfig":"27"},{"size":1824,"mtime":1608532274000,"results":"36","hashOfConfig":"27"},{"size":489,"mtime":1621008094867,"results":"37","hashOfConfig":"27"},{"size":464,"mtime":1621018946580,"results":"38","hashOfConfig":"27"},{"size":864,"mtime":1608532274000,"results":"39","hashOfConfig":"27"},{"size":1150,"mtime":1608532274000,"results":"40","hashOfConfig":"27"},{"size":592,"mtime":1608532274000,"results":"41","hashOfConfig":"27"},{"size":993,"mtime":1608532274000,"results":"42","hashOfConfig":"27"},{"size":3117,"mtime":1621128090772,"results":"43","hashOfConfig":"27"},{"size":3185,"mtime":1621127561904,"results":"44","hashOfConfig":"27"},{"size":746,"mtime":1608532274000,"results":"45","hashOfConfig":"27"},{"size":1243,"mtime":1608532274000,"results":"46","hashOfConfig":"27"},{"size":62,"mtime":1621006896331,"results":"47","hashOfConfig":"27"},{"size":134,"mtime":1608532274000,"results":"48","hashOfConfig":"27"},{"size":461,"mtime":1608532274000,"results":"49","hashOfConfig":"27"},{"size":703,"mtime":1621130501563,"results":"50","hashOfConfig":"27"},{"size":243,"mtime":1621124812402,"results":"51","hashOfConfig":"27"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},"dktj9k",{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"63","usedDeprecatedRules":"54"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"82","messages":"83","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"84","messages":"85","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"86","messages":"87","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"88","usedDeprecatedRules":"54"},{"filePath":"89","messages":"90","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"91","usedDeprecatedRules":"54"},{"filePath":"92","messages":"93","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"96","messages":"97","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"98","messages":"99","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"102","messages":"103","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"104","usedDeprecatedRules":"54"},{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"107"},"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\index.js",[],["108","109"],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\App.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\reportWebVitals.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\store.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Navbar.js",["110"],"import \"./Navbar.css\";\nimport { Link } from \"react-router-dom\";\nimport { useSelector } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\nimport { useHistory, useLocation } from \"react-router-dom\";\nimport { useDispatch } from \"react-redux\";\n\nconst Navbar = ({ click }) => {\n const history = useHistory();\n const dispatch = useDispatch();\n const location = useLocation();\n const cart = useSelector((state) => state.cart);\n const { cartItems } = cart;\n\n const getCartCount = () => {\n return cartItems.reduce((qty, item) => Number(item.qty) + qty, 0);\n };\n const [user, setUser] = useState(JSON.parse(localStorage.getItem(\"profile\")));\n const logOut = () => {\n dispatch({ type: \"LOGOUT\" });\n history.push(\"/\");\n setUser(null);\n localStorage.removeItem(\"profile\");\n };\n useEffect(() => {\n setUser(JSON.parse(localStorage.getItem(\"profile\")));\n }, [location]);\n return (\n <nav className=\"navbar\">\n <div className=\"navbar__logo\">\n <img\n style={{ width: \"300px\", height: \"50px\" }}\n src=\"images/logo2.png\"\n />\n </div>\n <div style={{ color: \"red\" }}>\n {\" \"}\n {user ? <h1>{user.email || user.result.email}</h1> : null}\n </div>\n <ul className=\"navbar__links\">\n {user && (\n <li>\n <Link to=\"/cart\" className=\"cart__link\">\n <i className=\"fas fa-shopping-cart\"></i>\n <span>\n Cart <span className=\"cartlogo__badge\">{getCartCount()}</span>\n </span>\n </Link>\n </li>\n )}\n {user ? (\n <li>\n <Link to=\"/\">\n <div onClick={logOut}>logout</div>\n </Link>\n </li>\n ) : (\n <li>\n <Link to=\"/auth\">login</Link>\n </li>\n )}\n\n <li>\n <Link to=\"/\">Shop</Link>\n </li>\n </ul>\n\n <div className=\"hamburger__menu\" onClick={click}>\n <div></div>\n <div></div>\n <div></div>\n </div>\n </nav>\n );\n};\n\nexport default Navbar;\n","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Backdrop.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\HomeScreen.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\SideDrawer.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\ProductScreen.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\CartScreen.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\Auth.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\Auth.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\cartReducers.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\reducers\\productReducers.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\Product.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\components\\CartItem.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\#.js",["111"],"import React, { useState } from \"react\";\r\nimport loginImg from \"./images/#.svg\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { # } from \"../../redux/actions/AuthActions\";\r\nimport { useHistory } from \"react-router-dom\";\r\nfunction #({ switchMode }) {\r\n const inisialState = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n email: \"\",\r\n password: \"\",\r\n confirmPassword: \"\",\r\n };\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const [formData, setFormData] = useState(inisialState);\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n dispatch(#(formData, history));\r\n };\r\n const handleChange = (e) => {\r\n setFormData({ ...formData, [e.target.name]: e.target.value });\r\n };\r\n\r\n return (\r\n <div style={{ width: \"100%\", height: \"100%\" }}>\r\n <div className=\"base-container\">\r\n <div className=\"header\">Register</div>\r\n <form onSubmit={handleSubmit}>\r\n <div className=\"content\">\r\n <div className=\"image\">\r\n <img src={loginImg} />\r\n </div>\r\n <div className=\"form\">\r\n <div className=\"form-group\">\r\n <label htmlFor=\"firstName\">firstName</label>\r\n <input\r\n type=\"text\"\r\n name=\"firstName\"\r\n placeholder=\"firsname\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"lastName\">LastName</label>\r\n <input\r\n type=\"text\"\r\n name=\"lastName\"\r\n placeholder=\"lastName\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"email\">Email</label>\r\n <input\r\n type=\"text\"\r\n name=\"email\"\r\n placeholder=\"email\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"password\">Password</label>\r\n <input\r\n type=\"password\"\r\n name=\"password\"\r\n placeholder=\"password\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"confirmPassword\">confirmPassword</label>\r\n <input\r\n type=\"password\"\r\n name=\"confirmPassword\"\r\n placeholder=\"confirmPassword\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"footer\">\r\n <button type=\"submit\" className=\"btn\">\r\n #\r\n </button>\r\n <button className=\"btn\" onClick={switchMode}>\r\n switch mode\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default #;\r\n","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\screens\\auth\\Login.js",["112","113"],"import React, { useState, useEffect } from \"react\";\r\nimport loginImg from \"./images/#.svg\";\r\nimport GoogleLogin from \"react-google-login\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { signin } from \"../../redux/actions/AuthActions\";\r\nfunction Login({ switchMode }) {\r\n const inisialState = {\r\n email: \"\",\r\n password: \"\",\r\n };\r\n const history = useHistory();\r\n const dispatch = useDispatch();\r\n\r\n const [formData, setFormData] = useState(inisialState);\r\n\r\n const handleSubmit = (e) => {\r\n e.preventDefault();\r\n dispatch(signin(formData, history));\r\n };\r\n const handleChange = (e) => {\r\n setFormData({ ...formData, [e.target.name]: e.target.value });\r\n };\r\n\r\n const googleSuccess = async (res) => {\r\n console.log(\"success\", res);\r\n const result = res?.profileObj;\r\n const token = res?.tokenId;\r\n try {\r\n dispatch({ type: \"AUTH\", data: { result, token } });\r\n history.push(\"/\");\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n };\r\n\r\n const googlefailure = (error) => {\r\n console.log(error);\r\n console.log(\"googler # was unsuccessfull , try Again\");\r\n };\r\n return (\r\n <div style={{ width: \"100%\", height: \"100%\" }}>\r\n <div className=\"base-container\">\r\n <div className=\"header\">Login</div>\r\n <form onSubmit={handleSubmit}>\r\n <div className=\"content\">\r\n <div className=\"image\">\r\n <img src={loginImg} />\r\n </div>\r\n <div className=\"form\">\r\n <div className=\"form-group\">\r\n <label htmlFor=\"email\">email</label>\r\n <input\r\n type=\"email\"\r\n name=\"email\"\r\n placeholder=\"email\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"password\">Password</label>\r\n <input\r\n type=\"password\"\r\n name=\"password\"\r\n placeholder=\"password\"\r\n onChange={handleChange}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"footer\">\r\n <button type=\"submit\" className=\"btn\">\r\n Login\r\n </button>\r\n <GoogleLogin\r\n clientId=\"568365196967-i1ecnnq7n7962i09j2he7doa55s4koc3.apps.googleusercontent.com\"\r\n render={(renderProps) => (\r\n <button className=\"btn\" onClick={renderProps.onClick}>\r\n # with googles\r\n </button>\r\n )}\r\n onSuccess={googleSuccess}\r\n onFailure={googlefailure}\r\n cookiePolicy=\"single_host_origin\"\r\n />\r\n </div>\r\n <div className=\"btn-login\">\r\n <button\r\n className=\"btn\"\r\n style={{ width: \"20rem\", marginTop: \"3px\" }}\r\n onClick={switchMode}\r\n >\r\n Switch Mode\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default Login;\r\n","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\cartActions.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\productActions.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\AuthConstants.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\cartConstants.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\constants\\productConstants.js",[],"D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\redux\\actions\\AuthActions.js",["114"],"import { AUTH } from \"../constants/AuthConstants\";\r\nimport * as api from \"../../api/index\";\r\nimport axios from \"axios\";\r\nexport const signin = (formData, history) => async (dispatch) => {\r\n try {\r\n const { data } = await axios.post(\"/users/signin\", formData);\r\n dispatch({ type: AUTH, data });\r\n history.push(\"/\");\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n};\r\nexport const # = (formData, history) => async (dispatch) => {\r\n try {\r\n console.log(\"im herer\");\r\n const { data } = await axios.post(\"/users/#\", formData);\r\n console.log(\"im herer\");\r\n dispatch({ type: AUTH, data });\r\n\r\n history.push(\"/\");\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n};\r\n","D:\\projects\\ALLMAHER_SHOP\\frontend\\src\\api\\index.js",[],["115","116"],{"ruleId":"117","replacedBy":"118"},{"ruleId":"119","replacedBy":"120"},{"ruleId":"121","severity":1,"message":"122","line":31,"column":9,"nodeType":"123","endLine":34,"endColumn":11},{"ruleId":"121","severity":1,"message":"122","line":33,"column":15,"nodeType":"123","endLine":33,"endColumn":37},{"ruleId":"124","severity":1,"message":"125","line":1,"column":27,"nodeType":"126","messageId":"127","endLine":1,"endColumn":36},{"ruleId":"121","severity":1,"message":"122","line":48,"column":15,"nodeType":"123","endLine":48,"endColumn":37},{"ruleId":"124","severity":1,"message":"128","line":2,"column":13,"nodeType":"126","messageId":"127","endLine":2,"endColumn":16},{"ruleId":"117","replacedBy":"129"},{"ruleId":"119","replacedBy":"130"},"no-native-reassign",["131"],"no-negated-in-lhs",["132"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'api' is defined but never used.",["131"],["132"],"no-global-assign","no-unsafe-negation"]