01. Commit ์ปจ๋ฒค์…˜

// ๊ตฌ๋ถ„ [์ข…๋ฅ˜] ๋‚ด์šฉ
F [ADD] **ํŒŒ์ผ์— ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€
EF [MOD] ์ผ๋ ‰ํŠธ๋ก  main.js์— **๊ธฐ๋Šฅ ์ˆ˜์ •
  • ๊ตฌ๋ถ„
    • F : FrontEnd
    • B: BackEnd
    • E: Electron
    • A: All
  • ์ข…๋ฅ˜
    • [ADD] : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€, ํ•จ์ˆ˜ ์ถ”๊ฐ€ ๋“ฑ
    • [MOD] : ๊ธฐ์กด ๋‚ด์šฉ์—์„œ ์ˆ˜์ •
    • [FIX] : ๋ฒ„๊ทธ ํ”ฝ์Šค
    • [DEL] : ๊ธฐ์กด ๋‚ด์šฉ ์‚ญ์ œ, ๊ธฐ๋Šฅ ์‚ญ์ œ ๋“ฑ
    • [DOC] : md ์ถ”๊ฐ€, doc ์ถ”๊ฐ€ ๋“ฑ
  • ๋‚ด์šฉ
    • ํ•œ์ค„๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ„๋‹จํ•œ ๋‚ด์šฉ

02. Branch ์ปจ๋ฒค์…˜

// /๋ธŒ๋žœ์น˜์ข…๋ฅ˜/๊ตฌ๋ถ„-๋‚ด์šฉ

/feat/ef-electron-test
/feat/f-ui-develop
/fix/a-debug
/issue/ef-electron-error
  • ๋ธŒ๋žœ์น˜ ์ข…๋ฅ˜
    • /feat : ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ
    • /fix : ์ˆ˜์ •, ๋ฒ„๊ทธ fix
    • /issue : Issue์— ์˜ฌ๋ฆด ๋ธŒ๋žœ์น˜
  • ๊ตฌ๋ถ„
    • f : FrontEnd
    • b : BackEnd
    • e : Electron
    • a : All
  • ๋‚ด์šฉ
    • ํ•œ๋ฒˆ์— ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋Š” ์ง๊ด€์ ์ธ ๋‚ด์šฉ

03. ISSUE ์ปจ๋ฒค์…˜

// MR OPEN
// ๊ตฌ๋ถ„ [์ข…๋ฅ˜] ๋‚ด์šฉ
// ๊ตฌ๋ถ„์— ํ•ด๊ฒฐํ• ์‚ฌ๋žŒ์˜ ๊ตฌ๋ถ„์ž๋ฅผ ๋„ฃ์–ด๋‘ 
// ex) F๊ฐ€ B์—๊ฒŒ ์š”์ฒญํ•ด์„œ ํ•ด๊ฒฐํ•ด์•ผํ•จ -> B [REQ] ***์š”์ฒญ -> B์—์„œ ํ•ด๊ฒฐ ํ›„ MR
B [MOD] /analyzer/launch API ๋ณ€๊ฒฝ ์š”์ฒญ
A [ISSUE] Ready์‹œ CPU ์‚ฌ์šฉ๋Ÿ‰ 100%๋˜๋Š” ๋ฌธ์ œ

// Tag๋Š” ์ข…๋ฅ˜์— ๋”ฐ๋ผ ์ž‘์„ฑ
// MR ํ…œํ”Œ๋ฆฟ http://gitlab.mkon/drivingex/drivingex-lm/-/issues/2 ์ฐธ๊ณ 

๊ธฐ์กด
[ ๋‚ด์šฉ ]

์ˆ˜์ •
[ ๋‚ด์šฉ ]

// ์œผ๋กœ MR์„ ๋ณด๋ƒ„

// MR Close
// Openํ•œ MR์— Comment๋ฅผ ๋‚จ๊ธด ํ›„ Close

04. Google Style Guide(js) ์‚ฌ์šฉ

> npx eslint --init

? How would you like to use ESLint? ...
  To check syntax only
  To check syntax and find problems
> To check syntax, find problems, and enforce code style

? What type of modules does your project use? ...
> JavaScript modules (import/export)
  CommonJS (require/exports)
  None of these

? Which framework does your project use? ...
  React
> Vue.js
  None of these

? Does your project use TypeScript? ยป No

? Where does your code run? ...  (Press <space> to select, <a> to toggle all, <i> to invert selection)
โˆš Browser
โˆš Node

? How would you like to define a style for your project? ...
> Use a popular style guide
  Answer questions about your style

? Which style guide do you want to follow? ...
  Airbnb: https://github.com/airbnb/javascript
  Standard: https://github.com/standard/standard
> Google: https://github.com/google/eslint-config-google
  XO: https://github.com/xojs/eslint-config-xo

1. .eslintrc.js ์ˆ˜์ •

// eslintrc.js

module.exports = {
  env: {
    browser: true,
    es2021: true,
    node: true,
  },
  extends: ["plugin:vue/vue3-essential", "google"],
  overrides: [],
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
  },
  plugins: ["vue"],
  rules: {
    requireJsdoc: false,
  },
};

