-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 11.4 KB
/
.eslintcache
1
[{"/home/igorsefin/Documents/GitHub/react-meals/src/index.js":"1","/home/igorsefin/Documents/GitHub/react-meals/src/App.js":"2","/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/Cart.js":"3","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/Meals.js":"4","/home/igorsefin/Documents/GitHub/react-meals/src/components/Layout/Header.js":"5","/home/igorsefin/Documents/GitHub/react-meals/src/components/store/CartProvider.js":"6","/home/igorsefin/Documents/GitHub/react-meals/src/components/store/cart-context.js":"7","/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/CartItem.js":"8","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealsSummary.js":"9","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/AvailableMeals.js":"10","/home/igorsefin/Documents/GitHub/react-meals/src/components/Layout/HeaderCartButton.js":"11","/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Modal.js":"12","/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Card.js":"13","/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/CartIcon.js":"14","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealItem/MealItem.js":"15","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealItem/MealItemForm.js":"16","/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Input.js":"17","/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/Checkout.js":"18"},{"size":142,"mtime":1616594953000,"results":"19","hashOfConfig":"20"},{"size":673,"mtime":1624982334776,"results":"21","hashOfConfig":"20"},{"size":1516,"mtime":1626188669299,"results":"22","hashOfConfig":"20"},{"size":260,"mtime":1624629670324,"results":"23","hashOfConfig":"20"},{"size":558,"mtime":1624977778148,"results":"24","hashOfConfig":"20"},{"size":2504,"mtime":1625231233712,"results":"25","hashOfConfig":"20"},{"size":186,"mtime":1624979621552,"results":"26","hashOfConfig":"20"},{"size":611,"mtime":1626269658428,"results":"27","hashOfConfig":"20"},{"size":547,"mtime":1624629231568,"results":"28","hashOfConfig":"20"},{"size":1853,"mtime":1626185071304,"results":"29","hashOfConfig":"20"},{"size":1233,"mtime":1625232759124,"results":"30","hashOfConfig":"20"},{"size":712,"mtime":1624978269772,"results":"31","hashOfConfig":"20"},{"size":153,"mtime":1624630196792,"results":"32","hashOfConfig":"20"},{"size":511,"mtime":1624899401137,"results":"33","hashOfConfig":"20"},{"size":806,"mtime":1625060883864,"results":"34","hashOfConfig":"20"},{"size":1052,"mtime":1625060254744,"results":"35","hashOfConfig":"20"},{"size":323,"mtime":1625059959540,"results":"36","hashOfConfig":"20"},{"size":3114,"mtime":1626278427956,"results":"37","hashOfConfig":"20"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},"1lm0hj",{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"45","usedDeprecatedRules":"40"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"40"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"71","usedDeprecatedRules":"40"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/home/igorsefin/Documents/GitHub/react-meals/src/index.js",[],["78","79"],"/home/igorsefin/Documents/GitHub/react-meals/src/App.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/Cart.js",["80"],"import { useContext, useState } from 'react';\nimport CartContext from '../store/cart-context';\n\nimport Modal from '../UI/Modal';\nimport classes from './Cart.module.css'\nimport CartItem from './CartItem';\nimport CheckOut from './Checkout';\n\nconst Cart = props => {\n const [isCheckout, setIsCheckout] = useState(true);\n const cartCtx = useContext(CartContext);\n const totalAmount = `$${cartCtx.totalAmount.toFixed(2)}`;\n const hasItems = cartCtx.items.length > 0;\n const cartItemRemoveHandler = id => {\n cartCtx.removeItem(id);\n\n };\n const cartItemAddHandler = item => {\n cartCtx.addItem({...item, amount: 1});\n }\n const cartItems = <ul className={classes['cart-items']}>{cartCtx.items.map((item) => <CartItem \n key={item.id}\n name={item.amount} \n price={item.price} onRemove={cartItemRemoveHandler.bind(null, item.id)}\n onAdd={cartItemAddHandler.bind(null, item)}/>)}</ul>\n const modalActions = <div className={classes.actions}>\n <button className={classes['button--alt']} onClick={props.onCloseChart}>Close</button>\n {hasItems && <button className={classes.button}>Order</button>}\n</div>\nreturn (\n <Modal onClose ={props.onCloseChart}>\n <div>\n {cartItems}\n <div>\n <span>Total Amount</span>\n <span>{totalAmount}</span>\n </div>\n {isCheckout && <CheckOut onCancel={props.onCloseChart}/>}\n {!isCheckout && modalActions}\n </div>\n </Modal>\n )\n}\n\nexport default Cart;","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/Meals.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Layout/Header.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/store/CartProvider.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/store/cart-context.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/CartItem.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealsSummary.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/AvailableMeals.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Layout/HeaderCartButton.js",["81"],"import { useContext, useEffect, useState} from \"react\";\nimport CartIcon from \"../Cart/CartIcon\";\nimport CartContext from \"../store/cart-context\";\nimport classes from './HeaderCartButton.module.css'\n\nconst HeaderCartbutton = props => {\n const[btnIsHighlighted, setBtnIsHighLighted] = useState(false);\n const cartCtx = useContext(CartContext);\n\n const {items} = cartCtx;\n\n const numberOfCartItems = cartCtx.items.reduce((current, item)=> { \n return current + item.amount;\n }, 0);\n const btnClasses = `${classes.button} ${btnIsHighlighted ? classes.bump: ''}`;\n useEffect(() => {\n if (cartCtx.items.length === 0) {\n return;\n }\n setBtnIsHighLighted(true);\n\n const timer = setTimeout(() => {\n setBtnIsHighLighted(false)\n }, 300);\n return () => {\n clearTimeout(timer);\n }\n }, [items])\n\n return (<button className={btnClasses} onClick={props.onClick}>\n <span className={classes.icon}>\n <CartIcon/>\n </span>\n <span>\n Your Cart\n </span>\n <span className={classes.badge}>\n {numberOfCartItems}\n </span>\n </button>)\n}\n\nexport default HeaderCartbutton;","/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Modal.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Card.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/CartIcon.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealItem/MealItem.js",["82"],"import { useContext } from 'react'\n\nimport classes from './MealItem.module.css'\nimport MealItemForm from './MealItemForm'\nimport CartContext from '../../store/cart-context'\nconst MealItem = props => {\n const cartCtx = useContext(CartContext);\n const price = `$${props.price.toFixed(2)}`\n const addToChartHander = amount => {\n cartCtx.addItem({id: props.id, name: props.name, amount: amount, price: props.price});\n }\n return (<li className={classes.meal}>\n <div>\n <div><h3>{props.name}</h3></div>\n <div className={classes.description}>{props.descriptoin}</div>\n <div className={classes.price}>{props.price}</div>\n </div>\n <div>\n <MealItemForm onAddToChart = {addToChartHander}/>\n </div>\n </li>)\n}\n\nexport default MealItem;","/home/igorsefin/Documents/GitHub/react-meals/src/components/Meals/MealItem/MealItemForm.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/UI/Input.js",[],"/home/igorsefin/Documents/GitHub/react-meals/src/components/Cart/Checkout.js",["83"],{"ruleId":"84","replacedBy":"85"},{"ruleId":"86","replacedBy":"87"},{"ruleId":"88","severity":1,"message":"89","line":10,"column":24,"nodeType":"90","messageId":"91","endLine":10,"endColumn":37},{"ruleId":"92","severity":1,"message":"93","line":28,"column":8,"nodeType":"94","endLine":28,"endColumn":15,"suggestions":"95"},{"ruleId":"88","severity":1,"message":"96","line":8,"column":11,"nodeType":"90","messageId":"91","endLine":8,"endColumn":16},{"ruleId":"97","severity":1,"message":"98","line":16,"column":56,"nodeType":"99","messageId":"100","endLine":16,"endColumn":58},"no-native-reassign",["101"],"no-negated-in-lhs",["102"],"no-unused-vars","'setIsCheckout' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'cartCtx.items.length'. Either include it or remove the dependency array.","ArrayExpression",["103"],"'price' is assigned a value but never used.","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","no-global-assign","no-unsafe-negation",{"desc":"104","fix":"105"},"Update the dependencies array to be: [cartCtx.items.length, items]",{"range":"106","text":"107"},[882,889],"[cartCtx.items.length, items]"]