Repository navigation
templates: fix build type errors and lint config - #16907
Merged
Merged
Conversation
Move lint-staged config to .lintstagedrc.mjs so the JS/TS rule can filter template files out of ESLint (their per-file configs require deps not installed in the monorepo). Prettier still formats them; templates lint standalone via their own script/build.
AlessioGr
approved these changes
Jun 5, 2026
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes misc template build issues
Key Changes
Account for the union admin-user type
The home page in each template now checks for
emailon the user before rendering it, since the authenticated user type is now a union that may not includeemail.Migrate
with-*eslint configs to flat-config importsThe lagging
with-*templates now importeslint-config-next/core-web-vitalsand/typescriptdirectly instead of going throughFlatCompat, matchingtemplates/blank. Drops the@eslint/eslintrcdependency.Exclude templates from the lint-staged ESLint pass
Moves lint-staged config into
.lintstagedrc.mjsso the JS/TS rule filters template files out of ESLint. Template files live outside the monorepo workspace, so their per-file eslint configs reference deps that aren't installed, which crashed the pre-commit hook. Prettier still formats them; templates lint standalone via their ownlintscript and CI build.Design Decisions
The
templates/**ignore in the root eslint config is bypassed by lint-staged'sv10_config_lookup_from_fileflag, which resolves each file's nearest config before ignore patterns apply. Filtering the file list in.lintstagedrc.mjsis the reliable point to drop template files while keeping prettier formatting for them.