Skip to content

Commit

Permalink
[feat] ESLint, Prettier 파일 추가 및 사용하지 않는 dependencies 삭제
Browse files Browse the repository at this point in the history
- ESLint 라고 하는 소스코드 단위 정적 분석 도구를 이용하여 문법 규칙, compiler error 를 잡음
- Prettier를 사용하여 ESLint로는 잡지 못하는 코드 포맷팅을 진행
- package.json에서 사용하지 않는 의존 파일 삭제
  - `cors`, `@mapbox/node-pre-gyp` 사용 안함
  -  `cardinal` mysql2에 helper 안에 있는 필요 파일 같은데 없어도 동작 가능
  - pm2 는 앱에 대한 의존 파일이기 보다는 개발 시 필요한 파일이라 생각되어 devDependencies로 위치 옮김
  • Loading branch information
hyejungg committed Jan 22, 2022
1 parent 2c2a6b7 commit 9e39842
Show file tree
Hide file tree
Showing 4 changed files with 1,885 additions and 625 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": [
"google",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"rules": {
"camelCase" : "warn",
"prettier/prettier": "error",
"no-unused-vars": "warn",
"no-bitwise": "off"
},
"ignorePatterns": [
"node_modules/"
]
}
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
singleQuote: true,
semi: true,
useTabs: false,
tabWidth: 2,
trailingComma: 'all',
printWidth: 80,
arrowParens: 'always',
endOfLine: 'auto',
};
Loading

0 comments on commit 9e39842

Please sign in to comment.