Skip to content

Conversation

@Vinnl
Copy link
Collaborator

@Vinnl Vinnl commented Dec 23, 2025

See https://nextjs.org/blog/next-16 and https://nextjs.org/blog/next-16-1

Apart from the codemode, I had to fix our ESLint config, which now had some kind of circular references but had gotten fairly messy anyway. All the same config should still be there, although some of it moved into Next's own packages. However, some of them (most notably react-hooks) apparently didn't cover all our code, so I had to fix a bunch of errors, or at least add exceptions for them for now - I left a comment when I did.

I split the changes from the codemod and the changes I had to do for ESLint into separate commits, so that might help during reviewing.

Note that this merges into #6366, though maybe it should just target main 🤔 Forgot that I had done that and just rebased on main - so I just retargeted this there.

@Vinnl Vinnl requested review from codemist and kschelonka December 23, 2025 16:02
@Vinnl Vinnl self-assigned this Dec 23, 2025
const hasExposures = breachesDataArray.length > 0;
const hasUnresolvedBreaches = tabSpecificExposures.length > 0;

const TabContentActionNeeded = () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file defined three components (TabContentActionNeeded, TabContentFixed, and getZeroStateIndicator - the latter for some reason not a component) inside another component, leading to them getting recreated on every render. The linter pointed this out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had an LLM figure out the "circular reference" error that ESLint threw, and it actually organised it quite neatly, grouping a few things together that belonged together but were separate. What I did was inspect the diff between the before and after, and check that everything that was removed from the before had a place in the after, and that all the additions also made sense.

eslint.config.js Outdated
...compat.config({
extends: ["next"],
}),
const estlingConfig = defineConfig([
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo here, eslintConfig is probably intended

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Whoops! d6a8c53

UserAnnouncementWithDetails[] | null
>(props.userAnnouncements);
useEffect(() => {
// TODO The `react-hooks` ESLint rules didn't apply correctly
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please write a ticket for this TODO so it doesn't get lost

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call: 59718ba (and the ticket).

Copy link
Collaborator

@kschelonka kschelonka left a comment

Choose a reason for hiding this comment

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

I've read up on next based on your comments and I think I understand why the workarounds are done. Someone with next experience should sign off though.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextjs-a2457717e1 branch 11 times, most recently from e870948 to e784114 Compare December 31, 2025 19:35
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextjs-a2457717e1 branch 10 times, most recently from 65ca7d6 to 3a7aca2 Compare January 7, 2026 17:54
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextjs-a2457717e1 branch 2 times, most recently from 24cc584 to e5b44dd Compare January 13, 2026 23:15
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/nextjs-a2457717e1 branch 4 times, most recently from 8f032fc to 52ebbef Compare January 14, 2026 00:27
Copy link
Collaborator

@codemist codemist left a comment

Choose a reason for hiding this comment

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

Thanks for adding the comments! The changes look good to me, just pending some merge conflicts.

@Vinnl Vinnl changed the base branch from dependabot/npm_and_yarn/nextjs-a2457717e1 to main January 14, 2026 15:50
@Vinnl
Copy link
Collaborator Author

Vinnl commented Jan 14, 2026

Hmm, CI jobs appear to be having trouble activating after retargeting this to main. Let's see if closing and re-opening fixes it, otherwise I'll have to create a new PR.

@Vinnl Vinnl closed this Jan 14, 2026
@Vinnl Vinnl reopened this Jan 14, 2026
Vinnl added 2 commits January 21, 2026 17:31
I think some of our manual config got integrated into Next.js's
default config. This commit organises the config and removes
redundancies, while keeping all existing config.
@Vinnl Vinnl force-pushed the next-16-codemod branch 2 times, most recently from e6f2f9d to c5bedaf Compare January 21, 2026 17:13
Vinnl added 3 commits January 22, 2026 11:23
With the fixed ESLint config, it turned out we were breaking a number
of rules.
What I did:
- npx storybook@latest upgrade.
- Change to `moduleResolution: bundler` in tsconfig, because otherwise
  importing Storybook types failed.
- Add explicit paths to tsconfig for Glean, which doesn't seem to work
  well with moduleResolution: bundler without it.

For some more background on the moduleResolutionChange, this is the
error message I faced on `npm run build`:

        .storybook/main.ts:6:38
        Type error: Cannot find module '@storybook/nextjs' or its corresponding type declarations.
          There are types at 'blurts-server/node_modules/@storybook/nextjs/dist/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
* transpile dependencies in next config

* add comment
It's the only tool we use that still needs that. Hopefully down
the road we can remove it, either thanks to Jest properly
supporting ES Modules natively, or because we switch to another
test framework.
@Vinnl Vinnl merged commit 7010ee4 into main Jan 22, 2026
19 checks passed
@Vinnl Vinnl deleted the next-16-codemod branch January 22, 2026 11:21
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.

4 participants