-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 4.77 KB
/
.eslintcache
1
[{"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\index.js":"1","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\App.js":"2","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Header.js":"3","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\InputForm.js":"4","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\OutputCurrency.js":"5","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Chart.js":"6","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\GlobalContext\\Context.js":"7","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Drop.js":"8"},{"size":209,"mtime":1662689745062,"results":"9","hashOfConfig":"10"},{"size":520,"mtime":1662689745039,"results":"11","hashOfConfig":"10"},{"size":181,"mtime":1662689745056,"results":"12","hashOfConfig":"10"},{"size":2735,"mtime":1662695818178,"results":"13","hashOfConfig":"10"},{"size":901,"mtime":1662689745061,"results":"14","hashOfConfig":"10"},{"size":3036,"mtime":1662695830000,"results":"15","hashOfConfig":"10"},{"size":507,"mtime":1662689745042,"results":"16","hashOfConfig":"10"},{"size":667,"mtime":1662695799353,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},"jy9cs9",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"27","messages":"28","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"29","usedDeprecatedRules":"20"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\index.js",[],["36","37"],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\App.js",[],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Header.js",[],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\InputForm.js",["38"],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\OutputCurrency.js",["39"],"import React, { useContext, useState, useEffect } from \"react\";\r\nimport { GlobalContext } from \"../GlobalContext/Context\";\r\n\r\nfunction OutputCurrency() {\r\n const { state } = useContext(GlobalContext);\r\n const [convertedAmt, setConvertedAmt] = useState(state.amount * state.rate);\r\n\r\n // this useEffect fires twice idk why... help\r\n // btw why does it even fire after the first time?\r\n useEffect(() => {\r\n if (state.flag) {\r\n setConvertedAmt((state.amount * state.rate).toFixed(2));\r\n }\r\n });\r\n\r\n return (\r\n <section id=\"output-container\">\r\n <OutUnit currency={state.currencyFrom} amount={state.amount} />\r\n <OutUnit currency={state.currencyTo} amount={convertedAmt} />\r\n </section>\r\n );\r\n}\r\n\r\nfunction OutUnit({ currency, amount }) {\r\n return (\r\n <div >\r\n <h4>{currency}</h4>\r\n <h2>{amount}</h2>\r\n </div>\r\n );\r\n}\r\n\r\nexport default OutputCurrency;\r\n","E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Chart.js",[],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\GlobalContext\\Context.js",[],"E:\\Study\\web\\_SELF_\\react\\currency-converter\\src\\components\\Drop.js",[],{"ruleId":"40","replacedBy":"41"},{"ruleId":"42","replacedBy":"43"},{"ruleId":"44","severity":1,"message":"45","line":10,"column":10,"nodeType":"46","messageId":"47","endLine":10,"endColumn":14},{"ruleId":"48","severity":1,"message":"49","line":10,"column":3,"nodeType":"46","endLine":10,"endColumn":12,"suggestions":"50"},"no-native-reassign",["51"],"no-negated-in-lhs",["52"],"no-unused-vars","'rate' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect contains a call to 'setConvertedAmt'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [state.flag, state.amount, state.rate] as a second argument to the useEffect Hook.",["53"],"no-global-assign","no-unsafe-negation",{"desc":"54","fix":"55"},"Add dependencies array: [state.flag, state.amount, state.rate]",{"range":"56","text":"57"},[506,506],", [state.flag, state.amount, state.rate]"]