Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to NEXT.js 11 #324

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Upgrade to NEXT.js 11 #324

merged 3 commits into from
Jul 21, 2021

Conversation

nickytonline
Copy link
Contributor

@nickytonline nickytonline commented Jul 17, 2021

Description

Upgrades the project to NEXT.js 11. I went through the upgrade guide and a bunch of it doesn't apply to the project, or we already made the necessary changes when we first added NEXT.js to the project.

Related Tickets and Documents

Closes #323

What gif best describes this PR or how it makes you feel? (optional)

MacGruber opening scene

@vercel
Copy link

vercel bot commented Jul 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/drewclem/protege/A7V9AsHvXDTnHgREkhUUhiP4jPnU
✅ Preview: https://protege-git-feature-upgrade-to-nextjs-11-drewclem.vercel.app

@nickytonline nickytonline marked this pull request as ready for review July 17, 2021 05:02
@nickytonline nickytonline added the dependencies Pull requests that update a dependency file label Jul 17, 2021
Copy link
Collaborator

@clandau clandau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@nickytonline nickytonline changed the title Updated dependencies for NEXT.js 11 Upgrade to NEXT.js 11 Jul 17, 2021
@nickytonline
Copy link
Contributor Author

@drewclem, I can’t see the Vercel logs. Is the error a valid error because of the upgrade or is it unrelated?

@nickytonline
Copy link
Contributor Author

nickytonline commented Jul 17, 2021

On build now with NEXT.js 11, eslint runs as part of the build. Currently it's erroring out with the following lint errors. I will fix these as part of the upgrade @drewclem, or would you like me to disable eslint on build for now? (It's a config setting in NEXT.js). We could open a separate issue to fix the lint errors and once those are sorted we could reenable it.

Let's open a separate issue to fix the lint errors and once those are sorted we'll reenable linting on build.

protege on  feature/upgrade-to-nextjs-11 [$!] via  v14.17.3 took 18s 
❯ y build                          
yarn run v1.22.10
$ next build
info  - Loaded env from /Users/yolo/dev/protege/.env.local
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types  

Failed to compile.

./pages/_app.js
58:7  Warning: Unexpected console statement.  no-console

./pages/account-select.js
1:10  Error: 'useState' is defined but never used.  no-unused-vars
1:20  Error: 'useEffect' is defined but never used.  no-unused-vars
2:8  Error: 'Link' is defined but never used.  no-unused-vars
33:11  Error: Missing an explicit type attribute for button  react/button-has-type
47:11  Error: Missing an explicit type attribute for button  react/button-has-type
59:11  Error: Missing an explicit type attribute for button  react/button-has-type

./pages/candidate/[displayName]/dashboard.js
14:42  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/candidate/[displayName]/edit-profile.js
25:44  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/candidate/[displayName]/index.js
4:42  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/company/[displayName]/[jobId]/[applicationId].js
15:44  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/company/[displayName]/[jobId]/edit.js
24:28  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/company/[displayName]/[jobId]/index.js
18:35  Error: Expected to return a value at the end of arrow function.  consistent-return
170:17  Warning: Dangerous property 'dangerouslySetInnerHTML' found  react/no-danger
186:17  Warning: Dangerous property 'dangerouslySetInnerHTML' found  react/no-danger

./pages/company/[displayName]/edit-profile.js
25:42  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/company/[displayName]/post-a-job.js
27:32  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/company/[displayName]/thanks.js
10:30  Error: Expected to return a value at the end of arrow function.  consistent-return

./pages/forgot-password.js
15:9  Error: 'router' is assigned a value but never used.  no-unused-vars
17:10  Error: 'loading' is assigned a value but never used.  no-unused-vars
40:14  Error: 'error' is already declared in the upper scope on line 19 column 10.  no-shadow

./pages/get-in-touch.js
19:10  Error: 'inputs' is assigned a value but never used.  no-unused-vars
73:14  Error: 'response' is defined but never used. Allowed unused args must match /^_/u.  no-unused-vars

./pages/job-board/index.js
9:10  Error: 'activeJobs' is assigned a value but never used.  no-unused-vars
9:22  Error: 'setActiveJobs' is assigned a value but never used.  no-unused-vars

./pages/learning-resources.js
55:3  Error: propType "learningResources" is not required, but has no corresponding defaultProps declaration.  react/require-default-props

./pages/sign-in.js
16:11  Error: 'currentUser' is assigned a value but never used.  no-unused-vars
17:10  Error: 'loading' is assigned a value but never used.  no-unused-vars
34:35  Error: 'control' is assigned a value but never used.  no-unused-vars
45:14  Error: 'error' is already declared in the upper scope on line 18 column 10.  no-shadow
51:9  Error: 'handleSignInWithGithub' is assigned a value but never used.  no-unused-vars
51:41  Error: 'data' is defined but never used. Allowed unused args must match /^_/u.  no-unused-vars
55:14  Error: 'error' is already declared in the upper scope on line 18 column 10.  no-shadow

./pages/sign-up.js
19:10  Error: 'loading' is assigned a value but never used.  no-unused-vars
57:9  Error: 'handleSignInWithGithub' is assigned a value but never used.  no-unused-vars

./components/contributors/IndividualContributor.js
29:7  Error: Empty components are self-closing  react/self-closing-comp

./components/form/RadioInput.js
2:26  Error: Unable to resolve path to module 'formik'.  import/no-unresolved
4:24  Error: 'id' is missing in props validation  react/prop-types
4:28  Error: 'label' is missing in props validation  react/prop-types

./components/form/StatusBar.js
4:23  Error: Must use destructuring status assignment  react/destructuring-assignment

./components/form/TierSelectCard.js
26:7  Error: Empty components are self-closing  react/self-closing-comp

./components/global/FormCard.js
8:7  Error: Empty components are self-closing  react/self-closing-comp

./components/global/GlobalHeader.js
39:7  Warning: Unexpected console statement.  no-console
345:23  Error: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
345:23  Error: Static HTML elements with event handlers require a role.  jsx-a11y/no-static-element-interactions
345:23  Error: Empty components are self-closing  react/self-closing-comp

./components/job/JobList.js
7:9  Error: 'jobs' is assigned a value but never used.  no-unused-vars
10:55  Error: 'useState' is not defined.  no-undef
12:3  Error: 'useEffect' is not defined.  no-undef
13:20  Error: 'fetchApplications' is defined but never used.  no-unused-vars
59:25  Error: 'JobItem' is not defined.  react/jsx-no-undef
66:14  Error: 'CompanyDashboardEmpty' is not defined.  react/jsx-no-undef
98:12  Error: 'archivedListings' is not defined.  no-undef
108:11  Error: 'archivedListings' is not defined.  no-undef

./components/user/ProfileMenu.js
20:16  Error: 'setLogo' is assigned a value but never used.  no-unused-vars

Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@nickytonline nickytonline added the merge by any core This tag is a signal that you are okay with any core team member merging your code for you. label Jul 17, 2021
@drewclem drewclem merged commit ee489a2 into develop Jul 21, 2021
@drewclem drewclem deleted the feature/upgrade-to-nextjs-11 branch July 21, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file merge by any core This tag is a signal that you are okay with any core team member merging your code for you.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to NEXT.js 11
3 participants