Enable anchor-has-content rule (#10908)

This commit is contained in:
Kamil Gabryjelski 2020-09-16 22:27:52 +02:00 committed by GitHub
parent 2a5946d117
commit 281305e0cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -90,7 +90,6 @@ module.exports = {
'import/no-named-as-default-member': 0, 'import/no-named-as-default-member': 0,
'import/prefer-default-export': 0, 'import/prefer-default-export': 0,
indent: 0, indent: 0,
'jsx-a11y/anchor-has-content': 0,
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily 'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion 'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion 'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
@ -205,7 +204,6 @@ module.exports = {
'import/no-named-as-default': 0, 'import/no-named-as-default': 0,
'import/prefer-default-export': 0, 'import/prefer-default-export': 0,
indent: 0, indent: 0,
'jsx-a11y/anchor-has-content': 0,
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily 'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion 'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion 'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion

View File

@ -22,11 +22,13 @@ import ControlSetRow from 'src/explore/components/ControlRow';
describe('ControlSetRow', () => { describe('ControlSetRow', () => {
it('renders a single row with one element', () => { it('renders a single row with one element', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />]} />); const wrapper = shallow(<ControlSetRow controls={[<a />]} />);
expect(wrapper.find('.row')).toExist(); expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toExist(); expect(wrapper.find('.row').find('a')).toExist();
}); });
it('renders a single row with two elements', () => { it('renders a single row with two elements', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />, <a />]} />); const wrapper = shallow(<ControlSetRow controls={[<a />, <a />]} />);
expect(wrapper.find('.row')).toExist(); expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toHaveLength(2); expect(wrapper.find('.row').find('a')).toHaveLength(2);

View File

@ -170,7 +170,11 @@ class TableElement extends React.PureComponent {
/> />
{table.selectStar && ( {table.selectStar && (
<CopyToClipboard <CopyToClipboard
copyNode={<a className="fa fa-clipboard pull-left m-l-2" />} copyNode={
<a aria-label="Copy">
<i aria-hidden className="fa fa-clipboard pull-left m-l-2" />
</a>
}
text={table.selectStar} text={table.selectStar}
shouldShowText={false} shouldShowText={false}
tooltipText={t('Copy SELECT statement to the clipboard')} tooltipText={t('Copy SELECT statement to the clipboard')}