-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 7.52 KB
/
.eslintcache
1
[{"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\index.js":"1","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\App.js":"2","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\bubbleSort.js":"3","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\insertionSort.js":"4","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\heapSort.js":"5","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\mergeSort.js":"6","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\components\\NavBar\\NavBar.js":"7","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\components\\Main\\Main.js":"8","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\sleep.js":"9"},{"size":169,"mtime":1616593928000,"results":"10","hashOfConfig":"11"},{"size":1659,"mtime":1624285796329,"results":"12","hashOfConfig":"11"},{"size":464,"mtime":1625504084285,"results":"13","hashOfConfig":"11"},{"size":442,"mtime":1624276588668,"results":"14","hashOfConfig":"11"},{"size":910,"mtime":1623840252053,"results":"15","hashOfConfig":"11"},{"size":623,"mtime":1624285794950,"results":"16","hashOfConfig":"11"},{"size":1523,"mtime":1624277599690,"results":"17","hashOfConfig":"11"},{"size":452,"mtime":1623773210459,"results":"18","hashOfConfig":"11"},{"size":101,"mtime":1623838482412,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"gap9yr",{"filePath":"23","messages":"24","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"25","usedDeprecatedRules":"22"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34","usedDeprecatedRules":"22"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\index.js",[],["41","42"],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\App.js",["43"],"import React, { useState, useEffect } from \"react\";\nimport NavBar from \"./components/NavBar/NavBar\";\nimport Main from \"./components/Main/Main\";\nimport bubbleSort from \"./algorithms/bubbleSort.js\";\nimport insertionSort from \"./algorithms/insertionSort\";\nimport mergeSort from \"./algorithms/mergeSort\";\nimport heapSort from \"./algorithms/heapSort\";\n\nfunction App() {\n const [size, setSize] = useState(40);\n const [arr, setArr] = useState([]);\n const [isSorting, setIsSorting] = useState(false);\n\n useEffect(() => {\n generateNewArr();\n }, [size]);\n\n const generateNewArr = () => {\n const randomArr = Array.from(\n { length: size },\n () => Math.floor(Math.random() * 400) + 5\n );\n setArr(randomArr);\n };\n\n const rangeChange = (val) => {\n setSize(val);\n };\n\n const bubbleSortHandler = async () => {\n setIsSorting(true);\n await bubbleSort(arr, setArr);\n setIsSorting(false);\n };\n const heapSortHandler = async () => {\n setIsSorting(true);\n await heapSort(arr, setArr);\n setIsSorting(false);\n };\n const insertionSortHandler = async () => {\n setIsSorting(true);\n await insertionSort(arr, setArr);\n setIsSorting(false);\n };\n const mergeSortHandler = async () => {\n console.log(\"merge\");\n console.log(mergeSort(arr));\n };\n\n return (\n <div>\n <NavBar\n isSorting={isSorting}\n getRange={rangeChange}\n createNewArr={generateNewArr}\n onBubbleSort={bubbleSortHandler}\n onInsertionSort={insertionSortHandler}\n onHeapSort={heapSortHandler}\n onMergeSort={mergeSortHandler}\n />\n <Main data={arr} />\n </div>\n );\n}\n\nexport default App;\n","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\bubbleSort.js",[],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\insertionSort.js",[],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\heapSort.js",[],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\mergeSort.js",["44"],"import sleep from \"./sleep\";\r\n\r\nfunction merge(leftArr, rightArr) {\r\n let result = [];\r\n\r\n while (leftArr.length && rightArr.length) {\r\n if (leftArr[0] < rightArr[0]) {\r\n result.push(leftArr.shift());\r\n } else {\r\n result.push(rightArr.shift());\r\n }\r\n }\r\n return [...result, ...leftArr, ...rightArr];\r\n}\r\n\r\nexport default function mergeSort(arr) {\r\n if (arr.length <= 1) {\r\n return arr;\r\n }\r\n const middleIndex = Math.floor(arr.length / 2);\r\n const leftArr = arr.slice(0, middleIndex);\r\n const rightArr = arr.slice(middleIndex);\r\n\r\n return merge(mergeSort(leftArr), mergeSort(rightArr));\r\n}\r\n","C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\components\\NavBar\\NavBar.js",[],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\components\\Main\\Main.js",[],"C:\\Users\\Kacper\\OneDrive - Politechnika Warszawska\\Pulpit\\Projekty\\Projekty React\\sorting-visualiser\\src\\algorithms\\sleep.js",[],{"ruleId":"45","replacedBy":"46"},{"ruleId":"47","replacedBy":"48"},{"ruleId":"49","severity":1,"message":"50","line":16,"column":6,"nodeType":"51","endLine":16,"endColumn":12,"suggestions":"52"},{"ruleId":"53","severity":1,"message":"54","line":1,"column":8,"nodeType":"55","messageId":"56","endLine":1,"endColumn":13},"no-native-reassign",["57"],"no-negated-in-lhs",["58"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'generateNewArr'. Either include it or remove the dependency array.","ArrayExpression",["59"],"no-unused-vars","'sleep' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation",{"desc":"60","fix":"61"},"Update the dependencies array to be: [generateNewArr, size]",{"range":"62","text":"63"},[544,550],"[generateNewArr, size]"]