-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2e7c84a
Showing
42 changed files
with
12,475 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.config.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"airbnb/hooks", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:testing-library/react", | ||
"plugin:jest-dom/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:storybook/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"project": "tsconfig.json" | ||
}, | ||
"plugins": ["react", "@typescript-eslint", "prettier"], | ||
"rules": { | ||
"react/react-in-jsx-scope": 0, | ||
"import/prefer-default-export": 0, | ||
"jsx-a11y/label-has-associated-control": 0, | ||
"react/jsx-props-no-spreading": 0, | ||
"no-param-reassign": 0, | ||
"react/require-default-props": 0, | ||
"react/button-has-type": 0, | ||
"@typescript-eslint/no-shadow": 0, | ||
"@typescript-eslint/no-unused-vars": 1, | ||
"no-restricted-syntax": 0, | ||
"prettier/prettier": [ | ||
0, | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"import/extensions": [ | ||
0, | ||
"never", | ||
{ | ||
".js": "never", | ||
".jsx": "never", | ||
".ts": "never", | ||
".tsx": "never" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
day: friday | ||
commit-message: | ||
prefix: chore | ||
labels: [chore] | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
day: friday | ||
commit-message: | ||
prefix: chore | ||
labels: [chore] | ||
versioning-strategy: increase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.9.2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build project | ||
run: pnpm build | ||
|
||
- name: Run Tests | ||
run: pnpm test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
coverage | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
echo 'Styling your project before committing' | ||
echo 'please be patient, this may take a while...' | ||
|
||
# Check ESLint Standards | ||
pnpm lint || | ||
( | ||
echo 'you have a problem in your code. Check linter | ||
Run yarn lint, add changes and try commit again.'; | ||
false; | ||
) | ||
|
||
echo '🎉 No error found: committing this now.... ✨🚀🏄♂️🍻' | ||
|
||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
// Type check TypeScript files | ||
'**/*.(ts|tsx)': () => 'pnpm tsc --noEmit', | ||
|
||
// Lint & Prettify TS and JS files | ||
'**/*.(ts|tsx|js)': () => [`pnpm lint --fix`, `pnpm format`], | ||
|
||
// Prettify only Markdown and JSON files | ||
'**/*.(md|json)': (filenames) => | ||
`pnpm prettier --write ${filenames.join(' ')}`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
public | ||
yarn.lock | ||
pnpm-lock.yaml | ||
package-lock.json | ||
vite.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"endOfLine": "lf", | ||
"plugins": [ | ||
"prettier-plugin-tailwindcss" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-interactions', | ||
'storybook-addon-react-router-v6', | ||
'@storybook/addon-themes' | ||
], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Preview } from '@storybook/react'; | ||
import '../src/index.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"bradlc.vscode-tailwindcss", | ||
"yoavbls.pretty-ts-errors", | ||
"formulahendry.auto-rename-tag", | ||
"usernamehw.errorlens" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Hans Tanawi | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## 로케지송. 프론트엔드 저장소 | ||
|
||
작업자: 황상한, 김미정, 박우림 <br /> | ||
|
||
pnpm , vite, react, jotai, typescript, react, emotion, scss, axios etc.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/react.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>로켓지송 프론트엔드</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** @type {import('@jest/types').Config.InitialOptions} */ | ||
module.exports = { | ||
setupFiles: ['whatwg-fetch'], | ||
// The test environment that will be used for testing, jsdom for browser environment | ||
// https://jestjs.io/docs/configuration#testenvironment-string | ||
testEnvironment: 'jsdom', | ||
// A list of paths to directories that Jest should use to search for files in | ||
// https://jestjs.io/docs/configuration#roots-arraystring | ||
roots: ['<rootDir>/src/'], | ||
// The glob patterns Jest uses to detect test files. | ||
// https://jestjs.io/docs/configuration#testmatch-arraystring | ||
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], | ||
// Jest transformations | ||
// https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', // Transform TypeScript files using ts-jest | ||
}, | ||
// A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed | ||
// https://jestjs.io/docs/configuration#setupfilesafterenv-array | ||
setupFilesAfterEnv: ['<rootDir>/test/jest.setup.ts'], | ||
// Code coverage config | ||
// https://jestjs.io/docs/configuration#collectcoveragefrom-array | ||
coverageDirectory: '<rootDir>/coverage/', | ||
collectCoverageFrom: [ | ||
'<rootDir>/src/**/*.{ts,tsx}', | ||
'!**/__mocks__/**', | ||
'!**/node_modules/**', | ||
'!**/*.d.ts', | ||
], | ||
// Important: order matters, specific rules should be defined first | ||
// https://jestjs.io/fr/docs/configuration#modulenamemapper-objectstring-string--arraystring | ||
moduleNameMapper: { | ||
// Handle svg files | ||
'^.+\\.svg$': 'jest-svg-transformer', | ||
// Handle CSS imports (with CSS modules) | ||
// https://jestjs.io/docs/webpack#mocking-css-modules | ||
'^.+\\.module\\.(css|sass|scss|less)$': 'identity-obj-proxy', | ||
// Handle CSS imports (without CSS modules) | ||
'^.+\\.(css|sass|scss|less)$': '<rootDir>/__mocks__/styleMock.js', | ||
// Handle static assets | ||
// https://jestjs.io/docs/webpack#handling-static-assets | ||
'^.+\\.(jpg|jpeg|png|gif|webp|avif|svg|ttf|woff|woff2)$': `<rootDir>/__mocks__/fileMock.js`, | ||
// Handle TypeScript path aliases | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
verbose: true, | ||
testTimeout: 30000, | ||
}; |
Oops, something went wrong.