Skip to content

๐Ÿ‘ฉโ€๐Ÿ’ป Coding Convention

์กฐ์ฐฌ์˜ edited this page Nov 16, 2020 · 4 revisions

์ฝ”๋”ฉ ์ปจ๋ฒค์…˜

import ๊ทœ์น™

  • ์™ธ๋ถ€ ๋ชจ๋“ˆ๊ณผ ๋‚ด๋ถ€๋ชจ๋“ˆ์„ ๊ตฌ๋ถ„ํ•˜์—ฌ ์‚ฌ์šฉํ•œ๋‹ค. ์™ธ๋ถ€๋ชจ๋“ˆ๊ณผ ๋‚ด๋ถ€๋ชจ๋“ˆ ์„ ์–ธ์‹œ ๊ณต๋ฐฑ์œผ๋กœ ๊ตฌ๋ถ„ํ•œ๋‹ค. ๋‚ด๋ถ€๋ชจ๋“ˆ์˜ ๊ฒฝ์šฐ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ชจ๋“ˆ๊ณผ ์ƒ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ชจ๋“ˆ์„ ์ถ”๊ฐ€๋กœ ๊ตฌ๋ถ„ํ•œ๋‹ค.
import axios from 'axios'; 

import router from '@service/router'

import util from './util'

๋ณ€์ˆ˜, ํ•จ์ˆ˜, ํด๋ž˜์Šค ๋ช…๋ช… ๊ทœ์น™

  • ํŒŒ์ผ๋„ค์ด๋ฐ

    • ์ปดํฌ๋„ŒํŠธ โ†’ PascalCase
    • ์™ธ โ†’ cammelCase
  • ์ƒ์ˆ˜ โ†’ SNAKE_CASE

  • ํ•จ์ˆ˜ ๋ฐ ๋ณ€์ˆ˜ โ†’ cammelCase

  • ์ปดํฌ๋„ŒํŠธ โ†’ PascalCase

  • ์ฐฝ์˜์ ์ธ ๋‹จ์–ด ์“ฐ์ง€ ์•Š๊ธฐ ๐Ÿ˜ (์ œ์ผ ๋– ์˜ค๋ฅด๊ธฐ ์‰ฝ๊ณ  ๊ธฐ๋ณธ์ ์ธ ๋‹จ์–ด)

  • ๋ณ€์ˆ˜๋Š” ๋ช…์‚ฌํ˜•์œผ๋กœ ์ž‘์„ฑ

  • ํ•จ์ˆ˜๋Š” ์„œ์ˆ ํ˜•์œผ๋กœ ์ž‘์„ฑ

๊ธฐํƒ€ ์ฝ”๋”ฉ ๊ทœ์น™

  • htmlํƒœ๊ทธ ์„ ์–ธ ์‹œ ์ตœ๋Œ€ํ•œ ์‹œ๋ฉ˜ํ‹ฑํ•œ ํƒœ๊ทธ ์‚ฌ์šฉ
  • ๋ชจ๋‘๊ฐ€ approve ํ•œ ํ›„์— merge ํ•  ์ˆ˜ ์žˆ๋‹ค
  • ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋Š” ํ•„์ˆ˜! ๊ผญ ํ™•์ธํ•˜๊ธฐ! ๐Ÿ˜ 
  • html id + className์€ snake_case๋กœ ํ•œ๋‹ค.

eslint & prettier

  • ๊ธฐ๋ณธ์ ์œผ๋กœ eslint airbnb๋ฅผ ๋”ฐ๋ฅธ๋‹ค
  • ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์€ ๋ฃฐ์ด ์žˆ์„ ๊ฒฝ์šฐ ์˜๊ฒฌ์„ ์ œ์‹œํ•ด์„œ ๋…ผ์˜ ํ›„์— ๋ฐ˜์˜ ํ•  ์ˆ˜ ์žˆ๋‹ค

eslint

module.exports = {
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint', 'react-hooks'],
  extends: [
    'airbnb-base',
    'plugin:react/recommended',
    'plugin:jsx-a11y/recommended',
    'plugin:import/errors',
    'plugin:import/warnings',
    'plugin:prettier/recommended',
    'plugin:@typescript-eslint/recommended',
  ],
  rules: {
    'linebreak-style': 0,
    'import/prefer-default-export': 0,
  },
  settings: {
    'import/resolver': {
      node: {
        extensions: ['.js', '.jsx', '.ts', '.tsx'],
      },
    },
  },
};

prettier

{
  "singleQuote": true,
  "parser": "typescript",
  "semi": true,
  "useTabs": false,
  "tabWidth": 2,
  "trailingComma": "all",
  "printWidth": 100,
  "arrowParens": "always"
}

๐Ÿ“† Planning

๐Ÿ‘จโ€๐Ÿ’ป Agile Process

Daily Scrum
์ฃผ์ฐจ๋ณ„ ํšŒ๊ณ 
์ฃผ์ฐจ๋ณ„ ํ”ผ์–ด์„ธ์…˜
๊ธฐ์ˆ ๊ด€๋ จ ๋‚ด์šฉ ๋…ผ์˜
๋ฉ˜ํ† ๋‹˜๊ณผ์˜ ๋‘๊ทผ๋‘๊ทผ ๋ฏธํŒ…

๐Ÿ“š Ground Rule

Clone this wiki locally