#ESLint `no-html-link-for-pages` rule with app dir

2 messages · Page 1 of 1 (latest)

edgy plume
#

Its been a while now that we've had stable app dir, I've been using it in production. Early on when I started this repo, I had to use the pages/ dir for only 1 route: pages/api/[...nextauth].ts, but since upgrading to the latest next-auth, I was able to migrate today into app/api/[...nextauth].ts which is great, but now I'm seeing a ton of logs in my Eslint output and when I run pnpm lint regarding no-html-link-for-pages on files.

I read the docs here https://nextjs.org/docs/messages/no-html-link-for-pages and confirmed I have NO anchor <a> links in my codebase. Secondly, I did some googlign and found other github issues but they all said about either ignoring the rule or setting the directory in the rule if you're using a monorepo.  I'm not using a mono repo, all my pages are in app/(app)/[page-name]/page.tsx or similar. and I also did try setting the route in the rule, that didnt change anything.

I also did try disabling the rule entirely. But when I do I get this error @next/next/no-page-custom-font pointing to a default file that I use for a fallback: app/(app)/@modal/(.)explore/default.tsx
That file currently has this content only

import React from 'react';

export default function Default() {
    return null;
}
``` And that was because I have to specify a default fallback for parallel route https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#modals 

Is this rule still broken as well as the `no-page-custom-font` or am I doing something wrong?

I'm using this config
```json
"dependencies": {
 //...
 "@types/react": "19.0.2",
 "@types/react-dom": "19.0.2",
 "react": "19.0.0",
 "react": "19.0.0",
 //...
 "devDependencies": {
    "eslint": "8.36.0",
    "eslint-plugin-import": "^2.29.1",
    "tsx": "^4.19.2"
  },
  "pnpm": {
    "overrides": {
      "@types/react": "19.0.2",
      "@types/react-dom": "19.0.2"
    }
  },

Node: 22

Simultaneously render one or more pages in the same view that can be navigated independently. A pattern for highly dynamic applications.

ember merlinBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)