Skip to content
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
34 changes: 0 additions & 34 deletions .eslintrc.js

This file was deleted.

19 changes: 11 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "es5",
"printWidth": 100,
"tabWidth": 2,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"semi": true,
"endOfLine": "auto",
"arrowParens": "avoid",
"bracketSpacing": true
}
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"endOfLine": "lf"
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["typescript", "javascript", "typescriptreact", "javascriptreact"],
"eslint.useFlatConfig": true,
"json.schemaDownload.enable": false
}
16 changes: 16 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
parserPreset: {
parserOpts: {
headerPattern: /^#(\d+)\s+(Feat|Fix|Chore|Style|Docs|Refactor|Test):\s(.+)$/u,
headerCorrespondence: ['issue', 'type', 'subject'],
},
},
rules: {
'type-enum': [2, 'always', ['Feat', 'Fix', 'Chore', 'Style', 'Docs', 'Refactor', 'Test']],
'type-case': [2, 'always', 'pascal-case'],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'subject-case': [0],
'header-max-length': [2, 'always', 100],
},
};
126 changes: 126 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import js from '@eslint/js';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import unusedImports from 'eslint-plugin-unused-imports';
import tseslint from 'typescript-eslint';
import { defineConfig } from 'eslint/config';

export default defineConfig(
// 0) 전역 무시
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/*.d.ts',
'packages/design-system/scripts/**',
'packages/design-system/src/routes/index.tsx',
'packages/design-system/src/components/index.ts',
],
},

// 1) JS 권장(전역)
js.configs.recommended,

// 2) TS 권장(타입 인식)
...tseslint.configs.recommended,

// 3) TS 파일 전용 추가 옵션/룰 (자동 tsconfig 탐색)
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
parserOptions: { projectService: true },
globals: { ...globals.browser, ...globals.node },
},
plugins: {
'@typescript-eslint': tseslint.plugin,
react: reactPlugin,
'react-hooks': reactHooksPlugin,
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
// ✅ 일반 규칙
'no-console': ['warn', { allow: ['warn', 'error'] }],
'prefer-const': 'warn',
'no-nested-ternary': 'warn',
'no-unused-vars': 'off',

// ✅ TypeScript 규칙
'@typescript-eslint/no-unused-vars': [
'warn',
{
vars: 'all',
args: 'after-used',
varsIgnorePattern: '^[A-Z_]',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-explicit-any': 'warn',

// ✅ React 규칙
...reactPlugin.configs.flat.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-no-undef': 'error',
'react/jsx-uses-vars': 'warn',
'react/jsx-key': 'warn',
'react/no-array-index-key': 'warn',
'react/jsx-max-props-per-line': ['warn', { maximum: 1, when: 'multiline' }],
'react/no-unescaped-entities': 'warn',
'react/jsx-sort-props': [
'warn',
{
callbacksLast: true,
shorthandFirst: true,
noSortAlphabetically: false,
reservedFirst: true,
},
],
'react/display-name': 'warn',
'react/self-closing-comp': 'warn',
'react/jsx-handler-names': [
'warn',
{
eventHandlerPrefix: 'handle',
eventHandlerPropPrefix: 'on',
},
],
'react/jsx-boolean-value': ['warn', 'never'],
'react/jsx-no-useless-fragment': 'warn',
'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }],

// ✅ React Hooks 규칙
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',

// ✅ Import/Export 정렬
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',

// ✅ 미사용 import 제거
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': 'off',
},
},

// 4) JS 파일 타입 검사 생략
{
files: ['**/*.js'],
extends: [tseslint.configs.disableTypeChecked],
},

// 5) Prettier 충돌 룰 제거 — 항상 마지막
eslintConfigPrettier,
);
10 changes: 10 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pre-commit:
parallel: false
commands:
lint-staged:
run: pnpm exec lint-staged

