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

Project setup #1

Merged
merged 1 commit into from
Jan 3, 2025
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
73 changes: 73 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
parserOptions: {
project: "./tsconfig.json",
},
env: {
node: true,
},
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"airbnb",
"airbnb-typescript",
"plugin:prettier/recommended",
],
rules: {
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
// 'React' must be in scope when using JSX in Next.JS
"react/react-in-jsx-scope": "off",
"react/jsx-no-useless-fragment": 0,
"react/jsx-key": 1,
"react/no-danger": 0,
"react/button-has-type": 0,
"@typescript-eslint/no-use-before-define": "off",
"react/jsx-filename-extension": [1, { extensions: [".ts", ".tsx"] }], // should add ".ts" if typescript project
"no-unused-vars": "off",
"no-param-reassign": "off",
"react/function-component-definition": [
2,
{ namedComponents: ["arrow-function", "function-declaration"] },
],
"@typescript-eslint/no-unused-vars": "warn",
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"import/no-cycle": 0,
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"no-empty-interface": 0,
"import/prefer-default-export": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
labelAttributes: ["htmlFor"],
},
],
"react/no-array-index-key": 0,
"consistent-return": 0,
"react-hooks/exhaustive-deps": "off",
"no-restricted-imports": [
"warn",
{
paths: [
{
name: "react",
importNames: ["default"],
message: "import React from 'react' is increases bundling size without the need.",
},
],
},
],
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @5ewon @ubinquitous
1 change: 1 addition & 0 deletions .github/assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addAssignees: author
10 changes: 10 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pages:
- changed-file:
- any-glob-to-any-file: 'app/**'
shared:
- changed-files:
- any-glob-to-any-file: 'src/**'
feature:
- head-branch: ['^feature', 'feature']
release:
- head-branch: ['^release', 'release']
52 changes: 52 additions & 0 deletions .github/workflows/application-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Application Build
on:
workflow_dispatch:
inputs:
deploy_env:
type: choice
description: '배포 환경'
options:
- production
required: true
push:
branches:
- main
paths:
- 'app/**'
- 'src/**'
env:
SERVICE_NAME: bumawiki

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22.9.0

- name: Use NextJS Cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/bumawiki/.next/cache
key: nextjs-bumawiki-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('apps/finance/**.[jt]s', 'apps/finance/**.[jt]sx') }}
restore-keys: |
nextjs-bumawiki-${{ hashFiles('**/yarn.lock') }}-
nextjs-bumawiki-

- name: Set Package Manager
run: |
npm install -g pnpm
pnpm install

- name: Check Lint
run: pnpm lint

- name: Application Build
run: pnpm build
12 changes: 12 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Auto Assign'
on:
pull_request:
types: [opened, ready_for_review]

jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/auto-assign-action@v2.0.0
with:
configuration-path: '.github/assign.yml'
14 changes: 14 additions & 0 deletions .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Labeler
on: [pull_request_target]

jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v5
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# 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*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 100,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"bracketSpacing": true,
"endOfLine": "auto",
"useTabs": false,
"arrowParens": "always"
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Insert

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading