Skip to content

Commit

Permalink
Merge pull request #2 from peauty/feature/ui-setting
Browse files Browse the repository at this point in the history
Feat: UI setting
  • Loading branch information
myoungjinGo-FE authored Nov 18, 2024
2 parents 72d30c4 + 05a9417 commit 9174870
Show file tree
Hide file tree
Showing 23 changed files with 2,366 additions and 321 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# yarn 관련 ignore 추가
tsconfig.tsbuildinfo
install-state.gz
27 changes: 27 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 빌드 결과물
dist/
build/

# Node.js 모듈
node_modules/

# 환경 설정 파일
.prettierrc

# 로그 파일
npm-debug.log
yarn-debug.log
yarn-error.log

# 프로젝트 루트에서 제외된 다른 파일들
public/

# 기타
.vscode/
.idea/
.DS_Store
*.config.js


# 패키지 관리
package-lock.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 80,
"semi": true,
"trailingComma": "all",
"tabWidth": 2,
"arrowParens": "always"

}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pawfit-FE
# peauty-FE

Node `20.17.0`,
Typescript, React, Vite, Recoil, yarn
Expand Down
6 changes: 6 additions & 0 deletions custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module "*.svg" {
import React = require("react");
export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
const src: string;
export { src };
}
61 changes: 42 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import globals from "globals";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettierPluginRecommended from "eslint-plugin-prettier/recommended";
import reactPlugin from "eslint-plugin-react";
import { configs as reactHooksConfigs } from "eslint-plugin-react-hooks";
import { FlatCompat } from "@eslint/eslintrc";
import jsxA11y from "eslint-plugin-jsx-a11y";
import reactRefresh from "eslint-plugin-react-refresh";

const compat = new FlatCompat();

export default tseslint.config(
{ ignores: ['dist'] },
eslint.configs.recommended,
...compat.extends("eslint-config-standard"),
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
jsxA11y.flatConfigs.recommended,
prettierPluginRecommended,
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaFeatures: { jsx: true },
tsconfigRootDir: import.meta.dirname,
project: ["tsconfig.node.json", "tsconfig.app.json"],
},
globals: { ...globals.browser },
},
},
{
files: ["**/*.{js,mjs,cjs,jsx}"],
extends: [tseslint.configs.disableTypeChecked],
},
{
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
react: reactPlugin,
"react-hooks": reactHooksConfigs,
"react-refresh": reactRefresh,
},
settings: { react: { version: "detect" } },
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
...reactPlugin.configs.recommended.rules,
...reactPlugin.configs["jsx-runtime"].rules,
...reactHooksConfigs.recommended.rules,
"prettier/prettier": "warn",
"react-refresh/only-export-components": "warn",
"@typescript-eslint/no-unused-vars": "warn",
camelcase: "off",
},
},
)
}
);
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<!doctype html>
<html lang="en">
<html lang="kr">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link type="text/css" rel="stylesheet" href="./src/reset.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>애견 미용의 기준 PEAUTY</title>
</head>
<body>
<div id="root"></div>
Expand Down
20 changes: 17 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,38 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"svgr": "npx @svgr/cli -d src/assets/svg --ignore-existing --typescript --no-dimensions public/svg"
},
"dependencies": {
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.34",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"recoil": "^0.7.7"
"react-router-dom": "^6.28.0",
"recoil": "^0.7.7",
"styled-components": "^6.1.13",
"styled-normalize": "^8.1.1"
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
"@eslint/js": "^9.13.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.11.0",
"prettier": "^3.3.3",
"typescript": "~5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10"
"vite": "^5.4.10",
"vite-plugin-svgr": "^4.3.0"
}
}
19 changes: 19 additions & 0 deletions public/svg/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

32 changes: 5 additions & 27 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { Outlet } from "react-router-dom";

function App() {
const [count, setCount] = useState(0)
console.log("콘솔");

return (
<>
<div>
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
<Outlet />
</>
)
);
}

export default App
export default App;
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

48 changes: 48 additions & 0 deletions src/assets/svg/Favicon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import type { SVGProps } from "react";
const SvgFavicon = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 200 200"
{...props}
>
<g clipPath="url(#favicon_svg__a)">
<mask
id="favicon_svg__b"
width={200}
height={200}
x={0}
y={0}
maskUnits="userSpaceOnUse"
style={{
maskType: "luminance",
}}
>
<path fill="#fff" d="M200 0H0v200h200z" />
</mask>
<g mask="url(#favicon_svg__b)">
<path
fill="url(#favicon_svg__c)"
d="M127.14 200c-27.146 0-27.146-32.577-54.291-32.577-31.244 0-72.849-9.037-72.849-40.29 0-27.144 32.568-27.144 32.568-54.288C32.568 41.613 41.605 0 72.86 0c27.146 0 27.146 32.577 54.291 32.577 31.233 0 72.849 9.037 72.849 40.29 0 27.145-32.579 27.145-32.579 54.289-.012 31.288-9.037 72.844-40.281 72.844"
/>
</g>
</g>
<defs>
<linearGradient
id="favicon_svg__c"
x1={100}
x2={100}
y1={0}
y2={200}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#DF99F7" />
<stop offset={1} stopColor="#FFDBB0" />
</linearGradient>
<clipPath id="favicon_svg__a">
<path fill="#fff" d="M0 0h200v200H0z" />
</clipPath>
</defs>
</svg>
);
export default SvgFavicon;
1 change: 1 addition & 0 deletions src/assets/svg/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Favicon } from "./Favicon";
Loading

0 comments on commit 9174870

Please sign in to comment.