Skip to content

Commit d918c51

Browse files
authored
Merge pull request #17 from codeit-sprint-part3-6team/#16_Prettier-Lint-추가
📝 Prettier, Lint 추가
2 parents 2845957 + 00ba226 commit d918c51

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.eslintrc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"settings": {
8+
"import/resolver": {
9+
"node": {
10+
"extensions": [".js", ".jsx", ".ts", ".tsx"] // 확장자 에러 표시 x
11+
}
12+
}
13+
},
14+
"extends": [
15+
"prettier",
16+
"airbnb",
17+
"airbnb-typescript",
18+
"next/core-web-vitals",
19+
"eslint:recommended", // 추천 규칙 적용
20+
"plugin:react/recommended",
21+
"plugin:prettier/recommended",
22+
"plugin:@typescript-eslint/recommended"
23+
],
24+
"parser": "@typescript-eslint/parser",
25+
"parserOptions": {
26+
"ecmaVersion": "latest",
27+
"sourceType": "module",
28+
"project": "./tsconfig.json"
29+
},
30+
"plugins": ["@typescript-eslint", "react", "prettier"],
31+
"rules": {
32+
"react/react-in-jsx-scope": "off",
33+
"react/jsx-props-no-spreading": "off",
34+
"prettier/prettier": "error" // 써보고 쓸데없는 오류가 발생할 경우 직접 설정
35+
}
36+
}

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"useTabs": false,
5+
"tabWidth": 2,
6+
"trailingComma": "all",
7+
"printWidth": 80,
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "lf"
11+
}

src/pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Html, Head, Main, NextScript } from "next/document";
1+
import { Html, Head, Main, NextScript } from 'next/document';
22

33
export default function Document() {
44
return (

0 commit comments

Comments
 (0)