Skip to content
Open
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
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=/api
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=https://dummyjson.com
10 changes: 5 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"semi": false,
"printWidth": 120,
"semi": true,
"tabWidth": 2,
"singleQuote": false,
"quoteProps": "consistent",
"trailingComma": "all",
"singleAttributePerLine": false
}
"singleAttributePerLine": false,
"singleQuote": true,

}
6 changes: 6 additions & 0 deletions convention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### naminge 컨벤션

- CRUD Naming 채

### function 키워드 쓰기 ? 화살표 함수 쓰기?
화살표 함수 사용하기
42 changes: 35 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,56 @@
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 js from '@eslint/js';
import fsdPlugin from 'eslint-plugin-fsd-lint';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
files: ['**/*.{ts,tsx,css}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'fsd': fsdPlugin,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
// Enforces FSD layer import rules (e.g., features cannot import pages)
'fsd/forbidden-imports': 'error',

// Disallows relative imports between slices/layers, use aliases (@)
// Allows relative imports within the same slice by default (configurable)
'fsd/no-relative-imports': [
'error',
{
allowSameSlice: true,
},
],

// Enforces importing only via public API (index files)
// 'fsd/no-public-api-sidestep': 'error',

// Prevents direct imports between slices in the same layer
// 'fsd/no-cross-slice-dependency': 'error',

// Prevents UI imports in business logic layers (e.g., entities)
// 'fsd/no-ui-in-business-logic': 'error',

// Forbids direct import of the global store
// 'fsd/no-global-store-imports': 'error',

// Enforces import order based on FSD layers (disabled due to prettier conflict)
// 'fsd/ordered-imports': 'warn',
},
},
)
);
2 changes: 2 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module '*.css';
declare module '*.module.css';
15 changes: 15 additions & 0 deletions index_final.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src_final/main.tsx"></script>
</body>
</html>
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
{
"homepage": "https://yangs1s.github.io/front_6th_chapter2-3",
"name": "front-end-2-3",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build": "tsc -b && vite build --mode production",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest",
"deploy": "gh-pages -d dist",
"predeploy": "npm run build",
"coverage": "vitest run --coverage"
},
"dependencies": {
"@tanstack/react-query": "^5.84.2",
"react": "^19.1.1",
"react-dom": "^19.1.1"
"react-dom": "^19.1.1",
"zustand": "^5.0.7"
},
"devDependencies": {
"@eslint/js": "^9.33.0",
Expand All @@ -22,14 +27,17 @@
"@testing-library/jest-dom": "^6.6.4",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/react": "^19.1.9",
"@types/react-dom": "^19.1.7",
"@vitejs/plugin-react": "^5.0.0",
"axios": "^1.11.0",
"class-variance-authority": "^0.7.1",
"eslint": "^9.33.0",
"eslint-plugin-fsd-lint": "^1.0.9",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"gh-pages": "^6.3.0",
"globals": "^16.3.0",
"jsdom": "^26.1.0",
"lucide-react": "^0.539.0",
Expand Down
Loading