-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 11.8 KB
/
.eslintcache
1
[{"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\index.js":"1","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useState.js":"2","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\App.js":"3","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useInput.js":"4","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useTabs.js":"5","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useEffect.js":"6","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useTitle.js":"7","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useClick.js":"8","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useConfirm.js":"9","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\usePreventLeave.js":"10","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useBeforeLeave.js":"11","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useFadeIn.js":"12","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useNetwork.js":"13"},{"size":168,"mtime":1608304917522,"results":"14","hashOfConfig":"15"},{"size":1391,"mtime":1608307119886,"results":"16","hashOfConfig":"15"},{"size":911,"mtime":1612016073625,"results":"17","hashOfConfig":"15"},{"size":769,"mtime":1608307059750,"results":"18","hashOfConfig":"15"},{"size":1054,"mtime":1609159655998,"results":"19","hashOfConfig":"15"},{"size":524,"mtime":1608814779890,"results":"20","hashOfConfig":"15"},{"size":783,"mtime":1608814837318,"results":"21","hashOfConfig":"15"},{"size":868,"mtime":1608817341617,"results":"22","hashOfConfig":"15"},{"size":729,"mtime":1609162240890,"results":"23","hashOfConfig":"15"},{"size":915,"mtime":1609162614391,"results":"24","hashOfConfig":"15"},{"size":690,"mtime":1609163744931,"results":"25","hashOfConfig":"15"},{"size":793,"mtime":1612015331000,"results":"26","hashOfConfig":"15"},{"size":965,"mtime":1612016430721,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},"1cm6has",{"filePath":"31","messages":"32","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"30"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"46","usedDeprecatedRules":"30"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"51","usedDeprecatedRules":"30"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"54","usedDeprecatedRules":"30"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"57","usedDeprecatedRules":"30"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\index.js",[],["60","61"],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useState.js",["62"],"import React, { useState } from \"react\";\n\nfunction HookUseState({ initNumber }) {\n const [item, setItem] = useState(initNumber);\n // useState()는 array를 return해야함\n // 첫번째 원소는 상태 값 저장 변수, 두번째는 상태 값 갱신 함수\n const incrementItem = () => setItem(item + 1);\n const decrementItem = () => setItem(item - 1);\n return (\n <div className=\"App\">\n <h1>Hello useState!</h1>\n <h2>Start Now! Let's Go!</h2>\n <h3>count = {item}</h3>\n <button onClick={incrementItem}>Increment</button>\n <button onClick={decrementItem}>decrement</button>\n </div>\n );\n}\n\nclass UglyUseState extends React.Component {\n state = {\n item: 1,\n };\n render() {\n const { item } = this.state;\n return (\n <div className=\"App\">\n <h1>Hello Class Component! {item}</h1>\n <h2>Start Now! Let's Go!</h2>\n <button onClick={this.incrementItem}>Increment</button>\n <button onClick={this.decrementItem}>decrement</button>\n </div>\n );\n }\n // 클래스 컴포넌트는 상태 갱신 함수를 setState로 밖에 못만듦\n incrementItem = () => {\n this.setState((state) => {\n return {\n item: state.item + 1,\n };\n });\n };\n decrementItem = () => {\n this.setState((state) => {\n return {\n item: state.item - 1,\n };\n });\n };\n}\n\nexport default HookUseState;\n","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\App.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useInput.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useTabs.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useEffect.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useTitle.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useClick.js",["63","64"],"import React, { useEffect, useRef } from \"react\";\r\n\r\nconst useClick = (onClick) => {\r\n const element = useRef();\r\n useEffect(() => {\r\n if (element.current) {\r\n element.current.addEventListener(\"click\", onClick);\r\n }\r\n return () => {\r\n if (element.current) {\r\n element.current.removeEventListener(\"click\", onClick);\r\n }\r\n };\r\n }, []);\r\n if (typeof onClick !== \"function\") {\r\n return;\r\n }\r\n return element;\r\n};\r\n\r\nconst HookUseClick = () => {\r\n const sayHello = () => {\r\n const htmlSpan = document.querySelector(\".hello\");\r\n htmlSpan.innerText = \"Hello!\";\r\n };\r\n const buttonEvent = useClick(sayHello);\r\n return (\r\n <div className=\"App\">\r\n <h1>Hello useClick!</h1>\r\n <button ref={buttonEvent}>Click me!</button>\r\n <div className=\"hello\"></div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default HookUseClick;\r\n","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useConfirm.js",[],"C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\usePreventLeave.js",["65"],"const useConfirm = (message = \"\", onConfirm, onCancel) => {\r\n if (!onConfirm || typeof onConfirm !== \"function\") {\r\n return;\r\n }\r\n if (onCancel && typeof onCancel !== \"function\") {\r\n return;\r\n }\r\n};\r\n\r\nconst usePreventLeave = () => {\r\n const listener = (event) => {\r\n event.preventDefault();\r\n event.returnValue = \"\";\r\n };\r\n const enablePrevent = () => window.addEventListener(\"beforeunload\", listener);\r\n const disablePrevent = () =>\r\n window.addEventListener(\"beforeunload\", listener);\r\n return { enablePrevent, disablePrevent };\r\n};\r\n\r\nconst HookUsePreventLeave = () => {\r\n const { enablePrevent, disablePrevent } = usePreventLeave();\r\n return (\r\n <div className=\"App\">\r\n <h1>Hello usePreventLeave!</h1>\r\n <button onClick={enablePrevent}>Protect</button>\r\n <button onClick={disablePrevent}>Unrotect</button>\r\n </div>\r\n );\r\n};\r\nexport default HookUsePreventLeave;\r\n","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useBeforeLeave.js",["66"],"import { useEffect } from \"react\";\r\n\r\nconst useBeforeLeave = (onBefore) => {\r\n const handle = (event) => {\r\n const { clientY } = event;\r\n if (clientY <= 0) {\r\n onBefore();\r\n }\r\n };\r\n useEffect(() => {\r\n if (typeof onBefore !== \"function\") {\r\n return;\r\n }\r\n document.addEventListener(\"mouseleave\", handle);\r\n return () => document.removeEventListener(\"mouseleave\", handle);\r\n }, []);\r\n};\r\n\r\nconst HookUseBeforeLeave = () => {\r\n const begForLife = () => console.log(\"Please don't leave\");\r\n useBeforeLeave(begForLife);\r\n return (\r\n <div className=\"App\">\r\n <h1>Hello UseBeforeLeave!</h1>\r\n </div>\r\n );\r\n};\r\nexport default HookUseBeforeLeave;\r\n","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useFadeIn.js",["67"],"import React, { useEffect, useRef } from \"react\";\r\n\r\nconst useFadeIn = (duration = 1, delay = 0) => {\r\n // if (typeof duration !== \"number\" || typeof delay !== \"number\") {\r\n // return;\r\n // }\r\n const element = useRef();\r\n useEffect(() => {\r\n if (element.current) {\r\n const { current } = element;\r\n current.style.transition = `opacity ${duration}s ease-in-out ${delay}s`;\r\n current.style.opacity = 1;\r\n }\r\n }, []);\r\n return { ref: element, style: { opacity: 0 } };\r\n};\r\n\r\nconst HookUseFadeIn = () => {\r\n const fadeInH1 = useFadeIn(1, 2);\r\n const fadeInP = useFadeIn(5, 10);\r\n return (\r\n <div className=\"App\">\r\n <h1 {...fadeInH1}>Hello</h1>\r\n <p {...fadeInP}>lorem ipsum lalalalalal</p>\r\n </div>\r\n );\r\n};\r\n\r\nexport default HookUseFadeIn;\r\n","C:\\Users\\Donggeon\\Desktop\\hook_practice\\src\\useNetwork.js",["68"],{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","severity":1,"message":"74","line":20,"column":7,"nodeType":"75","messageId":"76","endLine":20,"endColumn":19},{"ruleId":"77","severity":1,"message":"78","line":11,"column":17,"nodeType":"75","endLine":11,"endColumn":24},{"ruleId":"77","severity":1,"message":"79","line":14,"column":6,"nodeType":"80","endLine":14,"endColumn":8,"suggestions":"81"},{"ruleId":"73","severity":1,"message":"82","line":1,"column":7,"nodeType":"75","messageId":"76","endLine":1,"endColumn":17},{"ruleId":"77","severity":1,"message":"83","line":16,"column":6,"nodeType":"80","endLine":16,"endColumn":8,"suggestions":"84"},{"ruleId":"77","severity":1,"message":"85","line":14,"column":6,"nodeType":"80","endLine":14,"endColumn":8,"suggestions":"86"},{"ruleId":"77","severity":1,"message":"87","line":18,"column":6,"nodeType":"80","endLine":18,"endColumn":8,"suggestions":"88"},"no-native-reassign",["89"],"no-negated-in-lhs",["90"],"no-unused-vars","'UglyUseState' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","The ref value 'element.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'element.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has a missing dependency: 'onClick'. Either include it or remove the dependency array.","ArrayExpression",["91"],"'useConfirm' is assigned a value but never used.","React Hook useEffect has missing dependencies: 'handle' and 'onBefore'. Either include them or remove the dependency array.",["92"],"React Hook useEffect has missing dependencies: 'delay' and 'duration'. Either include them or remove the dependency array.",["93"],"React Hook useEffect has a missing dependency: 'handleChange'. Either include it or remove the dependency array.",["94"],"no-global-assign","no-unsafe-negation",{"desc":"95","fix":"96"},{"desc":"97","fix":"98"},{"desc":"99","fix":"100"},{"desc":"101","fix":"102"},"Update the dependencies array to be: [onClick]",{"range":"103","text":"104"},"Update the dependencies array to be: [handle, onBefore]",{"range":"105","text":"106"},"Update the dependencies array to be: [delay, duration]",{"range":"107","text":"108"},"Update the dependencies array to be: [handleChange]",{"range":"109","text":"110"},[366,368],"[onClick]",[413,415],"[handle, onBefore]",[444,446],"[delay, duration]",[589,591],"[handleChange]"]