the current config for jsx-a11y/anchor-is-valid dings us when a react router Link component doesn't have an href attribute, even if it has a to attribute.
The following rule update covers this use case:
/* eslint 'jsx-a11y/anchor-is-valid': ['error', { components: ['Link'], specialLink: ['to'], aspects: ['noHref', 'invalidHref', 'preferButton'], }] */
the current config for
jsx-a11y/anchor-is-validdings us when a react routerLinkcomponent doesn't have anhrefattribute, even if it has atoattribute.The following rule update covers this use case:
/* eslint 'jsx-a11y/anchor-is-valid': ['error', { components: ['Link'], specialLink: ['to'], aspects: ['noHref', 'invalidHref', 'preferButton'], }] */