Skip to content

Commit

Permalink
Merge pull request #10760 from qmonmert/reacteslint2
Browse files Browse the repository at this point in the history
React/ESLint: enable some rules
  • Loading branch information
murdos authored Sep 4, 2024
2 parents 05dc745 + 4722cf1 commit 7f438c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export default typescript.config(
},
rules: {
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
'checksVoidReturn': false
}
],
},
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const LoginModal = ({ open, onClose }: LoginModalType) => {

const toggleVisibility = () => setIsVisible(!isVisible);

const onSubmit = (loginData: LoginFunctionType) => {
const onSubmit = async (loginData: LoginFunctionType) => {
if (loginData.username && loginData.password) {
login({ ...loginData, setUsername, setToken });
await login({ ...loginData, setUsername, setToken });
setError(false);
onClose();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const login = ({ username, password, rememberMe, setUsername, setToken }:
password,
rememberMe,
})
.then(response => {
.then((response: { data: { id_token: string }}) => {
setLocalStorage('token', response.data.id_token);
setLocalStorage('username', username);
setUsername(username);
Expand Down

0 comments on commit 7f438c1

Please sign in to comment.