Skip to content

templates: fix build type errors and lint config - #16907

Merged
denolfe merged 4 commits into
mainfrom
templates/more-fixes
Jun 5, 2026
Merged

denolfe merged 4 commits into
mainfrom
templates/more-fixes

Conversation

@denolfe

@denolfe denolfe commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

Overview

Fixes misc template build issues

Key Changes

Account for the union admin-user type

The home page in each template now checks for email on the user before rendering it, since the authenticated user type is now a union that may not include email.

Migrate with-* eslint configs to flat-config imports

The lagging with-* templates now import eslint-config-next/core-web-vitals and /typescript directly instead of going through FlatCompat, matching templates/blank. Drops the @eslint/eslintrc dependency.

Exclude templates from the lint-staged ESLint pass

Moves lint-staged config into .lintstagedrc.mjs so 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 own lint script and CI build.

Design Decisions

The templates/** ignore in the root eslint config is bypassed by lint-staged's v10_config_lookup_from_file flag, which resolves each file's nearest config before ignore patterns apply. Filtering the file list in .lintstagedrc.mjs is the reliable point to drop template files while keeping prettier formatting for them.

denolfe added 4 commits June 5, 2026 16:57
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.
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@denolfe
denolfe merged commit a6e494e into main Jun 5, 2026
174 of 176 checks passed
@denolfe
denolfe deleted the templates/more-fixes branch June 5, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants