yarn > pnpm으로 바꾸게 되면서 pnpm에서 ESLint까지 적용을 했다.
1) brew install pnpm
2) pnpm install
3) pnpm run lint를 했는데 아래와 같은 에러가 계속 발생하였다.
Oops! Something went wrong! :(
ESLint: 8.55.0 Error: Your application tried to access @eslint/eslintrc, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: @eslint/eslintrc ~
package.json과 pnpm list로 여러 lint 버전을 확인과 동시에
pnpm install --save-dev eslint@8.45.0 와 같이 필요한 특정 버전을 설치하기도 했는데 위와 같은 에러가 계속 발생하고 있었다.
알고보니, 현재 내 브랜치의 위치가 내가 만든 feature 브랜치에 위치해있었는데
develop 브랜치를 git pull origin develop을 해줌으로써 내가 만든 feature 브랜치와 develop 브랜치와 병합을 해줬는데, develop 브랜치를 pull 해옴으로써 의존성 문제를 해결할 수 있었다.
이런식으로 lint와 관련된 에러가 출력되었는데 lint 관련 에러는 자동으로 fix가 되지 않아 저 경고가 계속 날 것이고, formatter 에러는 자동으로 fix가 된다.
환경설정이 정말 코딩의 반인 것 같다~
'git' 카테고리의 다른 글
develop 추적하는 feature 브랜치 만드는 명령어 (0) | 2023.12.28 |
---|---|
git 병합 중단 방법(커밋 날리지 않았을 때) (0) | 2023.12.11 |
fatal: (현재 폴더 또는 상위 폴더 중 일부가) 깃 저장소가 아닙니다: .git (2) | 2023.12.05 |
hotfix 브랜치를 삭제하고 싶었는데 안되었던 문제 (1) | 2023.12.04 |
error: src refspec 브랜치 이름 does not match any (0) | 2023.11.24 |