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

Ft/upgrade next to 15 #1001

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Ft/upgrade next to 15 #1001

wants to merge 14 commits into from

Conversation

koechkevin
Copy link
Contributor

@koechkevin koechkevin commented Nov 14, 2024

Description

This PR upgrades the Next.js framework from the current version to v15.0.3 to leverage on the latest features, performance improvements, and bug fixes introduced in this release.

Key Changes

  • Upgrade Next.js Version to 15.0.3.
  • Upgrade Eslint to v9 since next js 15 added support for eslint 9.
  • Updated codebase's eslint configuration to flatConfigs.
  • Removed .eslintignore and .eslintrc since with flatConfigs all can be defined in eslint.config.js.

You may notice many changed files in component files, but this is due to a change in how to disable a rule in a file with flat configs.

  • We do not need to replicate // eslint-disable-next-line testing-library/render-result-naming-convention inside the test file since this disable command has been specified in common eslint config "testing-library/render-result-naming-convention": "off",.
  • // eslint-disable-next-line react-hooks/exhaustive-deps occurrences have now been replaced with /* eslint react-hooks/exhaustive-deps: "off" */

Review of this PR should be around */**/eslint.config.js and packages/eslint-config-commons-ui

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Screenshots

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@koechkevin koechkevin marked this pull request as draft November 14, 2024 10:51
@koechkevin koechkevin self-assigned this Nov 14, 2024
@koechkevin koechkevin requested a review from a team November 27, 2024 10:56
@koechkevin koechkevin marked this pull request as ready for review November 27, 2024 10:56
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

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

👍🏽


Still going through it but quick feedback on issues that kind of stood out to me.

const flatCompat = new FlatCompat();

module.exports = [
...fixupConfigRules(flatCompat.extends("plugin:@next/next/core-web-vitals")),
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this? Aren't we going all in Eslint 9?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kilemensi I came across this issue and the only workaround I had was to use eslint compatibility utilities to fix up things.

packages/hurumap-next/eslint.config.js Outdated Show resolved Hide resolved
apps/vpnmanager/src/middleware.ts Outdated Show resolved Hide resolved
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

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

👍🏽


Are we using this comment, should we be using the experimental file configuration?

@@ -59,7 +59,7 @@ const Articles = React.forwardRef(function Articles(props, ref) {
undefined,
{ scroll: false, shallow: true },
);
// eslint-disable-next-line react-hooks/exhaustive-deps
/* eslint react-hooks/exhaustive-deps: "off" */
Copy link
Member

Choose a reason for hiding this comment

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

  1. Why are we changing these? They seem to still be supported.
  2. Doesn't "off" disable them for the rest of the file instead of just the next line as the original intended?

@@ -7,7 +7,7 @@
"build": "next build",
"start": "next start",
"lint-check": "TIMING=1 next lint './'",
"lint": "TIMING=1 next lint --fix './'",
"lint": "TIMING=1 eslint --fix './'",
Copy link
Member

Choose a reason for hiding this comment

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

Does this go through the Next.js linting?

Comment on lines 11 to +16
apiUrl: string;

fingerprint?: string;

timeout?: number;

Copy link
Member

Choose a reason for hiding this comment

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

Why so many empty lines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants