Skip to content

ESLint&Prettier

ํ™์Šน์šฉ edited this page Nov 1, 2021 · 5 revisions
  1. ESLint
  • [FE]
//.eslintrc.js
module.exports = {
  env: {
    browser: true,
    es2021: true,
  },
  parser: '@typescript-eslint/parser',
  extends: [
    'plugin:@typescript-eslint/recommended',
    'plugin:react/recommended',
    'plugin:prettier/recommended',
  ],
  parserOptions: {
    ecmaVersion: 'latest', // Allows for the parsing of modern ECMAScript features
    sourceType: 'module', // Allows for the use of imports
    ecmaFeatures: {
      jsx: true, // Allows for the parsing of JSX
    },
  },
  plugins: ['react', 'react-hooks'],
  rules: {
    'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
    'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
  },
  settings: {
    react: {
      version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
    },
  },
};
  • [BE]
//.eslintrc.js
module.exports = {
  env: {
    node: true,
    es2021: true,
  },
  extends: ['eslint:recommended', 'plugin:prettier/recommended'],
  parserOptions: {
    ecmaVersion: 12,
    sourceType: 'script',
  },
  plugins: [],
  rules: {},
};
  1. Prettier
// .prettierrc.js
module.exports = {
    singleQuote: true,    // ๋ฌธ์ž์—ด์€ ํ™‘๋”ฐ์˜ดํ‘œ๋กœ formatting
    semi: true,           // ์ฝ”๋“œ ๋งˆ์ง€๋ง‰์— ์„ธ๋ฏธ์ฝœ๋ฅธ์ด ์žˆ๊ฒŒ formatting
    useTabs: false,       // ํƒญ์˜ ์‚ฌ์šฉ์„ ๊ธˆํ•˜๊ณ  ์ŠคํŽ˜์ด์Šค๋ฐ” ์‚ฌ์šฉ์œผ๋กœ ๋Œ€์ฒดํ•˜๊ฒŒ formatting
    tabWidth: 2,          // ๋“ค์—ฌ์“ฐ๊ธฐ ๋„ˆ๋น„๋Š” 2์นธ
    trailingComma: 'all', // ๊ฐ์ฒด๋‚˜ ๋ฐฐ์—ด ํ‚ค:๊ฐ’ ๋’ค์— ํ•ญ์ƒ ์ฝค๋งˆ๋ฅผ ๋ถ™ํž˜
    printWidth: 80,      // ์ฝ”๋“œ ํ•œ์ค„์ด maximum 80์นธ
    arrowParens: 'always',// ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๊ฐ€ ํ•˜๋‚˜์˜ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ๋ฐ›์„ ๋•Œ ๊ด„ํ˜ธ๋ฅผ ์ƒ๋žตํ•˜๊ฒŒ formatting
    endOfLine: 'auto',    // windows์— ๋œจ๋Š” 'Delete cr' ์—๋Ÿฌ ํ•ด๊ฒฐ
  };

๐Ÿค ๊ทœ์น™

๐Ÿ“ ๋ช…์„ธ์„œ

  • ๋””์ž์ธ ๋ช…์„ธ์„œ
  • MongoDB Diagram
  • ์ธํ”„๋ผ ๊ตฌ์กฐ
  • ํ”„๋กœ์ ํŠธ ํด๋” ๊ตฌ์กฐ
  • API ๋ช…์„ธ์„œ

    ๐Ÿ—‚ ๋ฐฑ๋กœ๊ทธ

    ๐Ÿ™‹โ€โ™‚๏ธ ํšŒ์˜๋ก

    ๐Ÿƒโ€โ™‚๏ธ ์Šคํ”„๋ฆฐํŠธ

    ๐Ÿ‘ฏโ€โ™€๏ธ ์Šคํฌ๋Ÿผ

    ๐Ÿง‘โ€๐Ÿซ ๋ฉ˜ํ† ๋ง

    ๐Ÿงโ€โ™‚๏ธ ํ”ผ์–ด์„ธ์…˜

    โœ๏ธ ํ•™์Šต ์ž๋ฃŒ

    ๐Ÿš€ ๊ธฐ์ˆ  ์Šคํƒ

    Exibition Notion

    Clone this wiki locally