From 767044bfe5432c0e6207c6d475530a9d0e453635 Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Mon, 14 Sep 2020 22:00:39 +0200 Subject: [PATCH] ESLint: Re-enable rule control-has-associated-label (#10866) * Re-enable rule control-has-associated-label * Change aria-label message in DatasourceControl Co-authored-by: Evan Rusackas Co-authored-by: Evan Rusackas --- superset-frontend/.eslintrc.js | 2 -- superset-frontend/src/CRUD/CollectionTable.tsx | 8 ++++++-- superset-frontend/src/SqlLab/components/TableElement.jsx | 1 + superset-frontend/src/components/Checkbox.tsx | 1 + superset-frontend/src/components/RefreshLabel.jsx | 1 + .../src/dashboard/components/FilterIndicatorTooltip.jsx | 1 + .../src/explore/components/AdhocFilterEditPopover.jsx | 1 + .../src/explore/components/AdhocMetricEditPopover.jsx | 1 + .../src/explore/components/ControlPanelSection.jsx | 1 + .../src/explore/components/ControlPanelsContainer.jsx | 1 + superset-frontend/src/explore/components/SaveModal.jsx | 1 + .../src/explore/components/controls/DatasourceControl.jsx | 1 + 12 files changed, 16 insertions(+), 4 deletions(-) diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js index f0430e1bf..11a03bdeb 100644 --- a/superset-frontend/.eslintrc.js +++ b/superset-frontend/.eslintrc.js @@ -83,7 +83,6 @@ module.exports = { 'jsx-a11y/anchor-has-content': 0, 'jsx-a11y/anchor-is-valid': 0, // disabled temporarily 'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion - 'jsx-a11y/control-has-associated-label': 0, // disabled temporarily 'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion 'lines-between-class-members': 0, // disabled temporarily 'new-cap': 0, @@ -198,7 +197,6 @@ module.exports = { 'jsx-a11y/anchor-has-content': 0, 'jsx-a11y/anchor-is-valid': 0, // disabled temporarily 'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion - 'jsx-a11y/control-has-associated-label': 0, // disabled temporarily 'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion 'lines-between-class-members': 0, // disabled temporarily 'new-cap': 0, diff --git a/superset-frontend/src/CRUD/CollectionTable.tsx b/superset-frontend/src/CRUD/CollectionTable.tsx index 2b1fc3950..61a5477d8 100644 --- a/superset-frontend/src/CRUD/CollectionTable.tsx +++ b/superset-frontend/src/CRUD/CollectionTable.tsx @@ -159,12 +159,14 @@ export default class CRUDCollection extends React.PureComponent< return ( - {expandFieldset && } + {expandFieldset && } {cols.map(col => ( {this.getLabel(col)} ))} {extraButtons} - {allowDeletes && !allowAddItem && } + {allowDeletes && !allowAddItem && ( + + )} {allowAddItem && (