Lint rules don't allow links with javascript:void href, or any alternative.
Created by: peterbraden
For a variety of valid reasons, you may want to have html anchors with a href that is null for a time. One way of doing this is href='javascript:void(0)'
, however this triggers:
Script URL is a form of eval no-script-url" lint error.
Another way is href='#'
. This triggers:
Links must not point to "#". Use a more descriptive href or use a button instead jsx-a11y/href-no-hash
Another way is <a href>
, This triggers:
Warning: Received 'true' for a non-boolean attribute 'href'.
Are there ways to achieve the desired effect without lint errors, otherwise can one of these be removed?
See: #808 (closed)