Skip to content
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

Merged
merged 10 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .eslintrc.json
Copy link
Member

@chamny20 chamny20 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ—‰ ์šฐ๋ฆฌ๊ฐ€ eslintrc.json ํŒŒ์ผ ์„ธํŒ…์ด ์ œ๋Œ€๋กœ ์•ˆ๋˜์–ด์žˆ์—ˆ๊ตฐ์š”!?

์ด ๋ถ€๋ถ„์€ ์–ด๋–ป๊ฒŒ ๋‹ค์‹œ ์„ธํŒ…์„ ํ•˜์‹  ๊ฑด๊ฐ€์š”?

Copy link
Collaborator Author

@seoyoung81 seoyoung81 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณต์‹๋ฌธ์„œ์™€
EsLint ์„ค์ • ์•„ํ‹ฐํด
์„ ์ฐธ๊ณ ํ•ด์„œ ์ถ”๊ฐ€ํ–ˆ์–ด์š”!

Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
{
"extends": "next/core-web-vitals"
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"parserOptions": {
"project": "./tsconfig.json",
"createDefaultProgram": true
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"ignorePatterns": ["node_modules/"],
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"rules": {
"react/react-in-jsx-scope": "off",
"react/jsx-props-no-spreading": 0,
"@typescript-eslint/semi": "off",
"react/jsx-filename-extension": ["warn", { "extensions": [".ts", ".tsx"] }],
"no-useless-catch": "off"
}
}
4 changes: 4 additions & 0 deletions next.config.mjs
Copy link
Member

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
Copy link
Member

@chamny20 chamny20 Mar 14, 2024

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 ๋‚ด์—์„œ ๋ฌธ์ œ๊ฐ€ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ๋Š” ๋ถ€๋ถ„์— ๋Œ€ํ•œ ๊ฒฝ๊ณ ๋ฅผ ์•Œ๋ ค์ฃผ๋Š” ๊ธฐ๋Šฅ

eslint: {
ignoreDuringBuilds: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋นŒ๋“œ ์‹œ์— eslint๋ฅผ ๋ฌด์‹œํ•˜๋Š” ์„ค์ •์ด๊ตฐ์š”!

๊ฐ‘์ž๊ธฐ ๊ถ๊ธˆํ•ด์ง„ ๊ฒŒ..
์ด ์„ธํŒ…์„ true๋กœ ํ•˜๋Š” ๊ฒŒ ๋ณดํŽธ์ ์ธ ๊ฒƒ ๊ฐ™๋˜๋ฐ, ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ?์ธก๋ฉด์—์„œ ๋ณด๋ฉด ์ด ์„ค์ •์„ ํ‚ค๋Š” ๊ฒŒ ๋‚˜์€ ๊ฑด์ง€ ๋„๋Š” ๊ฒŒ ๋‚˜์€ ๊ฑด์ง€ ๊ถ๊ธˆํ•˜๋„ค์š”!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์Œ ์ œ ์ƒ๊ฐ์—๋Š” ์„ ํƒ์ธ ๊ฒƒ ๊ฐ™์€๋ฐ ์ผ๋‹จ ์šฐ๋ฆฌ ํ”„๋กœ์ ํŠธ์— error๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์•„์„œ ์ž„์˜๋กœ ์ถ”๊ฐ€ํ•ด๋’€์–ด์š”!

Copy link
Member

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๋ฃฐ์„ ๊ฐ€์ ธ๊ฐ€๋Š” ๊ฒฝ์šฐ์—๋Š” ๊บผ๋‘๋Š”๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค~
์•ˆ๊ทธ๋Ÿฌ๋ฉด ๋นŒ๋“œ์‹œ ํ•ญ์ƒ ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค~

},
// ์™ธ๋ถ€ ์ด๋ฏธ์ง€ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
images: {
remotePatterns: [
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-slick": "^0.23.13",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"autoprefixer": "^10.0.1",
"commitizen": "^4.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^8",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-next": "14.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"postcss": "^8",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"tailwindcss": "^3.3.0",
"typescript": "^5"
},
Expand Down
Binary file added public/fonts/Pretendard-Medium.woff
Binary file not shown.
Binary file added public/fonts/Pretendard-SemiBold.woff
Binary file not shown.
5 changes: 0 additions & 5 deletions react-ts-slick/package.json

This file was deleted.

14 changes: 0 additions & 14 deletions setting.json

This file was deleted.

14 changes: 0 additions & 14 deletions settings.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
html,
body,
.MuiTypography-root,
.MuiTab-root {
font-family: "Pretendard";
font-weight: 700;
}

.MuiTab-indicator {
background-color: purple-main1;
Expand Down
5 changes: 3 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";
import "./globals.css";
import RecoilRootWrapper from "./RecoilRootWrapper";
import pretendard from "@component/util/fonts";
import { ThemeProvider } from "@mui/material";
import { theme } from "@component/components/common-components/mui/theme";
import Providers from "@component/context/provider";
import { Header } from "@component/components/common-components/common/Header";
import Footer from "@component/components/common-components/common/Footer";
import RecoilRootWrapper from "./RecoilRootWrapper";

export const metadata: Metadata = {
title: "sendback",
Expand All @@ -19,7 +20,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" className={`${pretendard.variable} font-pretendard font-bold`}>
<RecoilRootWrapper>
<ThemeProvider theme={theme}>
<body>
Expand Down
17 changes: 17 additions & 0 deletions src/util/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import localFont from "next/font/local";

const pretendard = localFont({
src: [
{
path: "../../public/fonts/Pretendard-SemiBold.woff",
weight: "700",
},
{
path: "../../public/fonts/Pretendard-Medium.woff",
weight: "500",
},
],
variable: "--font-pretendard",
});

export default pretendard;
7 changes: 7 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ const config: Config = {
caption2: "11px",
caption3: "10px",
},
fontFamily: {
pretendard: ["var(--font-pretendard)"],
},
fontWeight: {
medium: "500",
bold: "700",
},
},
},
plugins: [],
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down
Loading