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.
jsx
file or on the outputjs
file? Cause comments might not make it to thejs
ones? – Harrar{}
instead of()
– Shimmyjsx
files get compiled tojs
files. Depending on howeslint
is setup, you might run it on thejsx
ones or on the resultingjs
files. If it's the latter, comments might not be preserved when transforming them, soeslint
would not know to disable the warning. – Harrar