Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chores: add eslint rules #12

Merged
merged 5 commits into from
Jan 9, 2024
Merged

chores: add eslint rules #12

merged 5 commits into from
Jan 9, 2024

Conversation

cyLee1111
Copy link
Contributor

eslint rules 추가

  • react/function-component-definition
  • arrow-body-style
  • react/prop-types

@cyLee1111 cyLee1111 added the chore Trivial tasks label Jan 9, 2024
Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
majorfolio-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2024 11:38pm

@algoORgoal
Copy link
Contributor

수정 사항

package-lock.json, yarn-lock.json 등 package manager-specific한 파일은 .gitignore에 추가하여 커밋에서 제외시켰습니다.

버그 원인

create-react-app으로 react app을 세팅했을 경우 typescript 5 버전을 포함하지 않습니다. 따라서 npm으로 실행할 경우에는 버전 미스매칭으로 에러가 발생합니다. 반면, yarn에서는 정확한 원인은 규명하지 못했지만 제대로 실행이 됩니다. CRA를 무시하고 명시한 version으로 overriding 해주는 것으로 보입니다.
facebook/create-react-app#13071

추후 개발 플로우 수정

vercel에서 말하길, lock file을 확인해서 package manager를 선택하고, 이를 통해 빌드를 진행한다고 합니다. lock file이 없을 경우에는 yarn 또는 pnpm으로 package manager가 지정이 됩니다. 따라서 커밋을 할 때 lock file을 제외하고 진행하기를 부탁드립니다.

예시 1

  1. package-lock.json을 프로젝트 디렉토리에서 발견한다.
  2. npm으로 build 실행

예시 2

  1. lock file이 프로젝트 내에 존재하지 않는다.
  2. yarn으로 build 실행

lock file
.gitignore에 package-lock.json을 추가했습니다.

https://vercel.com/docs/deployments/builds/package-managers

@algoORgoal algoORgoal closed this Jan 9, 2024
Copy link
Contributor

@algoORgoal algoORgoal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vercel deployment을 local cli에서를 build해보기 위해서 .vercel도 .gitignore에 추가했습니다.

@algoORgoal algoORgoal reopened this Jan 9, 2024
Copy link
Contributor

@algoORgoal algoORgoal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@algoORgoal algoORgoal merged commit 8c69595 into main Jan 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Trivial tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants