Skip to content

Commit

Permalink
Chore: 프로젝트 기초 환경 설정을 완료합니다. (#32)
Browse files Browse the repository at this point in the history
* chore: Update package.json scripts and dependencies

* feat: add ESLint configuration file

* chore: Add .prettierrc.json configuration file

* docs: Add next-env.d.ts file for TypeScript support

* feat: Add next.config.js file

* chore: add pnpm-lock.yaml file

* feat: add tsconfig.json file

* feat: add VSCode settings for TypeScript formatting

* feat: Add next.svg and vercel.svg files

* feat: Add favicon.ico file

* feat: add layout and page components

* feat: add GET route for /hello endpoint

* feat: Add @vanilla-extract/css, swr, and xstate dependencies

* feat: Add @vanilla-extract/next-plugin dependency

* feat: add vanilla-extract plugin to next.config.js

* feat: add jotai dependency, remove xstate

* chore(build): Update next.config.js to use commonjs module exports
  • Loading branch information
2-NOW authored Aug 31, 2023
1 parent 7f673bd commit 2285ad0
Show file tree
Hide file tree
Showing 14 changed files with 3,789 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"prettier"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],

"import/newline-after-import": "warn",
"import/no-unresolved": ["warn", { "ignore": ["^@/"] }],
"import/order": [
"warn",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
21 changes: 21 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"printWidth": 80,
"tabWidth": 2,
"semi": true,
"useTabs": false,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"proseWrap": "preserve",
"endOfLine": "lf",
"singleAttributePerLine": false,
"insertPragma": false,
"htmlWhitespaceSensitivity": "css",
"embeddedLanguageFormatting": "auto",
"vueIndentScriptAndStyle": false
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,

"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
3 changes: 3 additions & 0 deletions app/api/hello/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export async function GET(_request: Request) {
return new Response("Hello, Next.js!");
}
Binary file added app/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Inter } from "next/font/google";
import { PropsWithChildren } from "react";

const inter = Inter({ subsets: ["latin"] });

export const metadata = {
title: "React World",
description: "A React World with Next.js",
};

export default function RootLayout({ children }: PropsWithChildren) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}
7 changes: 7 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Home() {
return (
<div>
<h1>Next.js</h1>
</div>
);
}
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
9 changes: 9 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { createVanillaExtractPlugin } = require('@vanilla-extract/next-plugin');

const withVE = createVanillaExtractPlugin();

/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = withVE(nextConfig);
30 changes: 28 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,38 @@
"email": "goflvhxj2547@gmail.com",
"url": "https://github.com/inseong-so"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@types/node": "20.5.7",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@vanilla-extract/css": "^1.13.0",
"eslint": "8.48.0",
"jotai": "^2.4.0",
"next": "13.4.19",
"react": "18.2.0",
"react-dom": "18.2.0",
"swr": "^2.2.2",
"typescript": "5.2.2"
},
"devEngines": {
"node": "16.x || 18.x || 19.x || 20.x"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/pagers-org/react-world/issues"
},
"homepage": "https://github.com/pagers-org/react-world#readme"
}
"homepage": "https://github.com/pagers-org/react-world#readme",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@vanilla-extract/next-plugin": "^2.3.0",
"eslint-config-next": "13.4.19",
"eslint-config-prettier": "^9.0.0",
"prettier": "^3.0.3"
}
}
Loading

0 comments on commit 2285ad0

Please sign in to comment.