open-sauced / app

🍕 Insights into your entire open source ecosystem.
https://pizza.new
Apache License 2.0
419 stars 224 forks source link

Bug: the formatting command showing multiple warnings and an error #2116

Closed a0m0rajab closed 11 months ago

a0m0rajab commented 11 months ago

Describe the bug

When you run npm run format we get a long warning messages, it would be great to get them solved.

DeprecationWarning: 'originalKeywordKind' has been deprecated since v5.0.0 and will no longer be usable after v5.2.0. Use 'identifierToKeywordKind(identifier)' instead.

./components/molecules/AuthSection/auth-section.tsx
49:6  Warning: React Hook useEffect has a missing dependency: 'userInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/ContributorHighlight/contributor-highlight-card.tsx
162:6  Warning: React Hook useEffect has a missing dependency: 'taggedRepoList'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
465:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/ContributorProfileHeader/contributor-profile-header.tsx
445:6  Warning: React Hook useEffect has missing dependencies: 'handleAddToList' and 'selectedList.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/HighlightInput/highlight-input-form.tsx
60:1  Error: `next/router` import should occur before import of `components/atoms/Button/button`  import/order
305:6  Warning: React Hook useEffect has a missing dependency: 'fetchAllUserHighlights'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
324:6  Warning: React Hook useEffect has missing dependencies: 'handleGenerateHighlightSummary' and 'taggedRepoList'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
513:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/HubContributorsHeader/hub-contributors-header.tsx
56:6  Warning: React Hook useEffect has missing dependencies: 'contributorSearch' and 'onSearch'. Either include them or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/molecules/TableHeader/table-header.tsx
76:6  Warning: React Hook React.useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/ContributorProfileTab/contributor-profile-tab.tsx
120:6  Warning: React Hook useEffect has missing dependencies: 'login', 'receive_collaboration', and 'user_name'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/GitHubTeamSyncDialog/github-team-sync-dialog.tsx
61:6  Warning: React Hook useEffect has a missing dependency: 'loadTeams'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/InsightPage/InsightPage.tsx
164:6  Warning: React Hook useEffect has a missing dependency: 'insight'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
508:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/SearchDialog/search-dialog.tsx
38:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
70:6  Warning: React Hook useEffect has missing dependencies: 'cursor' and 'searchTerm.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
131:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/UserRepositoryRecommendations/user-repository-recommendations.tsx
74:6  Warning: React Hook useEffect has a missing dependency: 'getRepoFullNameByInterests'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
78:6  Warning: React Hook useEffect has a missing dependency: 'refreshUserRecommendedRepos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./layouts/hub.tsx
46:14  Error: Unexpected console statement.  no-console

./layouts/private-wrapper.tsx
29:6  Warning: React Hook useEffect has missing dependencies: 'checkSession' and 'isPrivateRoute'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useFilterPrefetch.ts
43:6  Warning: React Hook useEffect has missing dependencies: 'filterOptions' and 'mutate'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSession.ts
51:6  Warning: React Hook useEffect has missing dependencies: 'getSession', 'loadSession', and 'setStoreData'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSupabaseAuth.ts
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/feed/index.tsx
140:6  Warning: React Hook useEffect has a missing dependency: 'signIn'. Either include it or remove the dependency array.
  react-hooks/exhaustive-deps
148:6  Warning: React Hook useEffect has a missing dependency: 'followersRepo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
154:6  Warning: React Hook useEffect has a missing dependency: 'openSingleHighlight'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/hub/index.tsx
9:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/hub/insights/index.tsx
74:6  Warning: React Hook useEffect has missing dependencies: 'dismissFeaturedInsights' and 'openInsightToast'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/hub/lists/find.tsx
111:6  Warning: React Hook useEffect has a missing dependency: 'title'. Either include it or remove the dependency array. 
 react-hooks/exhaustive-deps

./pages/start.tsx
74:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array. 
 react-hooks/exhaustive-deps

./pages/user/notifications.tsx
63:6  Warning: React Hook useEffect has missing dependencies: 'fetchNotifications' and 'router'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/_app.tsx
98:6  Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./stories/atoms/insight-badge.stories.tsx
12:14  Warning: The story should use PascalCase notation: isPublic  storybook/prefer-pascal-case
14:14  Warning: The story should use PascalCase notation: isPrivate  storybook/prefer-pascal-case

./stories/atoms/layout-toggle.stories.tsx
14:24  Error: Unexpected console statement.  no-console

./stories/atoms/skeleton-wrapper.stories.tsx
15:14  Warning: The story should use PascalCase notation: doubleWrappers  storybook/prefer-pascal-case
16:14  Warning: The story should use PascalCase notation: tripleWrappers  storybook/prefer-pascal-case

./stories/molecules/component-date-filter.stories.tsx
18:25  Error: Unexpected console statement.  no-console

Steps to reproduce

  1. clone the repo
  2. run npm run format
  3. then you will the warnings

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

Contributing Docs

github-actions[bot] commented 11 months ago

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.

nickytonline commented 11 months ago

Duplicate of #1768