From dd0435dd1f8781b9d34deec00c5b05920c57497b Mon Sep 17 00:00:00 2001 From: Aaron Persaud Date: Mon, 16 Oct 2023 02:01:17 -0400 Subject: [PATCH] change no-alert to error and remove unused alert --- .eslintrc.js | 2 +- src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2766afb89a..e073d2f2bd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,7 +50,7 @@ module.exports = { 'react/react-in-jsx-scope': 'off', 'import/no-duplicates': 'off', 'import/no-named-as-default': 'off', - 'no-alert': 'off', + 'no-alert': 'error', 'no-console': 'error', }, overrides: [ diff --git a/src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx b/src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx index f26033f6ea..f8895a91bf 100644 --- a/src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx +++ b/src/components/ForcePasswordUpdate/ForcePasswordUpdate.jsx @@ -49,15 +49,10 @@ export class ForcePasswordUpdate extends Form { }; doSubmit = async () => { - const { newpassword, confirmnewpassword } = { + const { newpassword } = { ...this.state.data, }; - if (newpassword !== confirmnewpassword) { - alert('Confirm Password must match New Password'); - return; - } - const { userId } = this.props.match.params; const data = { userId, newpassword }; const status = await this.props.forcePasswordUpdate(data);