Open janhoogeveen opened 3 years ago
canary
14.16.0
Chrome
macOS
Vercel
When running the linter, I get the following errors if I link to an API Preview exit route.
71:36 warning Do not use the HTML tag to navigate to /api/exit-preview/. Use Link from 'next/link' instead. See: https://nextjs.org/docs/messages/no-html-link-for-pages @next/next/no-html-link-for-pages
I don't believe that a link to an API route should always be tested through the @next/next/no-html-link-for-pages rule as defined in eslint-config-next. Especially when it's following documented behavior from the API previews.
@next/next/no-html-link-for-pages
eslint-config-next
Example code on GitHub that would fail the linter https://github.com/vercel/next.js/blob/canary/examples/cms-sanity/components/alert.js#L19
+1, same error on with-typescript example (and probably many others.
with-typescript
Disabling the rule for now.
What version of Next.js are you using?
canary
What version of Node.js are you using?
14.16.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
When running the linter, I get the following errors if I link to an API Preview exit route.
Expected Behavior
I don't believe that a link to an API route should always be tested through the
@next/next/no-html-link-for-pages
rule as defined ineslint-config-next
. Especially when it's following documented behavior from the API previews.To Reproduce
Example code on GitHub that would fail the linter https://github.com/vercel/next.js/blob/canary/examples/cms-sanity/components/alert.js#L19