[eslint] ERROR

Miog Yang·2022년 12월 13일

개발하면서 나를 힘들게 하는 eslint
정리해서 익숙해지자!

Expected closing tag to match indentation of opening

=> 시작태그와 닫힘 태그가 일치해야한다.

나쁜예

<div>
     .....
  </div>

올바른 예

<div>
     .....
</div>

Expected indentation of 4 spaces but found 8

Expected indentation of (들여쓰기 가능 숫자) spaces but found (현재 들여쓰기 숫자)

=> 들여쓰기 가능 숫자 초과시 생기는 에러
들여쓰기 가능 숫자만큼 수정하면 해결

Expected space(s) after "return"

return(
        <>
             ...
        </>
      )

return과 ( 사이에 여백이 없을때의 에러
올바른 예

return (
       <>
            ...
       </>
     )

Missing semicolon

=> 세미클론이 빠질때 나오는 에러
세미클론을 적용하여 해결

profile
주니어 개발사전 & 프론트엔드 도전기

0개의 댓글