kalemmentore868 / bloqsquare-react

0 stars 1 forks source link

Fix eslint compile errors #9

Closed karneaud closed 2 years ago

karneaud commented 2 years ago

@kalemmentore868 below is the error log from trying to deploy on #netlify


11:53:06 AM: Failed to compile.
11:53:06 AM: 
11:53:06 AM: [eslint]
11:53:06 AM: src/App.tsx
11:53:06 AM:   Line 6:23:  'useGameContext' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 7:8:   'Grid2' is defined but never used           @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 8:8:   'Player' is defined but never used          @typescript-eslint/no-unused-vars
11:53:06 AM: src/Context/GameContext.tsx
11:53:06 AM:   Line 2:8:  'Grid2' is defined but never used   @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 3:8:  'Player' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/Logo.tsx
11:53:06 AM:   Line 1:17:  'FC' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/gameScreenComponents/GameBoard.tsx
11:53:06 AM:   Line 1:21:  'useState' is defined but never used   @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 1:31:  'useEffect' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/gameScreenComponents/GameInfo.tsx
11:53:06 AM:   Line 1:17:  'FC' is defined but never used     @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 3:8:   'Score' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/gameScreenComponents/Square.tsx
11:53:06 AM:   Line 1:42:   'memo' is defined but never used                                                                                                                                                                                                                                                                                                     @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 2:10:   'useGameContext' is defined but never used                                                                                                                                                                                                                                                                                           @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 16:10:  'areEqual' is defined but never used                                                                                                                                                                                                                                                                                                 @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 44:8:   React Hook useEffect has missing dependencies: 'cellSquare.index', 'handleSquareClicked', 'machine', and 'player'. Either include them or remove the dependency array                                                                                                                                                                react-hooks/exhaustive-deps
11:53:06 AM:   Line 57:8:   React Hook useEffect has missing dependencies: 'incrementMachineScore', 'incrementPlayerScore', 'machine.chosenColor', and 'player.chosenColor'. Either include them or remove the dependency array. If 'incrementPlayerScore' changes too often, find the parent component that defines it and wrap that definition in useCallback  react-hooks/exhaustive-deps
11:53:06 AM: src/components/gameScreenComponents/TableRow.tsx
11:53:06 AM:   Line 1:21:   'useState' is defined but never used   @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 1:31:   'useEffect' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 1:42:   'memo' is defined but never used       @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 10:10:  'areEqual' is defined but never used   @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/gameScreenComponents/Timer.tsx
11:53:06 AM:   Line 1:17:   'FC' is defined but never used                                                                                                                                                                                                                                                          @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 1:42:   'useRef' is defined but never used                                                                                                                                                                                                                                                      @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 17:17:  Assignments to the 'timer' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect  react-hooks/exhaustive-deps
11:53:06 AM:   Line 26:33:  Expected '===' and instead saw '=='                                                                                                                                                                                                                                                     eqeqeq
11:53:06 AM: src/components/screens/GameOverScreen.tsx
11:53:06 AM:   Line 3:8:  'Player' is defined but never used   @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 5:8:  'Heading' is defined but never used  @typescript-eslint/no-unused-vars
11:53:06 AM: src/components/screens/HomeScreen.tsx
11:53:06 AM:   Line 1:17:   'FC' is defined but never used                       @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 1:31:   'useContext' is defined but never used               @typescript-eslint/no-unused-vars
11:53:06 AM:   Line 15:11:  'gameProperties' is assigned a value but never used  @typescript-eslint/no-unused-vars

Clean up the errors and I'll try again

retry19 commented 2 years ago

can I contribute on this issue? @kalemmentore868

karneaud commented 2 years ago

@retry19 hey man thanks. If you are looking to contribute I have another project I'm trying to start back up and looks like you may be interested in. Sent you an invite