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

FIRE-129 - FIRE-129-dependency추가 #1

Merged
merged 6 commits into from
Jun 21, 2022
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
50 changes: 50 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb", // or airbnb-base
"plugin:react/recommended",
"plugin:jsx-a11y/recommended", // 설치 한경우
"plugin:import/errors", // 설치한 경우
"plugin:import/warnings", // 설치한 경우
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"linebreak-style": 0,
"import/prefer-default-export": 0,
"import/extensions": 0,
"no-use-before-define": 0,
"import/no-unresolved": 0,
"react/react-in-jsx-scope": 0,
"import/no-extraneous-dependencies": 0, // 테스트 또는 개발환경을 구성하는 파일에서는 devDependency 사용을 허용
"no-shadow": 0,
"react/prop-types": 0,
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"jsx-a11y/no-noninteractive-element-interactions": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80,
"arrowParens": "always",
"orderedImports": true,
"bracketSpacing": true,
"jsxBracketSameLine": false
}
12 changes: 12 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
"overrides": [
{
"files": ["**/*.tsx"],
"customSyntax": "@stylelint/postcss-css-in-js"
}
],
"rules": {
"function-no-unknown": [true, { "ignoreFunctions": ["/\\${/"] }]
}
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# modoco-frontend

역할
- FE: 윤영기, 이하령
- BE: 고주형

- FE: 윤영기, 이하령
- BE: 고주형
65 changes: 65 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "modoco-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"history": "5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5",
"typescript": "^4.7.4",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint:css": "stylelint --ignore-path .gitignore '**/*.(css|tsx)'"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@stylelint/postcss-css-in-js": "^0.38.0",
"@types/node": "^18.0.0",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss-syntax": "^0.36.2",
"prettier": "^2.7.1",
"stylelint": "^14.9.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^26.0.0"
}
}
12 changes: 12 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>🇰🇷MODOCO</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
34 changes: 34 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import styled from 'styled-components';

function Router() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<TestContainer />} />
<Route path="/test2" element={<TestContainer2 />} />
<Route path="/test3" element={<TestContainer3 />} />
</Routes>
</BrowserRouter>
);
}

const TestContainer = styled.div`
width: 100vw;
height: 100vh;
background-color: lightcyan;
`;
const TestContainer2 = styled.div`
width: 100vw;
height: 100vh;
background-color: lightgreen;
`;

const TestContainer3 = styled.div`
width: 100vw;
height: 100vh;
background-color: lightsalmon;
`;

export default Router;
79 changes: 79 additions & 0 deletions src/Styles/GlobalStyle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { createGlobalStyle } from 'styled-components';

const GlobalStyle = createGlobalStyle`
* {
box-sizing: border-box;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-family: sans-serif;
vertical-align: baseline;
}
input {
font-family: sans-serif;
}
button {
font-family: sans-serif;
}
html {
font-size: 62.5%;
}
html, body, #root {
min-height: 100%;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul, li {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote::before, blockquote::after,
q::before, q::after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* a {
text-decoration: none;
color: inherit;
} */
`;

export default GlobalStyle;
12 changes: 12 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import GlobalStyle from './Styles/GlobalStyle';

ReactDOM.render(
<React.StrictMode>
<GlobalStyle />
<App />
</React.StrictMode>,
document.getElementById('root'),
);
Loading