-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 6.64 KB
/
.eslintcache
1
[{"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\index.js":"1","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\App.js":"2","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Accordion.js":"3","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Search.js":"4","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Dropdown.js":"5","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Translate.js":"6","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Convert.js":"7","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Route.js":"8","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Header.js":"9","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Link.js":"10"},{"size":199,"mtime":1607445770975,"results":"11","hashOfConfig":"12"},{"size":1507,"mtime":1607457662798,"results":"13","hashOfConfig":"12"},{"size":789,"mtime":1607378902378,"results":"14","hashOfConfig":"12"},{"size":1820,"mtime":1607439145342,"results":"15","hashOfConfig":"12"},{"size":1450,"mtime":1607446074139,"results":"16","hashOfConfig":"12"},{"size":1067,"mtime":1607447328442,"results":"17","hashOfConfig":"12"},{"size":1091,"mtime":1607448135360,"results":"18","hashOfConfig":"12"},{"size":573,"mtime":1607458790266,"results":"19","hashOfConfig":"12"},{"size":503,"mtime":1607458041793,"results":"20","hashOfConfig":"12"},{"size":483,"mtime":1607458866753,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},"cedxgd",{"filePath":"25","messages":"26","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"31","usedDeprecatedRules":"24"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"24"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\index.js",[],["44","45"],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\App.js",["46"],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Accordion.js",[],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Search.js",["47"],"import React, { useState, useEffect } from \"react\";\r\nimport axios from \"axios\";\r\n\r\nconst Search = () => {\r\n const [term, setTerm] = useState(\"programming\");\r\n const [results, setResults] = useState([]);\r\n\r\n useEffect(() => {\r\n const search = async () => {\r\n const { data } = await axios.get(\"https://en.wikipedia.org/w/api.php\", {\r\n params: {\r\n action: \"query\",\r\n list: \"search\",\r\n origin: \"*\",\r\n format: \"json\",\r\n srsearch: term,\r\n },\r\n });\r\n\r\n setResults(data.query.search);\r\n };\r\n\r\n if (term && !results.length) {\r\n search();\r\n } else {\r\n const timeoutId = setTimeout(() => {\r\n if (term) {\r\n search();\r\n }\r\n }, 500);\r\n\r\n return () => {\r\n clearTimeout(timeoutId);\r\n };\r\n }\r\n }, [term]);\r\n\r\n const renderedResults = results.map((result) => {\r\n return (\r\n <div key={result.pageid} className=\"item\">\r\n <div className=\"right floated content\">\r\n <a\r\n className=\"ui button\"\r\n href={`https://en.wikipedia.org?curid=${result.pageid}`}\r\n >\r\n Go\r\n </a>\r\n </div>\r\n <div className=\"content\">\r\n <div className=\"header\">{result.title}</div>\r\n <span dangerouslySetInnerHTML={{ __html: result.snippet }}></span>\r\n </div>\r\n </div>\r\n );\r\n });\r\n return (\r\n <div>\r\n <div className=\"ui form\">\r\n <div className=\"field\">\r\n <label>Enter Search Term</label>\r\n <input\r\n value={term}\r\n onChange={(e) => setTerm(e.target.value)}\r\n className=\"input\"\r\n />\r\n </div>\r\n <div className=\"ui celled list\">{renderedResults}</div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Search;\r\n","C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Dropdown.js",[],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Translate.js",[],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Convert.js",[],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Route.js",["48"],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Header.js",[],"C:\\Users\\vdelorieux\\Documents\\React\\react-widgets\\src\\components\\Link.js",[],{"ruleId":"49","replacedBy":"50"},{"ruleId":"51","replacedBy":"52"},{"ruleId":"53","severity":1,"message":"54","line":39,"column":1,"nodeType":"55","endLine":64,"endColumn":3},{"ruleId":"56","severity":1,"message":"57","line":36,"column":6,"nodeType":"58","endLine":36,"endColumn":12,"suggestions":"59"},{"ruleId":"60","severity":1,"message":"61","line":1,"column":8,"nodeType":"62","messageId":"63","endLine":1,"endColumn":13},"no-native-reassign",["64"],"no-negated-in-lhs",["65"],"import/no-anonymous-default-export","Assign arrow function to a variable before exporting as module default","ExportDefaultDeclaration","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'results.length'. Either include it or remove the dependency array.","ArrayExpression",["66"],"no-unused-vars","'React' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation",{"desc":"67","fix":"68"},"Update the dependencies array to be: [results.length, term]",{"range":"69","text":"70"},[828,834],"[results.length, term]"]