Anchor used as a button. Anchors are primarily expected to navigate. Use the button element instead. (jsx-a11y/anchor-is-valid)
I would like to disable the above warning.
So i write
<div data-g-id={this.props.g.id}>
  (// eslint-disable-next-line anchor-is-valid)
  <a
    className='classname'
    href="#"
    data-point="TL"
    onClick={this.callFunction}
   >
</div>
But the above one is not working.
Use
{
  // eslint-disable-next-line anchor-is-valid
}
<a
...
instead of ()
You can also do it globally in .eslintrc file:
{
  "rules": {
    "jsx-a11y/anchor-is-valid": 0
  }
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With