-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: eslint setting, font setting #103
Conversation
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting ๊ด๋ จํด์ ๊ณต๋ถํ ์ ์๋ pr์ธ ๊ฒ ๊ฐ์์~
์ธ์จ๋ ์ต๊ณ :>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ ์ฐ๋ฆฌ๊ฐ eslintrc.json ํ์ผ ์ธํ ์ด ์ ๋๋ก ์๋์ด์์๊ตฐ์!?
์ด ๋ถ๋ถ์ ์ด๋ป๊ฒ ๋ค์ ์ธํ ์ ํ์ ๊ฑด๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณต์๋ฌธ์์
EsLint ์ค์ ์ํฐํด
์ ์ฐธ๊ณ ํด์ ์ถ๊ฐํ์ด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next.config ๊ด๋ จํด์ ๊ด์ฐฎ์ ์ํฐํด์ด ์์ด ๊ณต์ ํฉ๋๋ค~
https://han-py.tistory.com/503
@@ -1,5 +1,9 @@ | |||
/** @type {import('next').NextConfig} */ | |||
const nextConfig = { | |||
reactStrictMode: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ ๊ฒ ์ค์ ํ๊ฒ ๋๋ฉด react์์ ๊ด๋ จ ๋ถ๋ถ์ ์์ด์ <React.StrictMode>๋ฅผ ํ ๊ฑฐ๋ ๋ง์ฐฌ๊ฐ์ง๊ตฐ์!
React.StrictMode : application ๋ด์์ ๋ฌธ์ ๊ฐ ์ผ์ด๋ ์ ์๋ ๋ถ๋ถ์ ๋ํ ๊ฒฝ๊ณ ๋ฅผ ์๋ ค์ฃผ๋ ๊ธฐ๋ฅ
@@ -1,5 +1,9 @@ | |||
/** @type {import('next').NextConfig} */ | |||
const nextConfig = { | |||
reactStrictMode: true, | |||
eslint: { | |||
ignoreDuringBuilds: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋น๋ ์์ eslint๋ฅผ ๋ฌด์ํ๋ ์ค์ ์ด๊ตฐ์!
๊ฐ์๊ธฐ ๊ถ๊ธํด์ง ๊ฒ..
์ด ์ธํ
์ true๋ก ํ๋ ๊ฒ ๋ณดํธ์ ์ธ ๊ฒ ๊ฐ๋๋ฐ, ํ๋ก์ ํธ ๊ด๋ฆฌ?์ธก๋ฉด์์ ๋ณด๋ฉด ์ด ์ค์ ์ ํค๋ ๊ฒ ๋์ ๊ฑด์ง ๋๋ ๊ฒ ๋์ ๊ฑด์ง ๊ถ๊ธํ๋ค์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ ์๊ฐ์๋ ์ ํ์ธ ๊ฒ ๊ฐ์๋ฐ ์ผ๋จ ์ฐ๋ฆฌ ํ๋ก์ ํธ์ error๊ฐ ๋๋ฌด ๋ง์์ ์์๋ก ์ถ๊ฐํด๋์ด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ฑฐ๋ ์ ๋ ํญ์๊บผ๋๋๋ฐ์~ ์ ignoreDuringBuilds
next.js์ eslint๋ฃฐ์ด ๋ฐ๋ก ์กด์ฌํ๋๋ฐ ํด๋น ๋ฃฐ์ด ์ ํฌ๊ฐ eslint๋ฃฐ ์ธํ
ํด๋๊ฑฐ์ ๋ค๋ฅธ ๊ฒฝ์ฐ ๋ฃฐ์ด ์ค๋ณต๋๊ธฐ ๋๋ฌธ์ ์๋ฌ๊ฐ ๋ฐ์ํด์ ์ง๊ธ์ฒ๋ผ ๋ฐ๋ก eslin๋ฃฐ์ ๊ฐ์ ธ๊ฐ๋ ๊ฒฝ์ฐ์๋ ๊บผ๋๋๊ฒ ์ข์ต๋๋ค~
์๊ทธ๋ฌ๋ฉด ๋น๋์ ํญ์ ์คํจํฉ๋๋ค~
package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ด๋ จ ์ํฐํด ๊ณต์ ํฉ๋๋น!
- https://velog.io/@kimconut/package.json%EC%9D%98-dependencies%EC%99%80-devdependencies%EC%9D%98-%EC%B0%A8%EC%9D%B4
- https://80000coding.oopy.io/fb570d89-1874-424c-b0d2-5cf2bada3867
- https://www.codeit.kr/community/questions/UXVlc3Rpb246NjBlNmQwN2I2ZjU1NDAxYWEyNzAyYjE1
ํ์ ํ ๋ ๋น๋ ์๊ฐ์ด ๊ฝค ๊ธธ์ด ๊ณ ๋ฏผ์ด์๋๋ฐ,,
์น๋ฏผ๋์ด ๋ถ๋ฆฌํ๋ผ๊ณ ํ์ ์ด์ ๊ฐ ์ ๋์์๋ค์~ :>
tsconfig.json
Outdated
@@ -7,7 +7,7 @@ | |||
"noEmit": true, | |||
"esModuleInterop": true, | |||
"module": "esnext", | |||
"moduleResolution": "bundler", | |||
"moduleResolution": "Node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ .. ์๋ ๋งํฌ๋ฅผ ๊น๊ฒ ๋ณด์ง ๋ชปํ์ง๋ง ์ด ๋ด์ฉ ๊ด๋ จํด์ ์ ์ดํด๊ฐ ์๊ฐ๋ค์
ํน์ bundler์์ Node๋ก ์์ ๋ ์ด์ ๊ฐ ์์๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋๋ฒ์งธ ์ํฐํด๊ณผ ๊ฐ์ ๊ฒฝ์ฐ์์ต๋๋ค ๋ค์ bundler๋ก ์์ ํ์ด์~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"moduleResolution": "bundler"
์ต์
์ด ์ถ๊ฐ๋ pr
src/util/fonts.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localFont์ ๋ํด ๊น๊ฒ ํ๋ฒ ๋ด์ผ๊ฒ ์ด์!
weight ๊ด๋ จ ๋ฌธ์ ๋ ํ์ ๋ ํ๋ฒ ์๊ธฐํด๋ด์~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint ๋ฃฐ ์ธํ
๊ด๋ จํด์ ์ ๊ฐ ๋์ค์ ์ค๋ช
๋๋ ค๋ ์ข์ ๊ฒ ๊ฐ๋ค์! ใ
ใ
์ธํ
์ ์ ํ์ ๊ฒ ๊ฐ์์~! ์ด์ ์ถ๊ฐ์ ์ผ๋ก ๋ฃฐ์ ์ผ๊ณ ์ฝ๋ ์์ ํด๋๊ฐ๋ฉด ๋ ๊ฒ ๊ฐ์์!
๊ทธ๋ฆฌ๊ณ save auto fix๋ฅผ ์ค์ ์ํด๋์ ๊ฒ ๊ฐ์๋ฐ~ ์๊ฑฐ๋ ๊ฑฐ์ ํ์๋ก ํด๋์ธ์!
์ง๊ธ์ yarn lint ์คํฌ๋ฆฝํธ๋ฅผ ๋๋ ค์ผ๋งํ๋ ๋ฒ๊ฑฐ๋ก์์ด ์์ง๋ง, ์ด ๊ณผ์ ์ ํ์ผ ์ ์ฅ์ ์๋์ผ๋ก lint ์ฒดํฌ ํ ์์ ๊น์ง ํด์ค๋ต๋๋ค~
vscode์ settings.json์์ ์์ ์ด ๊ฐ๋ฅํฉ๋๋ค~
https://www.digitalocean.com/community/tutorials/workflow-auto-eslinting
์๊ฑด ์ ๊ฐ ํญ์ ์ฌ์ฉํ๋ eslint rule์ ํจํค์งํํด๋๊ฑด๋ฐ eslint๋ฃฐ ์ธํ ์ฐธ๊ณ ํด์ฃผ์ธ์! ๊ถ๊ธํ๊ฑฐ์์ผ๋ฉด ์ฌ์ญค๋ด์ฃผ์ธ์ฉ!
.eslintrc.json
Outdated
"react/jsx-filename-extension": ["warn", { "extensions": [".ts", ".tsx"] }], | ||
"no-useless-catch": "off" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eol(end of line)์ ๊ผญ ์ ๊ฒฝ์จ์ ๋ฃ์ด์ฃผ์ธ์! ๋ง์ง๋ง์ ๊ฐํ์ ๋ฃ๋๊ฒ posix ๋ช
์ธ์ ์ ์๋์ด์๊ธฐ ๋๋ฌธ์ ๊ผญ ์ ๊ฒฝ์จ์ ๋ฃ์ด์ฃผ์ด์ผํฉ๋๋ค!
์ด์ ๋ ๊ฐ ์ด์์ฒด์ ๋ง๋ค ๊ฐํ ์ฐจ์ด๋ ์กด์ฌํ๊ณ , ๋ง์ง๋ง์ ๊ฐํ์ผ๋ก ๋๋์ง ์์ผ๋ฉด ํด๋น ์ค์ ์ค์ ์ค๋ก ๊ฐ์ฃผํ์ง ์์์ ์ผ๋ถ ํ๋ก๊ทธ๋จ์์๋ ๋ฌธ์๋ก ์ฒ๋ฆฌํ์ง ์์ ์ ์์ด์! (-ํ์๊ฐ ๋ง์ง๋ง์ ๊ฐํ์ฒ๋ฆฌ๊ฐ ์๋ค๋๊ฒ์
๋๋ค~)
3.206 Line
A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
@@ -1,5 +1,9 @@ | |||
/** @type {import('next').NextConfig} */ | |||
const nextConfig = { | |||
reactStrictMode: true, | |||
eslint: { | |||
ignoreDuringBuilds: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ฑฐ๋ ์ ๋ ํญ์๊บผ๋๋๋ฐ์~ ์ ignoreDuringBuilds
next.js์ eslint๋ฃฐ์ด ๋ฐ๋ก ์กด์ฌํ๋๋ฐ ํด๋น ๋ฃฐ์ด ์ ํฌ๊ฐ eslint๋ฃฐ ์ธํ
ํด๋๊ฑฐ์ ๋ค๋ฅธ ๊ฒฝ์ฐ ๋ฃฐ์ด ์ค๋ณต๋๊ธฐ ๋๋ฌธ์ ์๋ฌ๊ฐ ๋ฐ์ํด์ ์ง๊ธ์ฒ๋ผ ๋ฐ๋ก eslin๋ฃฐ์ ๊ฐ์ ธ๊ฐ๋ ๊ฒฝ์ฐ์๋ ๊บผ๋๋๊ฒ ์ข์ต๋๋ค~
์๊ทธ๋ฌ๋ฉด ๋น๋์ ํญ์ ์คํจํฉ๋๋ค~
๐PR Description
์ด์ ๋ฒํธ : #101
๐จ์์ ๋ด์ฉ
๐๊ฒฐ๊ณผ (์ฌ์ง ๋ฐ ์์ ๊ฒฐ๊ณผ)