Skip to content

Commit

Permalink
Env: eslint, prettier 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
seungjun222 committed Sep 11, 2023
1 parent bedf431 commit 2f8a98e
Show file tree
Hide file tree
Showing 4 changed files with 610 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// 전역변수 환경 설정
"env": {
"browser": true,
"es2021": true,
"node": true
},

// npm을 통해 설치한 외부 ESLint 설정 등록 (eslint-config-{name}으로 설치)
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],

// ESLint에 지원할 JavaScript 옵션 설정
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},

// parser 등록
"parser": "@typescript-eslint/parser",

// 사용자 규칙 추가할 플러그인 (eslint-plugin-{name}으로 설치)
"plugins": [
"@typescript-eslint",
"prettier"
],

// 플러그인을 통해 설치한 것 외에 규칙 설정
"rules": {
"prettier/prettier": [
"error", {
"endOfLine": "auto"
}
]
}
}
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true, // 작은 따옴표 사용
"semi": true, // 세미콜론 사용
"tabWidth": 4, // 탭 너비 설정
"trailingComma": "all", // 행 끝에 콤마 사용 설정
"printWidth": 120, // 개행이 일어나는 한 행의 최대 너비
"arrowParens": "always" // 화살표 함수 괄호 설정
}
Loading

0 comments on commit 2f8a98e

Please sign in to comment.