SWE574-Fall2023-Group1 / SWE574-Fall2023-G1

Project for SWE 574 - Group 1
MIT License
7 stars 1 forks source link

Reduce "defined but never used" warnings in frontend #108

Closed sadikkuzu closed 12 months ago

sadikkuzu commented 1 year ago

There are some variables listed below. Some of them may be deleted if there is no need to use them any more.

2023-11-03 09:52:41 
2023-11-03 09:52:41 > frontend@0.1.0 start
2023-11-03 09:52:41 > react-scripts --openssl-legacy-provider start
2023-11-03 09:52:41 
2023-11-03 09:52:45 Starting the development server...
2023-11-03 09:52:45 
2023-11-03 09:52:44 (node:26) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
2023-11-03 09:52:44 (Use `node --trace-deprecation ...` to show where the warning was created)
2023-11-03 09:52:45 Browserslist: caniuse-lite is outdated. Please run:
2023-11-03 09:52:45   npx update-browserslist-db@latest
2023-11-03 09:52:45   Why you should do it regularly: https://github.com/browserslist/update-db#readme
2023-11-03 09:53:35 Compiled with warnings.
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/landing/ResetPasswordRequest.js
2023-11-03 09:53:35   Line 10:  'navigate' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/App.js
2023-11-03 09:53:35   Line 1:  'useState' is defined but never used   no-unused-vars
2023-11-03 09:53:35   Line 1:  'useEffect' is defined but never used  no-unused-vars
2023-11-03 09:53:35   Line 1:  'useRef' is defined but never used     no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/story/StoryDetails.js
2023-11-03 09:53:35   Line 28:   'username' is assigned a value but never used           no-unused-vars
2023-11-03 09:53:35   Line 29:   'isEditMode' is assigned a value but never used         no-unused-vars
2023-11-03 09:53:35   Line 32:    'handleOpen' is assigned a value but never used         no-unused-vars
2023-11-03 09:53:35   Line 35:    'COMMENTS_PER_PAGE' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35   Line 175:  'response' is assigned a value but never used           no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/story/CreateStory.js
2023-11-03 09:53:35   Line 28:  'searchBox' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/landing/Login.js
2023-11-03 09:53:35   Line 2:  'Router' is defined but never used  no-unused-vars
2023-11-03 09:53:35   Line 2:  'Routes' is defined but never used  no-unused-vars
2023-11-03 09:53:35   Line 2:  'Route' is defined but never used   no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/search/StorySearch.js
2023-11-03 09:53:35   Line 4:   'Marker' is defined but never used                    no-unused-vars
2023-11-03 09:53:35   Line 8:   'List' is defined but never used                      no-unused-vars
2023-11-03 09:53:35   Line 8:   'ListItem' is defined but never used                  no-unused-vars
2023-11-03 09:53:35   Line 8:   'ListItemText' is defined but never used              no-unused-vars
2023-11-03 09:53:35   Line 17:  'setPageSize' is assigned a value but never used      no-unused-vars
2023-11-03 09:53:35   Line 42:   'handleUserClick' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/story/CommentSection.js
2023-11-03 09:53:35   Line 58:  'response' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/search/Timeline.js
2023-11-03 09:53:35   Line 7:  'setRadiusDiff' is assigned a value but never used  no-unused-vars
2023-11-03 09:53:35 
2023-11-03 09:53:35 ./src/pages/search/SearchUserResults.js
2023-11-03 09:53:35   Line 7:  Unexpected empty object pattern  no-empty-pattern
2023-11-03 09:53:35 
...

image

sadikkuzu commented 1 year ago

Remaining ones:

