I have some eslint and prettier config. When I hit ctrl + s to save my code my eslint is trying to format the code like this :
(errors.password
&& (errors.password.type === 'minLength'
|| errors.password.type === 'maxLength') && (
<Styled.Error className="invalidForm">
Password must be more than 6 and less then 32 digits
</Styled.Error>
))
|| (errors.password && (
<Styled.Error className="invalidForm">
Password is required
</Styled.Error>
))
and instantly after that prettier also format code to that:
(errors.password &&
(errors.password.type === 'minLength' ||
errors.password.type === 'maxLength') && (
<Styled.Error className="invalidForm">
Password must be more than 6 and less then 32 digits
</Styled.Error>
)) ||
(errors.password && (
<Styled.Error className="invalidForm">
Password is required
</Styled.Error>
))
I don't want to chage eslint rule, and I don't want to disable prettier format. How could I change the prettier rule for placing logic operators?