`@next/next/no-html-link-for-pages` rule does not work with `pageExtensions`
Open
Nobody has claimed this yet.
good first issue
Linting
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 18.14.2
npm: 9.8.1
Yarn: 1.22.19
pnpm: 8.3.1
Relevant Packages:
next: 13.4.13-canary.9
eslint-config-next: 13.4.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
ESLint (eslint-config-next)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/nnmax/next-eslint-config-reproduction-app
To Reproduce
git clone https://github.com/nnmax/next-eslint-config-reproduction-app.gitcd next-eslint-config-reproduction-appnpm installnpm run lint- Observe the ESLint output from the terminal.
Describe the Bug
The @next/next/no-html-link-for-pages rule doesn't work after configuring custom pageExtensions.
Expected Behavior
It should recognize pageExtensions.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone nnmax/next-eslint-config-reproduction-app, install dependencies, and run npm run lint to capture the failing ESLint behavior. Trace the @next/next/no-html-link-for-pages rule and how it reads Next.js pageExtensions. Done means the rule recognizes pages using configured extensions and the reproduction lint output matches the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript, nextjs
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100