eslint-plugin-jsx-a11y
eslint-plugin-jsx-a11y copied to clipboard
react-router Link should not either not cause an error, or not detect as a link
Related #339
For jsx-a11y/anchor-is-valid, <Link to="foo.html"> causes an error. Why should it cause an error for <Link>? If it's because it knows it's an under the hood, it should support values for to.
Thanks for considering!
stumbled upon this one too right now.
It doesn't know Link is anything under the hood.
If you refer to this comment on the issue you linked, it tells you how to configure things to allow Link and to.
I'll reopen this since it's about making "to" be a default specialLink also.
have same issue with Link -rule requires href instead of to
And what about nextjs Link element? The syntax looks like this
import Link from 'next/link';
....
<Link href="/">
<a>Go home</a>
</Link>