vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.46k stars 27.04k forks source link

Docs: next/link-passhref isn't included in the linting plugin anymore (?) #42159

Open MariaSolOs opened 2 years ago

MariaSolOs commented 2 years ago

What is the improvement or update you wish to see?

I was reviewing the latest changes of next/link and noticed that the docs refer to a next/link-passhref ESLint rule, but I couldn't find its definition in the Next plugin. Was this rule removed? And if so, the docs should be updated.

Is there any context that might help us understand?

With the new changes introduced by Next 13, is important for the docs to be up to date!

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag

dan-b-hu commented 1 year ago

Yes, looks like it was removed. https://github.com/vercel/next.js/pull/36511 Although I don't think it should have been! In a few cases, we're using legacyBehavior which seems to still require passHref?

WillsB3 commented 1 year ago

I've noticed this too. The documentation mentions this rule and I was confused as to why I couldn't trigger a linting error from this rule.

Does the documentation need updating or does this lint rule need bringing back and potentially updating? In my debugging I got a config dump form eslint for the file I was editing and can see that there is no next/link-passhref rule listed in the generated rules section of the config being passed to eslint.

Does the documentation just need updating or does this lint rule need bringing back?