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 8a5efb3
Show file tree
Hide file tree
Showing 43 changed files with 4,779 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
29 changes: 29 additions & 0 deletions apps/people/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"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": {
"@emotion/react": "^11.11.4",
"@floating-ui/react": "^0.26.9",
"@jsxcss/emotion": "^1.3.9",
"clsx": "^2.1.0",
"framer-motion": "^11.0.14",
"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"
}
}
20 changes: 20 additions & 0 deletions apps/people/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Metadata } from 'next'
import Providers from './providers'

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

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
)
}
14 changes: 14 additions & 0 deletions apps/people/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Stack } from '@jsxcss/emotion'

export default function Home() {
return (
<div>
<Stack spacing={10}>
<div>hi</div>
<div>hi</div>
<div>hi</div>
<div>hi</div>
</Stack>
</div>
)
}
6 changes: 6 additions & 0 deletions apps/people/src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { MediaQueryProvider } from '@jsxcss/emotion'
import { type ReactNode } from 'react'

export default function Providers({ children }: { children: ReactNode }) {
return <MediaQueryProvider>{children}</MediaQueryProvider>
}
35 changes: 35 additions & 0 deletions apps/people/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"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"
],
"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'],
},
],
}
20 changes: 20 additions & 0 deletions configs/eslint-config-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@hamsurang/eslint-config-js",
"version": "0.0.0",
"private": true,
"main": "index.js",
"files": [
"no-import.js"
],
"scripts": {
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\""
},
"dependencies": {
"@cspell/eslint-plugin": "^8.6.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest-dom": "^5.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vitest": "0.3.22"
}
}
5 changes: 5 additions & 0 deletions configs/eslint-config-ts/.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: ['@hamsurang/eslint-config-js'],
}
32 changes: 32 additions & 0 deletions configs/eslint-config-ts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
'plugin:import/recommended',
'plugin:import/typescript',
'./no-import.js',
],
plugins: ['import'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: true,
node: true,
},
},
rules: {
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'import/no-cycle': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/no-unresolved': 'off',
'import/order': [
'error',
{
'newlines-between': 'never',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
}
Loading

0 comments on commit 8a5efb3

Please sign in to comment.