Skip to content

chore: upgrade to Next.js 16 (ESLint flat config, eslint-config-next 16)#56

Open
BenGWeeks wants to merge 6 commits into
masterfrom
chore/next16-major-upgrade
Open

chore: upgrade to Next.js 16 (ESLint flat config, eslint-config-next 16)#56
BenGWeeks wants to merge 6 commits into
masterfrom
chore/next16-major-upgrade

Conversation

@BenGWeeks

Copy link
Copy Markdown
Contributor

What

Consolidated Next.js 15 → 16 major upgrade. Dependabot raised four interdependent bumps that cannot pass individually; this does them as one coordinated migration.

  • Next 16.2.10 — adopt Turbopack (default in 16) via an empty turbopack: {}; enumerate next/image qualities [75, 90, 95] (now required).
  • eslint-config-next 16 + ESLint flat configeslint.config.mjs replaces .eslintrc.json; lint script next lint (removed in Next 16) → eslint ..
  • Disabled the new React-Compiler advisory rules (set-state-in-effect / use-memo / purity) eslint-config-next 16 introduces, rather than refactoring working (incl. vendored shadcn/ui) components.

Supersedes

Deferred (ecosystem not ready — being closed separately)

Test plan

  • npm run lint — passes (flat config, ESLint 9 + eslint-config-next 16).
  • npx tsc --noEmit — passes.
  • npm run format:check — passes.
  • npm run build — passes (Next 16 + Turbopack, all routes compiled).
  • Unit + E2E validated by CI (local vitest needs Node ≥ 22.12; CI uses Node 22.x).

dependabot Bot and others added 4 commits July 9, 2026 17:48
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 7.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 7.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…t 16)

Consolidated major upgrade, since Dependabot raised these as separate but
interdependent PRs (#26 Next 16, #23 eslint-config-next 16, #51 ESLint 10,
#52 TypeScript 7):

- next 15.5.20 -> 16.2.10; adopt Turbopack (empty `turbopack: {}`) as the
  default builder, and enumerate next/image `qualities` ([75, 90, 95]) which
  Next 16 now requires.
- eslint-config-next 15 -> 16 and migrate ESLint to flat config
  (eslint.config.mjs replacing .eslintrc.json); lint script `next lint`
  (removed in Next 16) -> `eslint .`.
- Disable the new React-Compiler advisory rules (set-state-in-effect /
  use-memo / purity) that eslint-config-next 16 introduces, rather than
  refactoring working (incl. vendored shadcn/ui) components.

Deferred (ecosystem not ready):
- ESLint 10 (#51): eslint-config-next 16's bundled plugins target ESLint 9
  (eslint-plugin-react calls removed `context.getFilename()` on ESLint 10);
  pinned to ESLint 9 via overrides.
- TypeScript 7 (#52): typescript-eslint cannot parse the TS 7 native compiler
  API yet, and Next 15 could not `require()` its ESM build. Kept on TS 5.

Verified locally: lint, tsc --noEmit, prettier --check, and next build all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K331ToqUrk97AV12Tq4Dsy
Next 16 stopped resetting scroll for the empty '/#' hash (section hashes
like '/#services' still scroll to their element). The logo and Home link
used '/#' to jump to the top of the homepage, which broke the
primary-navigation E2E test. Add a click handler that smooth-scrolls to
the top when a '/#' link is clicked while already on the homepage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K331ToqUrk97AV12Tq4Dsy

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Coordinated dependency/tooling upgrade to Next.js 16 and eslint-config-next 16, migrating the repo to ESLint flat config while adjusting Next configuration and UI behavior to match changed runtime semantics.

Changes:

  • Upgrades next to ^16.2.10 and updates linting to eslint . with a new eslint.config.mjs flat configuration.
  • Updates next.config.mjs for Next 16 requirements (enumerated next/image qualities) and explicitly enables Turbopack config.
  • Adjusts header navigation behavior to restore “scroll to top” when clicking /# on the homepage; removes legacy .eslintrc.json.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Bumps Next/Eslint deps and switches lint script to eslint . to match Next 16 + flat config.
package-lock.json Lockfile updates reflecting Next 16 / ESLint 9 / eslint-config-next 16 dependency graph.
next.config.mjs Adds images.qualities and declares turbopack: {} alongside existing webpack watch ignores.
eslint.config.mjs Introduces ESLint flat config using eslint-config-next/core-web-vitals + Prettier and disables new advisory rules.
components/header.tsx Adds click handler to restore “scroll to top” for /# on homepage under Next 16 behavior changes.
.eslintrc.json Removes legacy ESLint config file superseded by flat config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/header.tsx
Addresses Copilot review on #56: handleTopLink preventDefault()s the '/#'
navigation, so a stale section hash (e.g. '#services') lingered in the URL
after scrolling to top — a refresh would jump back. Also replaceState('/')
to clear it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K331ToqUrk97AV12Tq4Dsy

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread components/header.tsx Outdated
…motion

Addresses Copilot follow-up on #56: only intercept a plain primary-button
click on '/#' while on the homepage — let the browser handle Cmd/Ctrl/Shift-
click and middle-click (open in new tab). Honour prefers-reduced-motion by
using 'auto' scroll instead of 'smooth' when set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K331ToqUrk97AV12Tq4Dsy
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