dev-yakuza / dev-yakuza.github.io

8 stars 9 forks source link

React Native에서 ESLint, Prettier를 프로처럼 사용하기 - React Native 프로젝트에 ESLint와 Prettier를 적용하는 방법과 Husky, lint-staged로 프로처럼 사용하는 방법에 대해서 알아봅니다. #21

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

React Native에서 ESLint, Prettier를 프로처럼 사용하기 - React Native 프로젝트에 ESLint와 Prettier를 적용하는 방법과 Husky, lint-staged로 프로처럼 사용하는 방법에 대해서 알아봅니다.

React Native 프로젝트에 ESLint와 Prettier를 적용하는 방법과 Husky, lint-staged로 프로처럼 사용하는 방법에 대해서 알아봅니다.

https://dev-yakuza.posstree.com/ko/react-native/eslint-prettier-husky-lint-staged/

salgilbarana commented 3 years ago

npm install --save-dev eslint-plugin-react @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-react-hooks 를 설치시

npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: switchwon@0.0.1 npm ERR! Found: @typescript-eslint/eslint-plugin@3.10.1 npm ERR! node_modules/@typescript-eslint/eslint-plugin npm ERR! @typescript-eslint/eslint-plugin@"^3.1.0" from @react-native-community/eslint-config@2.0.0 npm ERR! node_modules/@react-native-community/eslint-config npm ERR! dev @react-native-community/eslint-config@"^2.0.0" from the root project npm ERR! dev @typescript-eslint/eslint-plugin@"" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev @typescript-eslint/eslint-plugin@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: @typescript-eslint/parser@4.29.0 npm ERR! node_modules/@typescript-eslint/parser npm ERR! peer @typescript-eslint/parser@"^4.0.0" from @typescript-eslint/eslint-plugin@4.29.0 npm ERR! node_modules/@typescript-eslint/eslint-plugin npm ERR! dev @typescript-eslint/eslint-plugin@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /Users/yunchanghyeon/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/yunchanghyeon/.npm/_logs/2021-08-06T16_58_55_024Z-debug.log

에러가 발생하네요 해결해보신적 있으신가요>?

dev-yakuza commented 3 years ago

@salgilbarana

해결해 보지는 않았습니다만,

npm WARN old lockfile The package-lock.json file was created with an old version of npm,

라고나와있으니, package-lock.json파일과 node_modules 폴더를 삭제한 후, 다시 설치해보시면 어떨까요?

salgilbarana commented 3 years ago

잘되네요 감사합니다. :))

dev-yakuza commented 3 years ago

@salgilbarana 해결되셨다니 다행입니다!