EunKangChoi-Dyphi / potential-403-nestjs

Trazzle - 비사이드 포텐셜 403 팀레포
2 stars 1 forks source link

:art: Fix: prettierc 생성 및 적용 #33

Closed EunKangChoi-Dyphi closed 3 months ago

EunKangChoi-Dyphi commented 3 months ago

맞춰야할 주제

.prettierrc 파일

{
  "singleQuote": false,
  "trailingComma": "all",
  "endOfLine": "auto",
  "semi": true,
  "printWidth": 80,
  "arrowParens": "avoid"
}

eslintrc.js

module.exports = {
  parser: "@typescript-eslint/parser",
  parserOptions: {
    project: "tsconfig.json",
    tsconfigRootDir: __dirname,
    sourceType: "module",
  },
  plugins: ["@typescript-eslint/eslint-plugin"],
  extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
  root: true,
  env: {
    node: true,
    jest: true,
  },
  ignorePatterns: [".eslintrc.js"],
  rules: {
    "@typescript-eslint/interface-name-prefix": "off",
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/explicit-module-boundary-types": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/ban-ts-comment": "off",
    // semi: ["error", "always"], // 세미콜론을 항상 사용하도록 설정
    // quotes: ["error", "single"], // 싱글 쿼트를 사용하도록 설정
  },
};

package.json 내 prettier 포맷팅 자동적용 명령어

$ npm run format

추후에 husky를 웹훅을 도입할까생각중인데 이것도 좀 알아봐야될거같네여 ;ㅁ;