2023-11-12 20:14:41 WARNING in [eslint] 
2023-11-12 20:14:41 src/pages/homepage/AllStories.js
2023-11-12 20:14:41   Line 78:6:  React Hook useEffect has missing dependencies: 'fetchProfilePhoto' and 'profilePhotos'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/homepage/StoriesbyFollowingUsers.js
2023-11-12 20:14:41   Line 79:6:  React Hook useEffect has missing dependencies: 'fetchProfilePhoto' and 'profilePhotos'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/landing/ResetPasswordRequest.js
2023-11-12 20:14:41   Line 4:10:  'useNavigate' is defined but never used  no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/profile/UserProfile.js
2023-11-12 20:14:41   Line 31:6:  React Hook useEffect has missing dependencies: 'fetchProfilePhoto' and 'fetchUserStories'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/profile/UserProfileOthers.js
2023-11-12 20:14:41   Line 98:6:   React Hook useEffect has a missing dependency: 'defaultProfilePhoto'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41   Line 103:6:  React Hook useEffect has a missing dependency: 'fetchUserStories'. Either include it or remove the dependency array     react-hooks/exhaustive-deps
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/search/SearchUserResults.js
2023-11-12 20:14:41   Line 7:28:  Unexpected empty object pattern  no-empty-pattern
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/search/StorySearch.js
2023-11-12 20:14:41   Line 1:35:   'useEffect' is defined but never used                 no-unused-vars
2023-11-12 20:14:41   Line 8:80:   'List' is defined but never used                      no-unused-vars
2023-11-12 20:14:41   Line 8:86:   'ListItem' is defined but never used                  no-unused-vars
2023-11-12 20:14:41   Line 8:96:   'ListItemText' is defined but never used              no-unused-vars
2023-11-12 20:14:41   Line 17:20:  'setPageSize' is assigned a value but never used      no-unused-vars
2023-11-12 20:14:41   Line 28:10:  'mapCenter' is assigned a value but never used        no-unused-vars
2023-11-12 20:14:41   Line 42:9:   'handleUserClick' is assigned a value but never used  no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/search/Timeline.js
2023-11-12 20:14:41   Line 7:22:  'setRadiusDiff' is assigned a value but never used  no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/story/CommentSection.js
2023-11-12 20:14:41   Line 48:6:   React Hook useEffect has a missing dependency: 'fetchComments'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41   Line 58:13:  'response' is assigned a value but never used                                                                     no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/story/CreateStory.js
2023-11-12 20:14:41   Line 1:38:   'useRef' is defined but never used                 no-unused-vars
2023-11-12 20:14:41   Line 8:71:   'List' is defined but never used                   no-unused-vars
2023-11-12 20:14:41   Line 8:77:   'ListItem' is defined but never used               no-unused-vars
2023-11-12 20:14:41   Line 8:87:   'ListItemText' is defined but never used           no-unused-vars
2023-11-12 20:14:41   Line 28:21:  'setMapCenter' is assigned a value but never used  no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/story/StoryDetails.js
2023-11-12 20:14:41   Line 28:10:   'username' is assigned a value but never used                                                          no-unused-vars
2023-11-12 20:14:41   Line 29:10:   'isEditMode' is assigned a value but never used                                                        no-unused-vars
2023-11-12 20:14:41   Line 153:4:   React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
2023-11-12 20:14:41   Line 213:70:  Unnecessary escape character: \(                                                                       no-useless-escape
2023-11-12 20:14:41   Line 213:72:  Unnecessary escape character: \)                                                                       no-useless-escape
2023-11-12 20:14:41   Line 277:13:  'response' is assigned a value but never used                                                          no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 src/pages/story/StoryMap.js
2023-11-12 20:14:41   Line 2:27:   'useEffect' is defined but never used                no-unused-vars
2023-11-12 20:14:41   Line 4:59:   'DrawingManager' is defined but never used           no-unused-vars
2023-11-12 20:14:41   Line 11:10:  'mapCenter' is assigned a value but never used       no-unused-vars
2023-11-12 20:14:41   Line 14:10:  'drawingManager' is assigned a value but never used  no-unused-vars
2023-11-12 20:14:41   Line 17:11:  'isLoaded' is assigned a value but never used        no-unused-vars
2023-11-12 20:14:41   Line 17:21:  'loadError' is assigned a value but never used       no-unused-vars
2023-11-12 20:14:41 
2023-11-12 20:14:41 webpack compiled with 1 warning