-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@next/next/no-html-link-for-pages doesn't work with app router #51742
Labels
bug
Issue was opened via the bug report template.
good first issue
Easy to fix issues, good for newcomers
locked
Comments
I'd like to take a look into this! |
2 tasks
Can you assign it to me please ? |
can you assign it to me? |
I'll love to check this out |
hi everyone, any news ? |
Hello sir can you assign it to me |
ijjk
added a commit
that referenced
this issue
Sep 17, 2024
supersedes #51783 ## What This PR fixes the issue of `<a>` tags for internal routing not being caught by linting in the app directory. ## Why The linting of the html links should be consistent across pages and app directories. ## How - Added a new function to parse the URLs in the appDir (since it's a bit different from the /pages directory) - Lint now checks against pagesUrls and appUrls - Added tests for the appDir in the no-html-link-for-pages test file fixes #51742 --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug
Issue was opened via the bug report template.
good first issue
Easy to fix issues, good for newcomers
locked
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: 8.6.2 Relevant packages: next: 13.4.7 eslint-config-next: 13.4.7 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://github.com/osdiab/next-eslint-repro-links/blob/main/src/app/page.js#L13
To Reproduce
about
pageindex
page to the/about
page with an<a />
tagnext lint
Describe the Bug
I expect from the description of the lint rule that if i use an
<a />
tag where I should be using a<Link />
tag for an internal link, it would tell me that i should use<Link />
instead.Expected Behavior
It should show a lint error
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: