Skip to content

Convention

gijin noh edited this page Jan 10, 2021 · 5 revisions

๐Ÿค— Naming

ํŒŒ์ผ๋ช…

  • ํŒŒ์ผ๋ช…์€ ๊ธฐ๋ณธ์ ์œผ๋กœ PascalCase๋กœ ์ž‘์„ฑํ•œ๋‹ค.
  • ์ปดํฌ๋„ŒํŠธ ํŒŒ์ผ๋ช…๊ณผ style ํŒŒ์ผ๋ช…์€ ๊ฐ™๋‹ค.

์˜ˆ์‹œ: MainPage.js, MainPage.module.scss

๋ณ€์ˆ˜๋ช…

  • ๋ณ€์ˆ˜๋ช…์€ ๊ธฐ๋ณธ์ ์œผ๋กœ camelCase๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • ๊ฐ€๋Šฅํ•œ ๋ช…์‚ฌ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • ๋ณต์ˆ˜์˜ ๊ฒฝ์šฐ ๋ณต์ˆ˜ํ˜• ๋ช…์‚ฌ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • boolean ํ˜•์„ ๊ฐ–๋Š” ๋ณ€์ˆ˜๋Š” ์•ž์— is๋ฅผ ๋ถ™์ธ๋‹ค.

ํ•จ์ˆ˜๋ช…

  • ํ•จ์ˆ˜๋ช…์€ ๊ธฐ๋ณธ์ ์œผ๋กœ camelCase๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • ๊ฐ€๋Šฅํ•œ ๋™์‚ฌ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • ํ•จ์ˆ˜๋ช…์„ ์ถ•์•ฝํ•˜์ง€ ์•Š๋Š”๋‹ค.
  • booleanํ˜•์„ returnํ•˜๋Š” ํ•จ์ˆ˜๋Š” ์•ž์— check๋ฅผ ๋ถ™์ธ๋‹ค.

์Šคํƒ€์ผ

  • ์Šคํƒ€์ผ ์‚ฌ์ด์˜ ๊ตฌ๋ถ„์ž๋Š” -๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

๐Ÿ™„ Issue Conventions

  • Issue ๋‚ด์šฉ์€ Todo-List ํ˜•์‹์œผ๋กœ ์ž‘์„ฑํ•œ๋‹ค.

๐Ÿ‘Š Commit Message Conventions

  • ์ปค๋ฐ‹ ์‹œ ์•„๋ž˜ ๊ทœ์น™์„ ์ฐธ๊ณ ํ•ด ๋ฉ”์„ธ์ง€๋ฅผ ์ž‘์„ฑํ•˜์ž, ์˜์–ด๋กœ ์ž‘์„ฑํ•  ํ•„์š”๋Š” ์—†๋‹ค.

  • issue-number๋Š” Github์˜ issue๋ฅผ ๋ฐœ๊ธ‰ํ•˜๊ณ , ์ƒ์„ฑ๋œ ๋ฒˆํ˜ธ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

[#{issue-number}] feat - (feature)
[#{issue-number}] fix - (bug fix)
[#{issue-number}] refactor - (split package)
[#{issue-number}] docs - (documentation)
[#{issue-number}] style - (formatting, missing semi colons, โ€ฆ)
[#{issue-number}] test - (when adding missing tests)

๐Ÿ˜พ Github branching

  • master
  • dev
  • feature/{issue-number}-{desc..}
  • branch๋Š” camelCase๋กœ ์ž‘์„ฑํ•œ๋‹ค.
  • Pull Request๋Š” Merge ์ „ Reviewer์˜ approve๊ฐ€ ํ•„์š”ํ•˜๋‹ค.
  • feature -> dev -> master

๐Ÿ‘ถ Code

  • VS Code์˜ eslint์™€ prettier extention์„ ํ™œ์šฉํ•œ๋‹ค.
  • ๋ฒ„๊ทธ๊ฐ€ ์žˆ์œผ๋ฉด ์ปค๋ฐ‹ํ•  ์ˆ˜ ์—†๋‹ค.
  • ํ•œ ๋ฉ”์„œ๋“œ์— ์˜ค์ง ํ•œ ๋‹จ๊ณ„์˜ ๋“ค์—ฌ์“ฐ๊ธฐ๋ฅผ ํ•˜๊ธฐ์œ„ํ•ด ๋…ธ๋ ฅํ•œ๋‹ค.
  • else ์˜ˆ์•ฝ์–ด๋Š” ๊ธˆ์ง€ํ•œ๋‹ค.
  • ์ƒ์ˆ˜๋Š” ๋ณ„๋„์˜ ํŒŒ์ผ๋กœ ๋ถ„๋ฆฌํ•ด์„œ ์ž‘์„ฑํ•œ๋‹ค.