margaritahumanitarian / helpafamily

Avoid use of == and != JS-0050
Anti-pattern
Minor
3 years ago3 years old
Expected '===' and instead saw '=='
 59  };
 60
 61  const handleBackButtonClick = () => {
 62    if (surveyPointer == 0) { 63      previousComponent();
 64    }
 65
Expected '!==' and instead saw '!='
 36
 37  const SubmitCheck = () => {
 38    if (
 39      answers[questions.length - 1] != '' && 40      surveyPointer === questions.length - 1
 41    ) {
 42      submitData();
Expected '!==' and instead saw '!='
1export function isAvailable(value) {
2  return (
3    value != null ||
4    value != undefined ||5    (typeof value === 'string' && value.strip() != '')
6  );
7}
Expected '!==' and instead saw '!='
1export function isAvailable(value) {
2  return (
3    value != null ||4    value != undefined ||
5    (typeof value === 'string' && value.strip() != '')
6  );
Expected '!==' and instead saw '!='
2  return (
3    value != null ||
4    value != undefined ||
5    (typeof value === 'string' && value.strip() != '')6  );
7}