-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintcache
1 lines (1 loc) · 15.8 KB
/
.eslintcache
1
[{"/home/roshan/Documents/not_imp/react/coderacer/src/index.js":"1","/home/roshan/Documents/not_imp/react/coderacer/src/reportWebVitals.js":"2","/home/roshan/Documents/not_imp/react/coderacer/src/App.js":"3","/home/roshan/Documents/not_imp/react/coderacer/src/pages/index.js":"4","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/index.jsx":"5","/home/roshan/Documents/not_imp/react/coderacer/src/pages/Dashboard/index.jsx":"6","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/MainTypingTester.jsx":"7","/home/roshan/Documents/not_imp/react/coderacer/src/pages/Dashboard/DashboardCard.jsx":"8","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/index.js":"9","/home/roshan/Documents/not_imp/react/coderacer/src/components/Card/index.jsx":"10","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/useCountDown.jsx":"11","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/usePressedKey.jsx":"12","/home/roshan/Documents/not_imp/react/coderacer/src/pages/Login/Login.jsx":"13"},{"size":500,"mtime":1618208712076,"results":"14","hashOfConfig":"15"},{"size":362,"mtime":1618208712076,"results":"16","hashOfConfig":"15"},{"size":513,"mtime":1618209078487,"results":"17","hashOfConfig":"15"},{"size":148,"mtime":1618209271261,"results":"18","hashOfConfig":"15"},{"size":833,"mtime":1618208712076,"results":"19","hashOfConfig":"15"},{"size":2684,"mtime":1618208712076,"results":"20","hashOfConfig":"15"},{"size":6143,"mtime":1618208712076,"results":"21","hashOfConfig":"15"},{"size":944,"mtime":1618208712076,"results":"22","hashOfConfig":"15"},{"size":118,"mtime":1618208712076,"results":"23","hashOfConfig":"15"},{"size":269,"mtime":1618208712076,"results":"24","hashOfConfig":"15"},{"size":734,"mtime":1618208712076,"results":"25","hashOfConfig":"15"},{"size":504,"mtime":1618208712076,"results":"26","hashOfConfig":"15"},{"size":1188,"mtime":1618208853101,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},"1whw0jr",{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"41","usedDeprecatedRules":"30"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"44","usedDeprecatedRules":"30"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"55"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/roshan/Documents/not_imp/react/coderacer/src/index.js",[],["58","59"],"/home/roshan/Documents/not_imp/react/coderacer/src/reportWebVitals.js",[],"/home/roshan/Documents/not_imp/react/coderacer/src/App.js",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/index.js",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/index.jsx",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/Dashboard/index.jsx",["60"],"import React from \"react\";\nimport Style from \"./dashboard.module.scss\";\nimport DashBoardCard from \"./DashboardCard\";\nimport {\n faArrowRight,\n faKeyboard,\n faUserFriends,\n faChartLine,\n faTachometerAlt,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst Dashboard = () => {\n const desc =\n \"Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis, quo utillo alias laudantium unde eos velit mollitia repudiandae sequi.\";\n return (\n <div className={Style.container}>\n <FontAwesomeIcon icon={faKeyboard} size=\"5x\" />\n <h1 className={Style.title}>TyPro: Typing master for programmers</h1>\n <p\n className={Style.subtitle}\n style={{ color: \"var(--subtitle-color)\", fontSize: \"18px\" }}\n >\n A unique way to improve typing skills along with programming skills.\n This is done by replacing general english paragraphs used in existing\n typing tutors with open source coding snippets\n </p>\n <DashBoardCard\n title={\n <span>\n <FontAwesomeIcon\n icon={faTachometerAlt}\n style={{ marginRight: 10 }}\n />\n Typing Test\n </span>\n }\n desc={`Work hard in silence! Type the provided open source code snippet as fast as you can to improve your typing speed and programming skills. The code snippet is provided in your favorite programming language.`}\n link=\"/typingtest\"\n linkTitle=\"Start typing test\"\n icon={faArrowRight}\n />\n <div style={{ display: \"flex\", flexWrap: \"wrap\" }}>\n <DashBoardCard\n title={\n <span>\n <FontAwesomeIcon\n icon={faUserFriends}\n style={{ marginRight: 10 }}\n />\n Challenge your friends\n </span>\n }\n desc={\n \"Be competitive! Create a room and share the link to your friends and then Battle it out with them and show your typing skills\"\n }\n link=\"/\"\n linkTitle=\"Create room\"\n icon={faArrowRight}\n />\n <DashBoardCard\n title={\n <span>\n <FontAwesomeIcon icon={faChartLine} style={{ marginRight: 10 }} />\n Check your progress\n </span>\n }\n desc={\n \"Monitor your progress over the period to check how you have improved your typing speed and compare your stats with others\"\n }\n link=\"/\"\n linkTitle=\"Checkout stats\"\n icon={faArrowRight}\n />\n </div>\n </div>\n );\n};\n\nexport default Dashboard;\n","/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/MainTypingTester.jsx",["61","62","63","64","65"],"import React, { useEffect, useRef, useState } from \"react\";\nimport Card from \"../../components/Card\";\nimport Style from \"./typingtest.module.scss\";\nimport { useCountDown, usePressedKey } from \"./Hooks\";\nimport { faKeyboard } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst MainTypingTester = () => {\n const testTime = 60;\n const typer = useRef(null);\n const [speed, setspeed] = useState(0);\n const [\n remainingTime,\n countDownStarted,\n startCountDown,\n resetCountDown,\n ] = useCountDown(testTime);\n const [typedIndex, setTypedIndex] = useState(0);\n const [correctIndex, setcorrectIndex] = useState(0);\n const [accuracy, setAccuracy] = useState(100);\n const [wrongTypes, setWrongTypes] = useState(0);\n const [pressedKey, _setPressedKey] = usePressedKey();\n\n const para =\n \"Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis\\\n voluptates ea odio molestiae officiis qui voluptate? Accusamus\\\n architecto voluptatem quia eveniet quis. Unde nisi et assumenda\\\n ducimus laboriosam exercitationem! Ex nihil mollitia ullam eveniet\\\n optio commodi praesentium dolor vel dolorum ipsa unde enim est ipsum\\\n dignissimos vero fugiat tenetur, corrupti earum. Quos fugiat aut\\\n expedita vitae velit porro magni sunt neque possimus ratione!\\\n Similique dolores consequatur necessitatibus explicabo. Molestiae,\\\n facere? Adipisci provident eos ipsa optio velit voluptates aliquid,\\\n molestiae officiis. Consequuntur temporibus excepturi veritatis dolor,\\\n vero enim accusantium illum repellendus nam. Ut ad, unde cupiditate\\\n fuga enim veritatis quis vero?\";\n // const para =\n // \"export function push(heap: Heap, node: Node): void {\\nconst index = heap.length;\\nheap.push(node);\\nsiftUp(heap, node, index);\\n}\";\n\n // const getFormattedContent = (data) => {\n // let totalIndex = 0;\n // return data.split(\"\\n\").map((v) => {\n // var item = (\n // <>\n // {totalIndex < correctIndex && (\n // <span style={{ color: \"rgb(0, 253, 177)\" }}>\n // {v.substr(0, Math.min(correctIndex, v.length))}\n // </span>\n // )}\n // {totalIndex < wrongTypes && (\n // <span style={{ color: \"rgb(255, 100, 25)\" }}>\n // {v.substr(correctIndex, typedIndex - correctIndex)}\n // </span>\n // )}\n // <span>{v.substr(typedIndex, para.length)}</span>\n // <br></br>\n // </>\n // );\n // totalIndex += v.length;\n // return item;\n // });\n // };\n\n useEffect(() => {\n if (countDownStarted) {\n console.log(remainingTime);\n if (pressedKey.length === 0) {\n return;\n }\n const ignoreKeys = [\n \"Shift\",\n \"Alt\",\n \"Tab\",\n \"Escape\",\n \"Control\",\n \"CapsLock\",\n \"\",\n ];\n if (ignoreKeys.find((v) => v === pressedKey)) {\n return;\n }\n switch (pressedKey) {\n case para[typedIndex]:\n setcorrectIndex(correctIndex + 1);\n setTypedIndex(typedIndex + 1);\n break;\n case \"Backspace\":\n if (typedIndex > 0) {\n setTypedIndex(typedIndex - 1);\n }\n if (correctIndex >= typedIndex) {\n setcorrectIndex(correctIndex - 1);\n }\n break;\n default:\n setTypedIndex(typedIndex + 1);\n setWrongTypes(wrongTypes + 1);\n break;\n }\n const elapsedTime = testTime - remainingTime || 1;\n const wpm = Math.floor((correctIndex / 5 / elapsedTime) * 60);\n setspeed(wpm);\n\n const acc = 100 - Math.floor((wrongTypes / typedIndex) * 100);\n setAccuracy(acc);\n }\n }, [pressedKey, countDownStarted]);\n return (\n <div>\n {remainingTime === 0 ? (\n <h1>Typing test Ended. Your Speed is {speed} wpm</h1>\n ) : (\n <div\n style={{\n justifyContent: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n }}\n >\n <div\n onClick={() => startCountDown(true)}\n className=\"main__button\"\n style={{ margin: \"0px auto 2rem\", cursor: \"pointer\" }}\n >\n <FontAwesomeIcon\n icon={faKeyboard}\n style={{ marginRight: \"10px\", fontSize: \"18px\" }}\n />\n Start Test\n </div>\n <Card>\n <p\n style={{ fontSize: 20, lineHeight: 1.7 }}\n onKeyDown={(e) => console.log(e)}\n >\n {/* {getFormattedContent(para)} */}\n <span style={{ color: \"rgb(0, 253, 177)\" }}>\n {/* {para\n .substr(0, correctIndex)\n .split(\"\\n\")\n .map((v) => (\n <span style={{ display: \"block\" }}>{v}</span>\n ))} */}\n {para.substr(0, correctIndex)}\n </span>\n {correctIndex <= typedIndex && (\n <span style={{ color: \"rgb(255, 100, 25)\" }}>\n {para.substr(correctIndex, typedIndex - correctIndex)}\n </span>\n )}\n <span>\n {/* {para\n .substr(typedIndex, para.length - typedIndex)\n .split(\"\\n\")\n .map((v) => (\n <>\n <span>{v}</span>\n <br />\n </>\n ))} */}\n {para.substr(typedIndex, para.length - typedIndex)}\n </span>\n </p>\n </Card>\n <Card\n style={{\n borderTop: \"2px solid var(--bg-color)\",\n display: \"flex\",\n justifyContext: \"space-around\",\n padding: 0,\n }}\n >\n <div className={Style.stats}>Speed: {speed} wpm</div>\n <div className={Style.stats}>Accuracy: {accuracy}%</div>\n <div className={Style.stats}>Time remaining: {remainingTime}s</div>\n </Card>\n </div>\n )}\n </div>\n );\n};\n\nexport default MainTypingTester;\n","/home/roshan/Documents/not_imp/react/coderacer/src/pages/Dashboard/DashboardCard.jsx",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/index.js",[],"/home/roshan/Documents/not_imp/react/coderacer/src/components/Card/index.jsx",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/useCountDown.jsx",[],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/TypingTest/Hooks/usePressedKey.jsx",[],["66","67"],"/home/roshan/Documents/not_imp/react/coderacer/src/pages/Login/Login.jsx",[],{"ruleId":"68","replacedBy":"69"},{"ruleId":"70","replacedBy":"71"},{"ruleId":"72","severity":1,"message":"73","line":14,"column":9,"nodeType":"74","messageId":"75","endLine":14,"endColumn":13},{"ruleId":"72","severity":1,"message":"76","line":10,"column":9,"nodeType":"74","messageId":"75","endLine":10,"endColumn":14},{"ruleId":"72","severity":1,"message":"77","line":16,"column":5,"nodeType":"74","messageId":"75","endLine":16,"endColumn":19},{"ruleId":"72","severity":1,"message":"78","line":22,"column":22,"nodeType":"74","messageId":"75","endLine":22,"endColumn":36},{"ruleId":"79","severity":1,"message":"80","line":25,"column":5,"nodeType":"81","messageId":"82","endLine":36,"endColumn":34},{"ruleId":"83","severity":1,"message":"84","line":107,"column":6,"nodeType":"85","endLine":107,"endColumn":36,"suggestions":"86"},{"ruleId":"68","replacedBy":"87"},{"ruleId":"70","replacedBy":"88"},"no-native-reassign",["89"],"no-negated-in-lhs",["90"],"no-unused-vars","'desc' is assigned a value but never used.","Identifier","unusedVar","'typer' is assigned a value but never used.","'resetCountDown' is assigned a value but never used.","'_setPressedKey' is assigned a value but never used.","no-multi-str","Multiline support is limited to browsers supporting ES5 only.","Literal","multilineString","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'correctIndex', 'remainingTime', 'typedIndex', and 'wrongTypes'. Either include them or remove the dependency array. You can also do a functional update 'setcorrectIndex(c => ...)' if you only need 'correctIndex' in the 'setcorrectIndex' call.","ArrayExpression",["91"],["89"],["90"],"no-global-assign","no-unsafe-negation",{"desc":"92","fix":"93"},"Update the dependencies array to be: [pressedKey, countDownStarted, remainingTime, correctIndex, wrongTypes, typedIndex]",{"range":"94","text":"95"},[3719,3749],"[pressedKey, countDownStarted, remainingTime, correctIndex, wrongTypes, typedIndex]"]