Skip to content

Commit

Permalink
[ENV][Fix] #1 : 불필요한 파일 제거하기 위해서 설정 된 곳에서 머지
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Nov 10, 2024
2 parents c8e9485 + a6b099e commit 3ba79d6
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 42 deletions.
3 changes: 2 additions & 1 deletion docs/docusaurus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dist-ssr
*.sln
*.sw?

.docusaurus
.docusaurus
build
20 changes: 12 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ export default [
},
},

// Frontend 설정: React 및 TypeScript 전용 규칙
// Frontend 설정: React 및 TypeScript 전용 규칙
{
files: ['frontend/**/*.ts', 'frontend/**/*.tsx'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: './docs/docusaurus/tsconfig.json',
project: './frontend/tsconfig.eslint.json',
tsconfigRootDir: __dirname,
ecmaVersion: 'latest',
sourceType: 'module',
Expand All @@ -135,6 +136,12 @@ export default [
'@typescript-eslint': typescriptPlugin,
},
settings: {
'import/resolver': {
typescript: {
project: path.resolve(__dirname, 'frontend/tsconfig.eslint.json'),
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
react: {
version: 'detect',
},
Expand Down Expand Up @@ -174,13 +181,10 @@ export default [
'react/destructuring-assignment': 'off',
'react/button-has-type': 'warn',
'import/no-unresolved': 'error',
},
},

{
files: ['**/*.test.{js,ts,tsx}', '**/*.spec.{js,ts,tsx}'],
rules: {
'no-console': 'off',
'import/extensions': 'off', // 규칙 비활성화
'prettier/prettier': 'error',
'no-underscore-dangle': 'warn',
'no-undef': 'off',
},
},

Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"autoprefixer": "^10.4.20",
"classnames": "^2.5.1",
"eslint": "^9.13.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.11.0",
Expand All @@ -49,7 +50,8 @@
"tailwindcss": "^3.4.14",
"typescript": "~5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10"
"vite": "^5.4.10",
"vite-tsconfig-paths": "^5.1.1"
},
"eslintConfig": {
"extends": [
Expand Down
13 changes: 0 additions & 13 deletions frontend/src/component/common/button/Button.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions frontend/src/component/common/nav/NaviBar.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/stories/Button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';

import { Button } from './Button';
import { Button } from './Button.tsx';

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stories/Header.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';

import { Header } from './Header';
import { Header } from './Header.tsx';

const meta = {
title: 'Example/Header',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stories/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from './Button';
import { Button } from './Button.tsx';
import './header.css';

interface IUser {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stories/Page.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { expect, userEvent, within } from '@storybook/test';

import { Page } from './Page';
import { Page } from './Page.tsx';

const meta = {
title: 'Example/Page',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stories/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { Header } from './Header';
import { Header } from './Header.tsx';
import './page.css';

interface IUser {
Expand Down
20 changes: 20 additions & 0 deletions frontend/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// frontend/tsconfig.eslint.json
// eslint에서 참조를 허용하지 않기에, eslint를 위한 tsconfig 파일을 별도로 생성했음.
// 추후 tsconfig 간의 교통정리 및 통합할 필요성이 있어 보임.
{
"extends": "./tsconfig.app.json",
"compilerOptions": {
"moduleResolution": "node"
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
".storybook/**/*.ts",
".storybook/**/*.tsx",
"tmp/**/*.ts",
"tmp/**/*.tsx",
"vite.config.ts",
"vite-env.d.ts"
],
"exclude": ["node_modules", "dist"]
}
3 changes: 2 additions & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import tsconfigPaths from 'vite-tsconfig-paths'; // 추가된 부분

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), tsconfigPaths()], // tsconfigPaths 플러그인 추가
});
44 changes: 44 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ba79d6

Please sign in to comment.