Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
- 프로젝트 세팅
- next.js
  • Loading branch information
saseungmin committed Dec 31, 2023
1 parent 8772135 commit 0f830cb
Show file tree
Hide file tree
Showing 817 changed files with 29,656 additions and 0 deletions.
108 changes: 108 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
module.exports = {
root: true,
env: {
es6: true,
browser: true,
jest: true,
},
ignorePatterns: [
'node_modules/',
'.pnp.cjs',
'.pnp.loader.cjs',
'public/',
'/.next',
],
extends: [
'airbnb',
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/jsx-runtime',
'plugin:@next/next/recommended',
],
plugins: [
'simple-import-sort',
'unused-imports',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src']],
extensions: ['.ts', '.js', '.tsx', '.json'],
},
},
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
],
plugins: [
'@typescript-eslint',
],
rules: {
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
},
},
{
files: ['src/hooks/**/**/*.test.ts?(x)'],
rules: {
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react', 'plugin:jest/recommended'],
rules: {
},
},
{
extends: ['plugin:cypress/recommended'],
files: ['cypress/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./cypress/tsconfig.json'],
},
},
],
rules: {
'react/require-default-props': 'off',
'import/order': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'simple-import-sort/imports': ['error', {
groups: [
['^\\u0000'],
['^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)'],
['^react'],
['^next'],
['^@?\\w'],
['^(@|lib|components|utils|hooks)(/.*|$)'],
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
['^.+\\.svg$'],
['^.+\\.s?css$'],
],
}],
'simple-import-sort/exports': 'error',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': ['warn', {
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
}],
},
};
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: yarn install --immutable

- name: Check Lint
if: ${{ github.event_name == 'pull_request' }}
run: yarn lint

- name: Check Unit Test
run: yarn test:coverage

49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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

# Zero Install: https://yarnpkg.com/features/zero-installs
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Cypress
cypress/screenshots
cypress/videos
cypress/log
Loading

0 comments on commit 0f830cb

Please sign in to comment.