-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 12.3 KB
/
.eslintcache
1
[{"/home/divyash/Projects/Resturant/src/index.js":"1","/home/divyash/Projects/Resturant/src/App.js":"2","/home/divyash/Projects/Resturant/src/components/Layout/Header.js":"3","/home/divyash/Projects/Resturant/src/components/Layout/HeaderCartButton.js":"4","/home/divyash/Projects/Resturant/src/components/Meals/Meals.js":"5","/home/divyash/Projects/Resturant/src/components/Meals/MealsSummary.js":"6","/home/divyash/Projects/Resturant/src/components/Meals/AvailableMeals.js":"7","/home/divyash/Projects/Resturant/src/components/Cart/CartIcon.js":"8","/home/divyash/Projects/Resturant/src/components/UI/Card.js":"9","/home/divyash/Projects/Resturant/src/components/Meals/MealItem/MealItem.js":"10","/home/divyash/Projects/Resturant/src/components/Meals/MealItem/MealItemForm.js":"11","/home/divyash/Projects/Resturant/src/components/UI/Input.js":"12","/home/divyash/Projects/Resturant/src/components/Cart/Cart.js":"13","/home/divyash/Projects/Resturant/src/components/UI/Modal.js":"14","/home/divyash/Projects/Resturant/src/store/CartProvider.js":"15","/home/divyash/Projects/Resturant/src/store/cart-content.js":"16","/home/divyash/Projects/Resturant/src/components/Cart/CartItem.js":"17","/home/divyash/Projects/Resturant/src/components/Cart/Checkout.js":"18"},{"size":178,"mtime":1652858188958,"results":"19","hashOfConfig":"20"},{"size":690,"mtime":1652422093938,"results":"21","hashOfConfig":"20"},{"size":556,"mtime":1652384820559,"results":"22","hashOfConfig":"20"},{"size":1117,"mtime":1652435148658,"results":"23","hashOfConfig":"20"},{"size":301,"mtime":1652381357973,"results":"24","hashOfConfig":"20"},{"size":556,"mtime":1652372902596,"results":"25","hashOfConfig":"20"},{"size":1634,"mtime":1652860713417,"results":"26","hashOfConfig":"20"},{"size":488,"mtime":1652369727398,"results":"27","hashOfConfig":"20"},{"size":152,"mtime":1652380992218,"results":"28","hashOfConfig":"20"},{"size":823,"mtime":1652425945418,"results":"29","hashOfConfig":"20"},{"size":1141,"mtime":1652425441097,"results":"30","hashOfConfig":"20"},{"size":316,"mtime":1652423845563,"results":"31","hashOfConfig":"20"},{"size":2905,"mtime":1652887047645,"results":"32","hashOfConfig":"20"},{"size":779,"mtime":1652385519962,"results":"33","hashOfConfig":"20"},{"size":2438,"mtime":1652434307020,"results":"34","hashOfConfig":"20"},{"size":183,"mtime":1652425556258,"results":"35","hashOfConfig":"20"},{"size":612,"mtime":1616590017000,"results":"36","hashOfConfig":"20"},{"size":3276,"mtime":1652886316348,"results":"37","hashOfConfig":"20"},{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},"10sjr9",{"filePath":"41","messages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"43","messages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"45","messages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"47","usedDeprecatedRules":"40"},{"filePath":"48","messages":"49","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"50","messages":"51","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"52","messages":"53","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"54","messages":"55","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"56","messages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"58","messages":"59","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"60","messages":"61","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"62","messages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"64","messages":"65","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"66","messages":"67","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"68","messages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"70","messages":"71","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"72","messages":"73","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"40"},{"filePath":"74","messages":"75","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"76","usedDeprecatedRules":"40"},"/home/divyash/Projects/Resturant/src/index.js",[],["77","78"],"/home/divyash/Projects/Resturant/src/App.js",[],"/home/divyash/Projects/Resturant/src/components/Layout/Header.js",[],"/home/divyash/Projects/Resturant/src/components/Layout/HeaderCartButton.js",["79"],"import React, { useContext, useEffect, useState } from \"react\";\nimport styles from \"./HeaderCartButton.module.css\";\nimport CartIcon from \"../Cart/CartIcon\";\nimport CartContext from \"../../store/cart-content\";\nconst HeaderCartButton = (props) => {\n const ctx = useContext(CartContext);\n\n const [CartContextState, CartContextStateChange] = useState(false);\n const items = ctx.item;\n useEffect(() => {\n if (ctx.item.length === 0) {\n return;\n }\n CartContextStateChange(true);\n const timer = setTimeout(() => {\n CartContextStateChange(false);\n }, 300);\n return () => {\n clearTimeout(timer);\n };\n }, [items]);\n const noOfCartItems = items.reduce((curr, item) => {\n return curr + item.amount;\n }, 0);\n const btnClasses = `${styles.button} ${CartContextState ? styles.bump : \"\"}`;\n return (\n <button className={btnClasses} onClick={props.showCart}>\n <span className={styles.icon}>\n <CartIcon></CartIcon>\n </span>\n <span>Your Cart</span>\n <span className={styles.badge}>{noOfCartItems}</span>\n </button>\n );\n};\nexport default HeaderCartButton;\n","/home/divyash/Projects/Resturant/src/components/Meals/Meals.js",[],"/home/divyash/Projects/Resturant/src/components/Meals/MealsSummary.js",[],"/home/divyash/Projects/Resturant/src/components/Meals/AvailableMeals.js",[],"/home/divyash/Projects/Resturant/src/components/Cart/CartIcon.js",[],"/home/divyash/Projects/Resturant/src/components/UI/Card.js",[],"/home/divyash/Projects/Resturant/src/components/Meals/MealItem/MealItem.js",[],"/home/divyash/Projects/Resturant/src/components/Meals/MealItem/MealItemForm.js",[],"/home/divyash/Projects/Resturant/src/components/UI/Input.js",[],"/home/divyash/Projects/Resturant/src/components/Cart/Cart.js",["80","81"],"/home/divyash/Projects/Resturant/src/components/UI/Modal.js",[],"/home/divyash/Projects/Resturant/src/store/CartProvider.js",[],"/home/divyash/Projects/Resturant/src/store/cart-content.js",[],"/home/divyash/Projects/Resturant/src/components/Cart/CartItem.js",[],"/home/divyash/Projects/Resturant/src/components/Cart/Checkout.js",["82","83"],"import classes from \"./Checkout.module.css\";\nimport { useContext } from \"react\";\nimport { useRef, useState } from \"react\";\nimport CartContext from \"../../store/cart-content\";\nconst isEmpty = (value) => value.trim() === \"\";\nconst isNotFiveChars = (value) => value.trim().length !== 6;\nconst Checkout = (props) => {\n const cartCtx = useContext(CartContext);\n const [formInputValidity, setFormInputValidity] = useState({\n name: true,\n street: true,\n city: true,\n postalCode: true,\n });\n const nameInputRef = useRef();\n const streetInputRef = useRef();\n const postalCodeInputRef = useRef();\n const cityInputRef = useRef();\n\n const confirmHandler = (event) => {\n event.preventDefault();\n const enteredName = nameInputRef.current.value;\n const enteredStreet = streetInputRef.current.value;\n const enteredPostalCode = postalCodeInputRef.current.value;\n const enteredCity = cityInputRef.current.value;\n const enteredNameIsValid = !isEmpty(enteredName);\n const enteredStreetIsValid = !isEmpty(enteredStreet);\n const enteredPostalCodeIsValid = !isNotFiveChars(enteredPostalCode);\n const enteredCityIsValid = !isEmpty(enteredCity);\n setFormInputValidity({\n name: enteredNameIsValid,\n street: enteredStreetIsValid,\n city: enteredCityIsValid,\n postalCode: enteredPostalCodeIsValid,\n });\n const formIsValid =\n enteredCityIsValid &&\n enteredNameIsValid &&\n enteredStreetIsValid &&\n enteredPostalCodeIsValid;\n if (!formIsValid) {\n return;\n }\n if (formIsValid) {\n const userData = {\n name: enteredName,\n city: enteredCity,\n Street: enteredStreet,\n postalCode: enteredPostalCode,\n };\n props.onConfirm(userData);\n }\n };\n const style = (property) => {\n const classN = property\n ? classes.control\n : classes.control + \" \" + classes.invalid;\n return classN;\n };\n return (\n <form className={classes.form} onSubmit={confirmHandler}>\n <div className={style(formInputValidity.name)}>\n <label htmlFor=\"name\">Your Name</label>\n <input ref={nameInputRef} type=\"text\" id=\"name\" />\n {!formInputValidity.name && <p>Please enter a valid name</p>}\n </div>\n <div className={style(formInputValidity.street)}>\n <label htmlFor=\"street\">Street</label>\n <input ref={streetInputRef} type=\"text\" id=\"street\" />\n {!formInputValidity.street && <p>Please enter a valid street name</p>}\n </div>\n <div className={style(formInputValidity.postalCode)}>\n <label htmlFor=\"postal\">Postal Code</label>\n <input ref={postalCodeInputRef} type=\"text\" id=\"postal\" />\n {!formInputValidity.postalCode && (\n <p>Please enter a valid postal code</p>\n )}\n </div>\n <div className={style(formInputValidity.city)}>\n <label htmlFor=\"city\">City</label>\n <input ref={cityInputRef} type=\"text\" id=\"city\" />\n {!formInputValidity.city && <p>Please enter a valid city</p>}\n </div>\n <div className={classes.actions}>\n <button type=\"button\" onClick={props.onCancel}>\n Cancel\n </button>\n <button className={classes.submit}>Confirm</button>\n </div>\n </form>\n );\n};\n\nexport default Checkout;\n",{"ruleId":"84","replacedBy":"85"},{"ruleId":"86","replacedBy":"87"},{"ruleId":"88","severity":1,"message":"89","line":21,"column":6,"nodeType":"90","endLine":21,"endColumn":13,"suggestions":"91"},{"ruleId":"92","severity":1,"message":"93","line":10,"column":10,"nodeType":"94","messageId":"95","endLine":10,"endColumn":20},{"ruleId":"92","severity":1,"message":"96","line":10,"column":22,"nodeType":"94","messageId":"95","endLine":10,"endColumn":35},{"ruleId":"92","severity":1,"message":"97","line":15,"column":10,"nodeType":"94","messageId":"95","endLine":15,"endColumn":22},{"ruleId":"92","severity":1,"message":"98","line":16,"column":10,"nodeType":"94","messageId":"95","endLine":16,"endColumn":19},"no-native-reassign",["99"],"no-negated-in-lhs",["100"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'ctx.item.length'. Either include it or remove the dependency array.","ArrayExpression",["101"],"no-unused-vars","'isCheckout' is assigned a value but never used.","Identifier","unusedVar","'setIsCheckout' is assigned a value but never used.","'isSubmitting' is assigned a value but never used.","'didSubmit' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"102","fix":"103"},"Update the dependencies array to be: [ctx.item.length, items]",{"range":"104","text":"105"},[635,642],"[ctx.item.length, items]"]