diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js index 11a03bdeb..d1cbd2ce0 100644 --- a/superset-frontend/.eslintrc.js +++ b/superset-frontend/.eslintrc.js @@ -125,7 +125,6 @@ module.exports = { 'react/no-unused-prop-types': 0, 'react/prop-types': 0, 'react/require-default-props': 0, - 'react/state-in-constructor': 0, // disabled temporarily 'react/static-property-placement': 0, // re-enable up for discussion 'prettier/prettier': 'error', }, @@ -239,7 +238,6 @@ module.exports = { 'react/no-unused-prop-types': 0, 'react/prop-types': 0, 'react/require-default-props': 0, - 'react/state-in-constructor': 0, // disabled temporarily 'react/static-property-placement': 0, // disabled temporarily 'prettier/prettier': 'error', }, diff --git a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx index 8e04ea7cb..b3990f4db 100644 --- a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx @@ -92,11 +92,14 @@ class DashboardTable extends React.PureComponent< initialSort = [{ id: 'changed_on_delta_humanized', desc: true }]; - state = { - dashboards: [], - dashboard_count: 0, - loading: false, - }; + constructor(props: DashboardTableProps) { + super(props); + this.state = { + dashboards: [], + dashboard_count: 0, + loading: false, + }; + } componentDidUpdate(prevProps: DashboardTableProps) { if (prevProps.search !== this.props.search) {