Skip to content

Commit

Permalink
FIx linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolelim02 committed Sep 29, 2024
1 parent 1d054e1 commit ce30232
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist"] },
{ ignores: ["dist", "coverage"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
Expand All @@ -24,5 +24,5 @@ export default tseslint.config(
{ allowConstantExport: true },
],
},
},
}
);
14 changes: 7 additions & 7 deletions frontend/src/components/PasswordTextField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
}) => {
const validatePasswordError = (
passwordVal: boolean,
password: string,
password: string
): boolean => {
return passwordVal
? password.length < 8 ||
Expand All @@ -44,7 +44,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
const comparePasswordError = (
isMatch: boolean,
password: string,
passwordToMatch: string | undefined,
passwordToMatch: string | undefined
): boolean => {
return isMatch ? password != passwordToMatch : false;
};
Expand All @@ -65,7 +65,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
validatePasswordError(passwordVal, password) ||
comparePasswordError(isMatch, password, passwordToMatch) ||
checkEmptyError(password)
),
)
);
}, [passwordVal, isMatch, password, passwordToMatch, setValidity]);

Expand All @@ -74,13 +74,13 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
const handleClickShowPassword = () => setShowPassword((show) => !show);

const handleMouseDownPassword = (
event: React.MouseEvent<HTMLButtonElement>,
event: React.MouseEvent<HTMLButtonElement>
) => {
event.preventDefault();
};

const handleMouseUpPassword = (
event: React.MouseEvent<HTMLButtonElement>,
event: React.MouseEvent<HTMLButtonElement>
) => {
event.preventDefault();
};
Expand All @@ -93,7 +93,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
validatePasswordError(passwordVal, val) ||
comparePasswordError(isMatch, val, passwordToMatch) ||
checkEmptyError(val)
),
)
);
};

Expand Down Expand Up @@ -156,9 +156,9 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
>
Password must contain at least 1 digit
</FormHelperText>
{/*eslint-disable-next-line no-useless-escape*/}
<FormHelperText
sx={(theme) => ({ color: theme.palette.success.main })}
// eslint-disable-next-line no-useless-escape
error={!/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(password)}
>
Password must contain at least 1 special character
Expand Down

0 comments on commit ce30232

Please sign in to comment.