Skip to content

Support pageExtensions in no-html-link-for-pages ESLint rule - #98957

Open
Samiislam851 wants to merge 1 commit into
vercel:canaryfrom
Samiislam851:fix/eslint-no-html-link-page-extensions
Open

Samiislam851 wants to merge 1 commit into
vercel:canaryfrom
Samiislam851:fix/eslint-no-html-link-page-extensions

Conversation

@Samiislam851

Copy link
Copy Markdown

The rule hardcoded page-file detection to .js/.jsx/.ts/.tsx, so any project using a custom pageExtensions config in next.config.js was silently skipped. Read pageExtensions from a new settings.next.pageExtensions ESLint setting (mirroring the existing rootDir setting) and use it to match page/app files instead of a fixed regex.

Fixes #53473

The rule hardcoded page-file detection to .js/.jsx/.ts/.tsx, so any
project using a custom pageExtensions config in next.config.js was
silently skipped. Read pageExtensions from a new settings.next.pageExtensions
ESLint setting (mirroring the existing rootDir setting) and use it to
match page/app files instead of a fixed regex.

Fixes vercel#53473

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

@next/next/no-html-link-for-pages rule does not work with pageExtensions

1 participant