Frontend
etc
- Coding Convention
-
React folder Structure
/SomeComponent or page folder ├── index.js ├── SomeComponent.tsx ├── SomeComponent.constant.tsx ├── SomeComponent.type.tsx └── SomComponent.style.ts /SomeComponent2 or page folder ├── index.js ├── SomeComponent2.tsx ├── SomeComponent2.constant.tsx ├── SomeComponent2.type.tsx └── SomComponent2.style.ts
-
prettier
{ "arrowParens": "avoid", "bracketSpacing": true, "htmlWhitespaceSensitivity": "css", "insertPragma": false, "jsxBracketSameLine": false, "jsxSingleQuote": false, "printWidth": 80, "proseWrap": "preserve", "quoteProps": "as-needed", "requirePragma": false, "semi": true, "singleQuote": false, "tabWidth": 2, "trailingComma": "none", "useTabs": false }
-
Camel Case
lectureHall; lastName;
-
타입 관리
- 전역적으로 재사용될 타입:
src/@types/index.d.ts
에서declare
하여 정리(import, export 필요 없음) - 단 하나의 컴포넌트에만 쓰이는 타입은 해당 파일 내부에 선언해도 무관
- 타입 선언 방식: interface(대부분의 타입) + type alias(원시 타입)
- 타입은 별다른 prefix가 없고 props를 선언한다면 Props 그 자체로 의미가 통용된다면
Props
로 명명합니다.
feat: 새로운 기능에 대한 커밋
hotfix: main 및 develop 브랜치에 대한 급한 이슈 해결
fix: 버그 수정에 대한 커밋
chore: 그 외 자잘한 수정에 대한 커밋
refactor: 코드 리팩토링에 대한 커밋 (코드 퀄리티 개선)
This is an example of how to list things you need to use the software and how to install them.
- we use yarn berry for zero-install
yarn install yarn start
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Clone the repo
git clone https://github.com/cnu-bot/cnubot-admin.git
- Install NPM packages both client and server
yarn install
- start your web
yarn start
- test your web
yarn test
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/AmazingFeature
) we have our convention - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request (we have our PR templates)
Chanhyuk Park - GitHub - chanhyuk-tech@kakao.com
Project Link: cnubot-admin