-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 8.65 KB
/
.eslintcache
1
[{"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\index.js":"1","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\App.js":"2","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Header.js":"3","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Footer.js":"4","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Start.js":"5","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\utils.js":"6","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\Game.js":"7","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameInfo.js":"8","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameFooter.js":"9","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameBoard.js":"10","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameSquare.js":"11","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameTimer.js":"12","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameEndModal.js":"13","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\socket.js":"14"},{"size":197,"mtime":1611676418822,"results":"15","hashOfConfig":"16"},{"size":2816,"mtime":1611851422376,"results":"17","hashOfConfig":"16"},{"size":661,"mtime":1611757637515,"results":"18","hashOfConfig":"16"},{"size":1730,"mtime":1611933813242,"results":"19","hashOfConfig":"16"},{"size":2135,"mtime":1611757199718,"results":"20","hashOfConfig":"16"},{"size":400,"mtime":1611686082475,"results":"21","hashOfConfig":"16"},{"size":2342,"mtime":1611851452079,"results":"22","hashOfConfig":"16"},{"size":1462,"mtime":1611933148899,"results":"23","hashOfConfig":"16"},{"size":566,"mtime":1611846765526,"results":"24","hashOfConfig":"16"},{"size":1430,"mtime":1611775815261,"results":"25","hashOfConfig":"16"},{"size":1092,"mtime":1611858442072,"results":"26","hashOfConfig":"16"},{"size":1588,"mtime":1611932013519,"results":"27","hashOfConfig":"16"},{"size":730,"mtime":1611847795746,"results":"28","hashOfConfig":"16"},{"size":1390,"mtime":1611860058876,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"4le77v",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"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":"32"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"45","usedDeprecatedRules":"32"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\index.js",[],["60","61"],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\App.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Header.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Footer.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\Start.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\utils.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\Game.js",["62"],"import { useState, useEffect } from \"react\";\r\nimport {\r\n endGame,\r\n giveUp,\r\n restartGame,\r\n leaveGame,\r\n getGameData,\r\n getRoomData,\r\n} from \"../../socket\";\r\nimport GameInfo from \"./GameInfo\";\r\nimport GameFooter from \"./GameFooter\";\r\nimport GameBoard from \"./GameBoard\";\r\nimport GameEndModal from \"./GameEndModal\";\r\n\r\nconst Game = ({ playerName, gameRoom, setIsInRoom, resetParent }) => {\r\n const [roomInfo, setRoomInfo] = useState([]);\r\n const [gameData, setGameData] = useState([]);\r\n\r\n const getData = () => {\r\n const clientData = { room: gameRoom };\r\n getRoomData(clientData, (response) => {\r\n setRoomInfo(response);\r\n });\r\n getGameData(clientData, (response) => {\r\n setGameData(JSON.parse(response));\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n getData();\r\n return () => {\r\n resetParent();\r\n };\r\n }, []);\r\n\r\n const giveUpHandler = () => {\r\n const clientData = { username: playerName, room: gameRoom };\r\n giveUp(clientData);\r\n getData();\r\n };\r\n\r\n const timeoutHandler = () => {\r\n endGame();\r\n getData();\r\n };\r\n\r\n const leaveHandler = () => {\r\n const clientData = { username: playerName, room: gameRoom };\r\n leaveGame(clientData);\r\n getData();\r\n setIsInRoom(false);\r\n };\r\n\r\n const playagainHandler = () => {\r\n restartGame();\r\n getData();\r\n };\r\n\r\n return (\r\n <div className=\"game\">\r\n {gameData.is_winner && (\r\n <GameEndModal\r\n winnerColor={gameData.winner}\r\n winnerName={gameData.winner === \"black\" ? roomInfo[1] : roomInfo[0]}\r\n leaveHandler={leaveHandler}\r\n playagainHandler={playagainHandler}\r\n />\r\n )}\r\n <div className=\"container flex\">\r\n <GameInfo\r\n roomInfo={roomInfo}\r\n turn={gameData.game_running ? gameData.turn : \"waiting\"}\r\n gameRoom={gameRoom}\r\n timeoutHandler={timeoutHandler}\r\n />\r\n <GameBoard\r\n board={gameData.board}\r\n rows={gameData.rows}\r\n columns={gameData.columns}\r\n getData={getData}\r\n playerName={playerName}\r\n />\r\n <GameFooter\r\n giveUpHandler={giveUpHandler}\r\n leaveHandler={leaveHandler}\r\n turn={gameData.game_running ? gameData.turn : \"waiting\"}\r\n />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Game;\r\n","C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameInfo.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameFooter.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameBoard.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameSquare.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameTimer.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\components\\gameComponents\\GameEndModal.js",[],"C:\\Users\\roman\\OneDrive\\Desktop\\Code\\chess-remake\\src\\socket.js",[],{"ruleId":"63","replacedBy":"64"},{"ruleId":"65","replacedBy":"66"},{"ruleId":"67","severity":1,"message":"68","line":34,"column":6,"nodeType":"69","endLine":34,"endColumn":8,"suggestions":"70"},"no-native-reassign",["71"],"no-negated-in-lhs",["72"],"react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'getData' and 'resetParent'. Either include them or remove the dependency array. If 'resetParent' changes too often, find the parent component that defines it and wrap that definition in useCallback.","ArrayExpression",["73"],"no-global-assign","no-unsafe-negation",{"desc":"74","fix":"75"},"Update the dependencies array to be: [getData, resetParent]",{"range":"76","text":"77"},[848,850],"[getData, resetParent]"]