From 844fc54b889e100ae1acc40738e860a2a7c9c1c7 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 14 May 2021 09:49:00 +0100 Subject: [PATCH] fix lint. --- .eslintrc.json | 20 +++---------------- accounts/src/components/auth/CompanyForm.js | 2 +- accounts/src/pages/ChangePassword.js | 2 +- .../src/components/NotRequiredAuth.js | 2 +- .../src/components/RequiredAuth.js | 4 ++-- .../src/components/adminNote/AdminNotes.js | 2 +- .../src/components/nav/SideNavItem.js | 2 +- .../src/components/search/SearchForm.js | 2 +- .../callrouting/ConfirmNumberDeleteModal.js | 4 ++-- .../src/components/modals/DeleteComponent.js | 2 +- .../src/components/modals/DeleteMonitor.js | 2 +- .../src/components/modals/DeleteSubscriber.js | 2 +- .../src/components/modals/DisableMonitor.js | 2 +- .../modals/RemoveResourceCategory.js | 2 +- .../components/schedule/EscalationSummary.js | 2 +- dashboard/src/pages/ChangePassword.js | 4 ++-- 16 files changed, 21 insertions(+), 35 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 58a7835507..1cfae60f71 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -32,23 +32,14 @@ "no-func-assign": "error", "no-extra-semi": "error", "linebreak-style": ["error", "unix"], - "no-unused-vars": [ - "error", - { - "varsIgnorePattern": "[iI]gnored", - "vars": "all", - "args": "after-used", - "ignoreRestSiblings": true, - "argsIgnorePattern": "[iI]gnored" - } - ], + "no-unused-vars": "error", "no-console": "error", "no-undef": "error", "no-empty": "error", "no-case-declarations": "error", "no-mixed-spaces-and-tabs": "error", "no-useless-escape": "error", - "prettier/prettier": "warn", + "prettier/prettier": "error", "react/jsx-no-undef": "error", "react/jsx-no-bind": [ "error", @@ -74,12 +65,7 @@ "react/no-string-refs": "error", "jsx-a11y/href-no-hash": [0], "react/no-unescaped-entities": "error", - "react/display-name": [ - "error", - { - "ignoreTranspilerName": true - } - ], + "react/display-name": "error", "react/jsx-pascal-case": "error", "array-callback-return": "error", "no-loop-func": "error", diff --git a/accounts/src/components/auth/CompanyForm.js b/accounts/src/components/auth/CompanyForm.js index 915c8f19d6..a893396a74 100755 --- a/accounts/src/components/auth/CompanyForm.js +++ b/accounts/src/components/auth/CompanyForm.js @@ -190,7 +190,7 @@ const companyForm = reduxForm({ validate, // <------ unregister fields on unmoun })(CompanyForm); -const mapDispatchToProps = dispatch_Ignored => { +const mapDispatchToProps = () => { return {}; }; diff --git a/accounts/src/pages/ChangePassword.js b/accounts/src/pages/ChangePassword.js index 99df0c329b..674e520834 100755 --- a/accounts/src/pages/ChangePassword.js +++ b/accounts/src/pages/ChangePassword.js @@ -76,7 +76,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = dispatch_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/admin-dashboard/src/components/NotRequiredAuth.js b/admin-dashboard/src/components/NotRequiredAuth.js index 10e3200396..0d6e634362 100644 --- a/admin-dashboard/src/components/NotRequiredAuth.js +++ b/admin-dashboard/src/components/NotRequiredAuth.js @@ -29,7 +29,7 @@ export default function(ComposedComponent) { } } - function mapStateToProps(state_Ignored) { + function mapStateToProps() { return {}; } diff --git a/admin-dashboard/src/components/RequiredAuth.js b/admin-dashboard/src/components/RequiredAuth.js index 4bf1c54f86..7bc82da67e 100644 --- a/admin-dashboard/src/components/RequiredAuth.js +++ b/admin-dashboard/src/components/RequiredAuth.js @@ -44,11 +44,11 @@ export default function(ComposedComponent) { Authentication.displayName = 'RequireAuth'; - function mapStateToProps(state_Ignored) { + function mapStateToProps() { return {}; } - function mapDispatchToProps(dispatch_Ignored) { + function mapDispatchToProps() { return {}; } diff --git a/admin-dashboard/src/components/adminNote/AdminNotes.js b/admin-dashboard/src/components/adminNote/AdminNotes.js index 39db847abc..25253581f4 100644 --- a/admin-dashboard/src/components/adminNote/AdminNotes.js +++ b/admin-dashboard/src/components/adminNote/AdminNotes.js @@ -100,7 +100,7 @@ AdminNotes.displayName = 'AdminNotes'; const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch); -const mapStateToProps = state_Ignored => { +const mapStateToProps = () => { return {}; }; diff --git a/admin-dashboard/src/components/nav/SideNavItem.js b/admin-dashboard/src/components/nav/SideNavItem.js index 4346d93d99..8b8d86560b 100644 --- a/admin-dashboard/src/components/nav/SideNavItem.js +++ b/admin-dashboard/src/components/nav/SideNavItem.js @@ -191,7 +191,7 @@ export class SidebarNavItem extends Component { SidebarNavItem.displayName = 'SidebarNavItem'; -const mapStateToProps = state_Ignored => ({}); +const mapStateToProps = () => ({}); const mapDispatchToProps = dispatch => bindActionCreators({ loadPage }, dispatch); diff --git a/admin-dashboard/src/components/search/SearchForm.js b/admin-dashboard/src/components/search/SearchForm.js index 967f4bf414..4211f64a8a 100644 --- a/admin-dashboard/src/components/search/SearchForm.js +++ b/admin-dashboard/src/components/search/SearchForm.js @@ -34,7 +34,7 @@ class Search extends Component { Search.displayName = 'Search'; -const mapStateToProps = state_Ignored => { +const mapStateToProps = () => { return {}; }; diff --git a/dashboard/src/components/callrouting/ConfirmNumberDeleteModal.js b/dashboard/src/components/callrouting/ConfirmNumberDeleteModal.js index dd6dca43c7..30fe058cd9 100644 --- a/dashboard/src/components/callrouting/ConfirmNumberDeleteModal.js +++ b/dashboard/src/components/callrouting/ConfirmNumberDeleteModal.js @@ -93,11 +93,11 @@ ConfirmNumberDeleteModal.propTypes = { closeThisDialog: PropTypes.func.isRequired, }; -const mapStateToProps = state_Ignored => { +const mapStateToProps = () => { return {}; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return {}; }; diff --git a/dashboard/src/components/modals/DeleteComponent.js b/dashboard/src/components/modals/DeleteComponent.js index 35126b75e5..7ed35bbeac 100755 --- a/dashboard/src/components/modals/DeleteComponent.js +++ b/dashboard/src/components/modals/DeleteComponent.js @@ -128,7 +128,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/dashboard/src/components/modals/DeleteMonitor.js b/dashboard/src/components/modals/DeleteMonitor.js index 99447fc5c3..7e7adb5a9a 100755 --- a/dashboard/src/components/modals/DeleteMonitor.js +++ b/dashboard/src/components/modals/DeleteMonitor.js @@ -117,7 +117,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/dashboard/src/components/modals/DeleteSubscriber.js b/dashboard/src/components/modals/DeleteSubscriber.js index 346a0950ca..c0e7b88da0 100644 --- a/dashboard/src/components/modals/DeleteSubscriber.js +++ b/dashboard/src/components/modals/DeleteSubscriber.js @@ -110,7 +110,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/dashboard/src/components/modals/DisableMonitor.js b/dashboard/src/components/modals/DisableMonitor.js index f83e4644ff..2a74be3b16 100644 --- a/dashboard/src/components/modals/DisableMonitor.js +++ b/dashboard/src/components/modals/DisableMonitor.js @@ -123,7 +123,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/dashboard/src/components/modals/RemoveResourceCategory.js b/dashboard/src/components/modals/RemoveResourceCategory.js index c02565ce32..0c82763a8d 100755 --- a/dashboard/src/components/modals/RemoveResourceCategory.js +++ b/dashboard/src/components/modals/RemoveResourceCategory.js @@ -112,7 +112,7 @@ const mapStateToProps = state => { }; }; -const mapDispatchToProps = state_Ignored => { +const mapDispatchToProps = () => { return null; }; diff --git a/dashboard/src/components/schedule/EscalationSummary.js b/dashboard/src/components/schedule/EscalationSummary.js index 29dbc56494..9db67ef0f5 100644 --- a/dashboard/src/components/schedule/EscalationSummary.js +++ b/dashboard/src/components/schedule/EscalationSummary.js @@ -201,7 +201,7 @@ EscalationSummary.propTypes = { const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch); -const mapStateToProps = (state_ignored, props_ignored) => { +const mapStateToProps = () => { return {}; }; diff --git a/dashboard/src/pages/ChangePassword.js b/dashboard/src/pages/ChangePassword.js index 543648ed1f..6afcd4b4be 100755 --- a/dashboard/src/pages/ChangePassword.js +++ b/dashboard/src/pages/ChangePassword.js @@ -65,11 +65,11 @@ class ChangePasswordPage extends React.Component { } } -const mapStateToProps = state_Ignored => { +const mapStateToProps = () => { return null; }; -const mapDispatchToProps = dispatch_Ignored => { +const mapDispatchToProps = () => { return null; };