ESLint import/no-unresolved

긴가민가·2023년 1월 18일
0

ESLint Issue

목록 보기
1/2

문제 사항

Typescript alias path 설정 후 import를 할 때, ESlint에서는 해당 경로를 인식하지 못해서 에러가 발생합니다.

해결 방안

eslint-import-resolver-typescript 설치

eslint-import-resolver-typescript를 설치하면 문제 해결이 가능합니다.

$ npm i -D eslint-import-resolver-typescript

ESlint.json 수정

eslint.json을 아래와 같이 수정합니다.

{
  "settings": {
    "import/resolver": {
      "typescript": {}
    }
  }
}

🚨 참고사항
해당 출처예요.🧐 eslint-plugin-import Github issue


의견은 언제든 댓글로 남겨주세요. 🙂

profile
미래의 내가 참고하려고 모아가는 중 :)

0개의 댓글