-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 9.59 KB
/
.eslintcache
1
[{"/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Header/Header.tsx":"1","/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/AddMarker.tsx":"2","/Users/antoniotoche/Documents/utec/ada/project-ada/src/index.tsx":"3","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/reducers/index.ts":"4","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/places.ts":"5","/Users/antoniotoche/Documents/utec/ada/project-ada/src/reportWebVitals.ts":"6","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/index.ts":"7","/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/Graph.tsx":"8","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/reducers/places.ts":"9","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/index.ts":"10","/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/search.ts":"11","/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/Map.tsx":"12"},{"size":1272,"mtime":1636662588051,"results":"13","hashOfConfig":"14"},{"size":3792,"mtime":1639520020359,"results":"15","hashOfConfig":"14"},{"size":717,"mtime":1636665163921,"results":"16","hashOfConfig":"14"},{"size":156,"mtime":1636163114765,"results":"17","hashOfConfig":"14"},{"size":763,"mtime":1636416781802,"results":"18","hashOfConfig":"14"},{"size":425,"mtime":1636163114764,"results":"19","hashOfConfig":"14"},{"size":52,"mtime":1636163114765,"results":"20","hashOfConfig":"14"},{"size":3732,"mtime":1639516299249,"results":"21","hashOfConfig":"14"},{"size":1213,"mtime":1636417063551,"results":"22","hashOfConfig":"14"},{"size":225,"mtime":1636163114765,"results":"23","hashOfConfig":"14"},{"size":172,"mtime":1636163114765,"results":"24","hashOfConfig":"14"},{"size":1412,"mtime":1636662622972,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"11jk3d",{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30","usedDeprecatedRules":"31"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Header/Header.tsx",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/AddMarker.tsx",["54"],"import React, { useEffect, useState } from \"react\";\nimport { LatLng, LatLngExpression } from \"leaflet\";\nimport { Marker, useMapEvents, Polyline } from \"react-leaflet\";\nimport { connect } from \"react-redux\";\nimport {\n setPlaceFormVisibility,\n setPrePlaceLocation,\n} from \"../../store/actions\";\n\nimport { graph, calcHaversineDistance, CreateAdjacentMatrix, PrimMST, DFS } from \"./Graph\"\ninterface MapMode {\n distances: boolean,\n cpu: boolean\n}\n\nconst AddMarker = (props: MapMode) => {\n const [lineCpu, setLinesCpu] = useState<Array<[number, number]>>([[-9.189967, -75.015152]])\n const [positions, setPositions] = useState<Array<LatLngExpression | null>>([])\n const [lineDistance, setLinesDistance] = useState<Array<[number, number]>>([[-9.189967, -75.015152]])\n const [ran,setRandom ] = useState<Array<number>>([12312])\n\n useEffect(() => {\n const lines = new Array<[number, number]>() \n \n if (props.distances && positions) { \n graph.forEachNode((node1, i) => { \n graph.forEachNode((node2, j) => {\n if (node1 !== node2 && Number(node1) > Number(node2)) { \n try { \n graph.addEdge(node1, node2, {\n weight: calcHaversineDistance(i.lat, i.lng, j.lat, j.lng)\n })\n }catch(e) {\n const ed = graph.edge(node1, node2)\n graph.updateEdgeAttribute(ed, \"weight\", ()=>{\n return calcHaversineDistance(i.lat, i.lng, j.lat, j.lng)\n })\n }\n }\n })\n })\n }else if(props.cpu && positions){\n graph.forEachNode((node1, i) => {\n graph.forEachNode((node2, j) => {\n if (node1 !== node2 && Number(node1) > Number(node2)) {\n try {\n graph.addEdge(node1, node2, {\n weight: calcHaversineDistance(i.lat, i.lng, j.lat, j.lng) + ran[Number(node1)]\n })\n }catch(e) {\n const ed = graph.edge(node1, node2)\n graph.updateEdgeAttribute(ed, \"weight\", ()=>{\n return calcHaversineDistance(i.lat, i.lng, j.lat, j.lng) + ran[Number(node1)]\n })\n }\n }\n })\n })\n }else {\n console.log(\"returning\");\n return;\n }\n\n (async () => {\n try {\n const adjacency = await CreateAdjacentMatrix(graph)\n\n const [prim, len] = PrimMST(adjacency)\n\n const path = DFS(prim, len)\n\n path.forEach((val) => {\n const point = graph.getNodeAttributes(val)\n lines.push([point.lat, point.lng])\n })\n\n }catch(err) {\n console.log(err)\n }\n })()\n\n\n\n if(props.distances){\n setLinesDistance(lines)\n }else if(props.cpu) {\n setLinesCpu(lines)\n }\n\n\n }, [props, positions])\n\n useMapEvents({\n click: (e) => {\n graph.addNode(positions.length.toString(), { lat: e.latlng.lat, lng: e.latlng.lng })\n setPositions([...positions, e.latlng])\n setRandom([...ran, ( Math.floor(Math.random() * (184850 - 10 + 1) + 10))])\n },\n });\n\n return positions.length <= 1 ? null : (\n <>\n {props.cpu ? <Polyline positions={lineCpu} /> : props.distances ? <Polyline positions={lineDistance} /> : null}\n\n {positions ? positions.map((pos, i) => {\n //@ts-ignore\n return <Marker key={i} position={pos} > </Marker>\n }) : null}\n </>\n );\n};\n\nconst mapStateToProps = (state: any) => {\n const { places } = state;\n\n return {\n formIsOpen: places.placeFormIsVisible,\n };\n};\n\nconst mapDispatchToProps = (dispatch: any) => {\n return {\n toggleForm: (payload: boolean) => dispatch(setPlaceFormVisibility(payload)),\n setLocation: (payload: LatLng) => dispatch(setPrePlaceLocation(payload)),\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AddMarker);\n",["55","56"],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/index.tsx",[],["57","58"],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/reducers/index.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/places.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/reportWebVitals.ts",[],["59","60"],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/index.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/Graph.tsx",["61","62","63","64"],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/reducers/places.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/index.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/store/actions/search.ts",[],"/Users/antoniotoche/Documents/utec/ada/project-ada/src/components/Map/Map.tsx",[],{"ruleId":"65","severity":1,"message":"66","line":91,"column":6,"nodeType":"67","endLine":91,"endColumn":24,"suggestions":"68"},{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"69","replacedBy":"73"},{"ruleId":"71","replacedBy":"74"},{"ruleId":"69","replacedBy":"75"},{"ruleId":"71","replacedBy":"76"},{"ruleId":"77","severity":1,"message":"78","line":3,"column":8,"nodeType":"79","messageId":"80","endLine":3,"endColumn":16},{"ruleId":"77","severity":1,"message":"81","line":7,"column":11,"nodeType":"79","messageId":"80","endLine":7,"endColumn":15},{"ruleId":"82","severity":1,"message":"83","line":44,"column":7,"nodeType":"79","messageId":"84","endLine":44,"endColumn":11},{"ruleId":"82","severity":1,"message":"85","line":45,"column":7,"nodeType":"79","messageId":"84","endLine":45,"endColumn":11},"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'ran'. Either include it or remove the dependency array.","ArrayExpression",["86"],"no-native-reassign",["87"],"no-negated-in-lhs",["88"],["87"],["88"],["87"],["88"],"@typescript-eslint/no-unused-vars","'internal' is defined but never used.","Identifier","unusedVar","'Node' is defined but never used.","@typescript-eslint/no-redeclare","'lat1' is already defined.","redeclared","'lat2' is already defined.",{"desc":"89","fix":"90"},"no-global-assign","no-unsafe-negation","Update the dependencies array to be: [props, positions, ran]",{"range":"91","text":"92"},[2741,2759],"[props, positions, ran]"]