Skip to content

coding convention

Hyeona edited this page Apr 13, 2022 · 1 revision
  • ๋ฐฑ์—”๋“œ
    • ํŒŒ์ผ๋ช…: PascalCase (ex: UserRepository)
    • ํŒจํ‚ค์ง€๋ช…: ์†Œ๋ฌธ์ž
    • ํด๋ž˜์Šค: PascalCase (ex : ClassName)
    • ๋ณ€์ˆ˜: camelCase (ex : getId, userPassword)
    • ๋ฉ”์†Œ๋“œ : camelCase (ex : getId, userPassword)
    • ์ƒ์ˆ˜: snake_case (ex: FILE_NUMBER)

  • ํ”„๋ก ํŠธ์—”๋“œ
    • ๋ณ€์ˆ˜: camelCase
    • ํ•จ์ˆ˜: camelCase (ex. const functionName= function () {})
    • ์ƒ์ˆ˜: SNAKE_CASE
    • vue ํŒŒ์ผ๋ช…: PascalCase
    • js ํŒŒ์ผ๋ช…: kebab-case
    • template๊ตฌ์กฐ
      • router: PascalCase
    • style๊ตฌ์กฐ
      • css ํด๋ž˜์Šค: kebab-case
      • css ์Šคํƒ€์ผ ๊ฐ€์ด๋“œ: https://code-study.tistory.com/18
        • ์„ ํƒ์ž, ์†์„ฑ ์ „๋ถ€ ์•ŒํŒŒ๋ฒณ ์ˆœ์„œ
    • script๊ตฌ์กฐ(์ดํ•˜ ๋ฆฌ์ŠคํŠธ ์ˆœ์„œ๋Œ€๋กœ ์ž‘์„ฑ)
      • name
      • components
      • props
      • data : ๋‹จ์ผ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์œ„์— ๋ช…์‹œ, form ๊ตฌ์กฐ๋ฅผ ํ•˜์œ„์— ๋ช…์‹œ
      • methods
      • Life Cycle Hook ์ˆœ์„œ (beforeCreate โ†’ created โ†’ beforeMount โ†’ mounted โ†’ beforeUpdate โ†’ updated โ†’ beforeDestroy โ†’ destroyed)