commit-msg:
commands:
lint-commit-msg:
run: pnpm exec commitlint --edit {1}
155 changes: 64 additions & 91 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,106 +3,79 @@
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@10.17.1",
"dependencies": {
"@blocknote/core": "^0.15.5",
"@blocknote/mantine": "^0.15.5",
"@blocknote/react": "^0.15.5",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/material": "^6.0.2",
"@tanstack/react-query": "^5.52.1",
"@tanstack/react-query-devtools": "^5.52.1",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^29.5.12",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-modal": "^3.16.3",
"@types/react-responsive": "^8.0.8",
"@types/styled-components": "^5.1.34",
"@vitejs/plugin-react": "^5.0.4",
"aos": "^2.3.4",
"axios": "^1.7.5",
"date-fns": "^3.6.0",
"event-source-polyfill": "^1.0.31",
"framer-motion": "^11.3.8",
"gsap": "^3.12.5",
"jotai": "^2.9.2",
"pretendard": "^1.3.9",
"react": "^18.3.1",
"react-autosize-textarea": "^7.1.0",
"react-beautiful-dnd": "^13.1.1",
"react-datepicker": "^7.3.0",
"react-dom": "^18.3.1",
"react-ga4": "^2.1.0",
"react-helmet-async": "^2.0.5",
"react-icons": "^5.2.1",
"react-intersection-observer": "^9.13.0",
"react-modal": "^3.16.1",
"react-paginate": "^8.2.0",
"react-responsive": "^10.0.0",
"react-router-dom": "^6.25.1",
"react-scripts": "^5.0.1",
"react-textarea-autosize": "^8.5.3",
"react-toastify": "^10.0.5",
"simplex-noise": "^4.0.2",
"styled-components": "^6.1.12",
"styled-reset": "^4.5.2",
"three": "^0.167.0",
"web-vitals": "^2.1.0"
},
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"preview": "vite preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier . --write",
"typecheck": "tsc -b --pretty",
"lefthook": "pnpm exec lefthook install"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"dependencies": {
"@blocknote/core": "^0.41.1",
"@blocknote/mantine": "^0.41.1",
"@blocknote/react": "^0.41.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/material": "^7.3.4",
"@tanstack/react-query": "^5.90.5",
"@tanstack/react-query-devtools": "^5.90.2",
"aos": "^2.3.4",
"axios": "^1.12.2",
"date-fns": "^4.1.0",
"event-source-polyfill": "^1.0.31",
"jotai": "^2.15.0",
"react": "^19.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-datepicker": "^8.8.0",
"react-dom": "^19.2.0",
"react-icons": "^5.5.0",
"react-intersection-observer": "^9.16.0",
"react-modal": "^3.16.3",
"react-paginate": "^8.3.0",
"react-responsive": "^10.0.1",
"react-router-dom": "^7.9.4",
"react-textarea-autosize": "^8.5.9",
"react-toastify": "^11.0.5",
"styled-components": "^6.1.19",
"styled-reset": "^5.0.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cli": "^20.1.0",
"@commitlint/config-conventional": "^20.0.0",
"@eslint/js": "^9.38.0",
"@types/aos": "^3.0.7",
"@types/axios": "^0.14.0",
"@types/event-source-polyfill": "^1.0.5",
"@types/gsap": "^3.0.0",
"@types/mocha": "^10.0.7",
"@types/node": "^24.9.1",
"@types/react": "^19.2.2",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-datepicker": "^7.0.0",
"@types/react-toastify": "^4.1.0",
"@types/testing-library__jest-dom": "^6.0.0",
"@types/three": "^0.166.0",
"@types/unist": "^3.0.3",
"@types/webxr": "^0.5.19",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@types/react-dom": "^19.2.2",
"@types/react-modal": "^3.16.3",
"@vitejs/plugin-react-swc": "^4.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.34.4",
"husky": "^9.1.1",
"prettier": "3.3.3",
"typescript": "^5.5.3",
"vite": "^7.1.8",
"vite-plugin-svgr": "^4.5.0"
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.3.0",
"globals": "^16.4.0",
"lefthook": "^2.0.0",
"lint-staged": "^16.2.6",
"prettier": "^3.6.2",
"rollup-plugin-visualizer": "^6.0.5",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2",
"vite": "^7.1.12"
},
"proxy": "https://dev.kkeujeok.store"
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.{css,md,json,yaml}": [
"prettier --write"
]
}
}
Loading