// prettier ๋ž‘ ์ถฉ๋Œ ์‹œ ์šฐ์„  ์ˆœ์œ„ ์„ค์ •

// npm install eslint-plugin-prettier eslint-config-prettier --save-dev

//{
//    plugins: ["prettier"],
//    extends: ["plugin:prettier/recommended"],
//    rules: {
//        "prettier/prettier": "error"
//    }
//}

2. Prettier ์„ค์น˜

npm install --save-dev --save-exact prettier

์ดํ›„ .prettierrc.js ํŒŒ์ผ ์ตœ์ƒ์œ„์— ์ƒ์„ฑ

// .prettierrc.js

module.exports = {
  arrowParens: "always", // ํ™”์‚ดํ‘œ ํ•จ์ˆ˜ ๊ด„ํ˜ธ ์‚ฌ์šฉ ๋ฐฉ์‹
  bracketSpacing: false, // ๊ฐ์ฒด ๋ฆฌํ„ฐ๋Ÿด์—์„œ ๊ด„ํ˜ธ์— ๊ณต๋ฐฑ ์‚ฝ์ž… ์—ฌ๋ถ€
  endOfLine: "if", // EoF ๋ฐฉ์‹, OS๋ณ„๋กœ ์ฒ˜๋ฆฌ ๋ฐฉ์‹์ด ๋‹ค๋ฆ„
  htmlWhitespaceSensitivity: "css", // HTML ๊ณต๋ฐฑ ๊ฐ๋„ ์„ค์ •
  jsxBracketSameLine: false, // JSX์˜ ๋งˆ์ง€๋ง‰ `>`๋ฅผ ๋‹ค์Œ ์ค„๋กœ ๋‚ด๋ฆด์ง€ ์—ฌ๋ถ€
  jsxSingleQuote: true, // JSX์— singe ์ฟผํ…Œ์ด์…˜ ์‚ฌ์šฉ ์—ฌ๋ถ€
  printWidth: 80, //  ์ค„ ๋ฐ”๊ฟˆ ํ•  ํญ ๊ธธ์ด
  proseWrap: "never", // markdown ํ…์ŠคํŠธ์˜ ์ค„๋ฐ”๊ฟˆ ๋ฐฉ์‹ (v1.8.2)
  quoteProps: "as-needed", // ๊ฐ์ฒด ์†์„ฑ์— ์ฟผํ…Œ์ด์…˜ ์ ์šฉ ๋ฐฉ์‹
  semi: true, // ์„ธ๋ฏธ์ฝœ๋ก  ์‚ฌ์šฉ ์—ฌ๋ถ€
  singleQuote: true, // single ์ฟผํ…Œ์ด์…˜ ์‚ฌ์šฉ ์—ฌ๋ถ€
  tabWidth: 2, // ํƒญ ๋„ˆ๋น„
  trailingComma: "all", // ์—ฌ๋Ÿฌ ์ค„์„ ์‚ฌ์šฉํ•  ๋•Œ, ํ›„ํ–‰ ์ฝค๋งˆ ์‚ฌ์šฉ ๋ฐฉ์‹
  useTabs: false, // ํƒญ ์‚ฌ์šฉ ์—ฌ๋ถ€
  vueIndentScriptAndStyle: false, // Vue ํŒŒ์ผ์˜ script์™€ style ํƒœ๊ทธ์˜ ๋“ค์—ฌ์“ฐ๊ธฐ ์—ฌ๋ถ€ (v1.19.0)
  requirePragma: false, // ํŒŒ์ผ ์ƒ๋‹จ์— ๋ฏธ๋ฆฌ ์ •์˜๋œ ์ฃผ์„์„ ์ž‘์„ฑํ•˜๊ณ  Pragma๋กœ ํฌ๋งทํŒ… ์‚ฌ์šฉ ์—ฌ๋ถ€ ์ง€์ • (v1.8.0)
  insertPragma: false, // ๋ฏธ๋ฆฌ ์ •์˜๋œ @format marker์˜ ์‚ฌ์šฉ ์—ฌ๋ถ€ (v1.8.0)
};

3. extentions

image image image image image image image image image image


3.1 ์ถ”์ฒœํ™•์žฅ

image

05. Naming Convention

๋ชจ๋“  ๊ทœ์น™์€ google js style guide์™€ vue.js style guide ๋ฅผ ์ฐธ์กฐํ•˜๊ณ  ๋”ฐ๋ฆ„

Naming

  1. Package names: lowerCamelCase ex) my.exampleCode.deepSpace
  2. Class names: UpperCamelCase ex) ImmutableList
  3. Method names: lowerCamelCase ex) setFoo(value)
  4. Constant names: CANSTANT_CASE
  5. Non-constant field names: lowerCamelCase ex) computedValues
  6. Parameter names: lowerCamelCase
  7. Local variable names: lowerCamelCase

By Vue

https://v2.vuejs.org/v2/style-guide/?redirect=true#Priority-B-Rules-Strongly-Recommended-Improving-Readability ์ฐธ์กฐ, B ๊นŒ์ง€ ๊ผญ ์ง€์ผœ์•ผ

ํƒœ๊ทธ:

์นดํ…Œ๊ณ ๋ฆฌ:

์—…๋ฐ์ดํŠธ:

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