Skip to content

Commit

Permalink
시작
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Mar 16, 2024
1 parent ed51632 commit 99e2ab9
Show file tree
Hide file tree
Showing 46 changed files with 4,890 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
dist
esm
.eslintrc.js
prettier.config.mjs
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
}
13 changes: 13 additions & 0 deletions .github/actions/pnpm-setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: setup pnpm & node
description: setup pnpm & node
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
with:
version: 8.15.2
- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
quality:
name: Check quality
runs-on: ubuntu-latest
strategy:
matrix:
command: ['ci:eslint', 'ci:sherif', 'ci:type', 'build']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup-node
- run: pnpm install --frozen-lockfile
- run: pnpm ${{ matrix.command }}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules

# next.js
.next/
out/
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx}": ["prettier --write --ignore-unknown"]
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prefer-workspace-packages=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.19.1
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.workingDirectories": [{ "mode": "auto" }]
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# people
함수랑피플을 소개합니다.
# 함수랑피플
9 changes: 9 additions & 0 deletions apps/people/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['@hamsurang/eslint-config/react-ts', 'plugin:@next/next/recommended'],
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.json',
},
}
36 changes: 36 additions & 0 deletions apps/people/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 6 additions & 0 deletions apps/people/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
28 changes: 28 additions & 0 deletions apps/people/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@hamsurang/people",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "next build",
"ci:eslint": "next lint",
"ci:type": "tsc --noEmit",
"dev": "next dev -p 4001",
"start": "next start -p 4001"
},
"dependencies": {
"clsx": "^2.1.0",
"next": "^14.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@hamsurang/eslint-config": "workspace:*",
"@hamsurang/tsconfig": "workspace:*",
"@next/eslint-plugin-next": "^14.1.3",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.21",
"autoprefixer": "^10.4.18",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1"
}
}
6 changes: 6 additions & 0 deletions apps/people/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
8 changes: 8 additions & 0 deletions apps/people/prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import rootConfig from '../../prettier.config.mjs'

/** @type {import("prettier").Config} */
export default {
...rootConfig,
plugins: ['prettier-plugin-tailwindcss'],
tailwindConfig: './tailwind.config.js',
}
47 changes: 47 additions & 0 deletions apps/people/src/app/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body,
#__next {
color-scheme: dark;
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans,
Helvetica Neue, sans-serif;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
height: 100%;
display: flex;
flex-direction: column;
overflow: auto;
}

a {
color: inherit;
text-decoration: none;
}

* {
box-sizing: border-box;
}

body {
color: white;
background: black;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}

body {
color: white;
background: black;
}
}
18 changes: 18 additions & 0 deletions apps/people/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Metadata } from 'next'
import './global.css'

export const metadata: Metadata = {
title: 'hamsurang - people',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
3 changes: 3 additions & 0 deletions apps/people/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Home() {
return <div className="-mt-5 ml-4 mr-4 flex flex-1 justify-center">page</div>
}
8 changes: 8 additions & 0 deletions apps/people/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
theme: {
extend: {},
},
plugins: [],
}
28 changes: 28 additions & 0 deletions apps/people/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next",
},
],
"paths": {
"~/*": ["./src/*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "./.eslintrc.cjs", "next.config.js", "prettier.config.mjs"],
"exclude": ["node_modules", ".next"],
}
5 changes: 5 additions & 0 deletions configs/eslint-config-js/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['./index.js'],
}
24 changes: 24 additions & 0 deletions configs/eslint-config-js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['plugin:import/recommended', './no-import.js'],
plugins: ['import'],
rules: {
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'import/no-cycle': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/order': [
'warn',
{
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling'],
'index',
],
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
}
36 changes: 36 additions & 0 deletions configs/eslint-config-js/no-import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
env: {
es2020: true,
browser: true,
node: true,
jest: true,
},
parserOptions: {
ecmaVersion: 2020,
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@cspell/recommended',
],
rules: {
'no-warning-comments': 'warn',
'@cspell/spellchecker': [
'warn',
{
cspell: {
words: ['hamsurang'],
},
},
],
},
overrides: [
{
files: ['*.spec.ts*', '*.test.ts*'],
plugins: ['vitest', 'jest-dom'],
extends: ['plugin:vitest/recommended'],
},
],
}
Loading

0 comments on commit 99e2ab9

Please sign in to comment.