-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 9.74 KB
/
.eslintcache
1
[{"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\index.js":"1","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\reportWebVitals.js":"2","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\serviceWorkerRegistration.js":"3","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\App.js":"4","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\context\\ThemeState.js":"5","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\Timer.js":"6","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\Sidebar.js":"7","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\ColorPicker.js":"8","C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\hooks\\useLongPress.js":"9"},{"size":986,"mtime":1609891589430,"results":"10","hashOfConfig":"11"},{"size":375,"mtime":1609875823581,"results":"12","hashOfConfig":"11"},{"size":5064,"mtime":1609888911769,"results":"13","hashOfConfig":"11"},{"size":4180,"mtime":1610083349166,"results":"14","hashOfConfig":"11"},{"size":804,"mtime":1610080052740,"results":"15","hashOfConfig":"11"},{"size":3691,"mtime":1610080158060,"results":"16","hashOfConfig":"11"},{"size":1827,"mtime":1610082978874,"results":"17","hashOfConfig":"11"},{"size":3902,"mtime":1610083804913,"results":"18","hashOfConfig":"11"},{"size":1673,"mtime":1609875823580,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"a5lt3i",{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":"32","usedDeprecatedRules":"33"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"33"},"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\index.js",[],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\reportWebVitals.js",[],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\serviceWorkerRegistration.js",[],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\App.js",["40"],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\context\\ThemeState.js",[],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\Timer.js",["41","42","43","44","45","46","47"],"import React, { useState, useEffect, useContext } from \"react\";\r\nimport styled from \"styled-components\";\r\nimport { useSpring, animated } from \"react-spring\";\r\nimport { CircularProgress } from \"@material-ui/core\";\r\nimport useSound from \"use-sound\";\r\nimport sound from \"../assets/piece-of-cake.mp3\";\r\nimport useLongPress from \"../hooks/useLongPress\";\r\nimport { ThemeContext } from \"../context/ThemeState\";\r\n\r\nconst Timer = ({ proptime }) => {\r\n const [time, settime] = useState(\r\n () => (proptime == null ? 25 : proptime) * 60\r\n );\r\n const [min, setmin] = useState();\r\n const [sec, setsec] = useState();\r\n\r\n const [isRunning, setisRunning] = useState(false);\r\n\r\n useEffect(() => {\r\n if (isRunning) {\r\n var timerID = setInterval(() => tick(), 1000);\r\n }\r\n return () => {\r\n clearInterval(timerID);\r\n };\r\n }, [time, isRunning, tick]);\r\n\r\n useEffect(() => {\r\n setmin(Math.floor(time / 60));\r\n setsec(time % 60);\r\n }, [min, sec, time, start, proptime]);\r\n\r\n useEffect(() => {\r\n reset();\r\n return () => { };\r\n }, [proptime]);\r\n\r\n useEffect(() => {\r\n if (time == 0) {\r\n play();\r\n }\r\n return () => { };\r\n }, [time]);\r\n\r\n function tick() {\r\n if (time > 0) {\r\n setmin(Math.floor(time / 60));\r\n setsec(time % 60);\r\n settime((currtime) => currtime - 1);\r\n }\r\n }\r\n\r\n function toggle() {\r\n if (time == 0) {\r\n reset();\r\n } else {\r\n setisRunning((curr) => !curr);\r\n }\r\n }\r\n\r\n function reset() {\r\n settime(proptime * 60);\r\n setmin(Math.floor(time / 60));\r\n setsec(time % 60);\r\n setisRunning(false);\r\n }\r\n\r\n function start() {\r\n setisRunning(true);\r\n }\r\n\r\n function stop() {\r\n setisRunning(false);\r\n }\r\n\r\n const { x } = useSpring({\r\n from: { x: 0 },\r\n x: isRunning ? 1 : 0,\r\n config: { duration: 1000 },\r\n });\r\n\r\n const [play] = useSound(sound);\r\n\r\n const defaultOptions = {\r\n shouldPreventDefault: true,\r\n delay: 500,\r\n };\r\n\r\n const longPressEvent = useLongPress(\r\n () => reset(),\r\n () => toggle(),\r\n defaultOptions\r\n );\r\n\r\n const { color } = useContext(ThemeContext);\r\n\r\n return (\r\n <>\r\n <animated.div\r\n style={{\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n opacity: x.interpolate({ range: [0, 1], output: [0.3, 1] }),\r\n transform: x\r\n .interpolate({\r\n range: [0, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 1],\r\n output: [1, 0.97, 0.9, 1.1, 0.9, 1.1, 1.03, 1],\r\n })\r\n .interpolate((x) => `scale(${x})`),\r\n }}\r\n >\r\n <div {...longPressEvent} style={{ cursor: \"pointer\" }}>\r\n <CircularProgress\r\n variant=\"determinate\"\r\n value={(time / (proptime * 60)) * 100}\r\n style={{\r\n color: color.secondary,\r\n height: \"250px\",\r\n width: \"250px\",\r\n padding: \"2.5em\",\r\n }}\r\n />\r\n </div>\r\n </animated.div>\r\n\r\n <Time value={color.secondary}>\r\n {min}:{sec < 10 ? \"0\" + sec : sec}\r\n </Time>\r\n </>\r\n );\r\n};\r\n\r\nexport default Timer;\r\n\r\nconst Time = styled.div`\r\n background: transparent;\r\n // border-radius: 3px;\r\n font-size: 7em;\r\n text-align: center;\r\n justify-content: center;\r\n align-items: center;\r\n // border: 2px solid #5493dd;\r\n color: ${(props) => props.value};\r\n\r\n -webkit-touch-callout: none; /* iOS Safari */\r\n -webkit-user-select: none; /* Safari */\r\n -khtml-user-select: none; /* Konqueror HTML */\r\n -moz-user-select: none; /* Old versions of Firefox */\r\n -ms-user-select: none; /* Internet Explorer/Edge */\r\n user-select: none;\r\n`;\r\n",["48","49"],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\Sidebar.js",[],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\components\\ColorPicker.js",["50"],"C:\\Users\\Chest\\Files\\Coding Library\\Github\\pomodoro\\src\\hooks\\useLongPress.js",[],{"ruleId":"51","severity":1,"message":"52","line":11,"column":18,"nodeType":"53","messageId":"54","endLine":11,"endColumn":26},{"ruleId":"55","severity":1,"message":"56","line":36,"column":6,"nodeType":"57","endLine":36,"endColumn":16,"suggestions":"58"},{"ruleId":"59","severity":1,"message":"60","line":39,"column":14,"nodeType":"61","messageId":"62","endLine":39,"endColumn":16},{"ruleId":"55","severity":1,"message":"63","line":43,"column":6,"nodeType":"57","endLine":43,"endColumn":12,"suggestions":"64"},{"ruleId":"55","severity":1,"message":"65","line":45,"column":3,"nodeType":"66","endLine":51,"endColumn":4},{"ruleId":"59","severity":1,"message":"60","line":54,"column":14,"nodeType":"61","messageId":"62","endLine":54,"endColumn":16},{"ruleId":"55","severity":1,"message":"67","line":68,"column":3,"nodeType":"66","endLine":70,"endColumn":4},{"ruleId":"51","severity":1,"message":"68","line":72,"column":12,"nodeType":"53","messageId":"54","endLine":72,"endColumn":16},{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"51","severity":1,"message":"73","line":6,"column":13,"nodeType":"53","messageId":"54","endLine":6,"endColumn":18},"no-unused-vars","'setColor' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'reset'. Either include it or remove the dependency array.","ArrayExpression",["74"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","React Hook useEffect has a missing dependency: 'play'. Either include it or remove the dependency array.",["75"],"The 'tick' function makes the dependencies of useEffect Hook (at line 26) change on every render. Move it inside the useEffect callback. Alternatively, wrap the definition of 'tick' in its own useCallback() Hook.","FunctionDeclaration","The 'start' function makes the dependencies of useEffect Hook (at line 31) change on every render. Move it inside the useEffect callback. Alternatively, wrap the definition of 'start' in its own useCallback() Hook.","'stop' is defined but never used.","no-native-reassign",["76"],"no-negated-in-lhs",["77"],"'color' is assigned a value but never used.",{"desc":"78","fix":"79"},{"desc":"80","fix":"81"},"no-global-assign","no-unsafe-negation","Update the dependencies array to be: [proptime, reset]",{"range":"82","text":"83"},"Update the dependencies array to be: [play, time]",{"range":"84","text":"85"},[1053,1063],"[proptime, reset]",[1162,1168],"[play, time]"]