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

[ENV] : 백엔드 package.json 세팅 수정 #99

Merged
merged 2 commits into from
Nov 6, 2024
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
1 change: 0 additions & 1 deletion .husky/_/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/applypatch-msg

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/commit-msg

This file was deleted.

22 changes: 0 additions & 22 deletions .husky/_/h

This file was deleted.

9 changes: 0 additions & 9 deletions .husky/_/husky.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/post-applypatch

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/post-checkout

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/post-commit

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/post-merge

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/post-rewrite

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-applypatch

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-auto-gc

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-commit

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-merge-commit

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-push

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/pre-rebase

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/_/prepare-commit-msg

This file was deleted.

17 changes: 0 additions & 17 deletions .husky/pre-commit

This file was deleted.

13 changes: 0 additions & 13 deletions BackEnd/src/hello.js

This file was deleted.

13 changes: 11 additions & 2 deletions BackEnd/package.json → backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@web28-ddara/backend",
"name": "ddara-backend",
"private": true,
"workspaces": [
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
"description": "따라따라의 선따라길따라 BackEnd 코드",
"main": "index.js",
"scripts": {
Expand All @@ -12,5 +18,8 @@
},
"keywords": [],
"author": "",
"license": "ISC"
"license": "ISC",
"dependencies": {
"express": "^4.21.1"
}
}
12 changes: 12 additions & 0 deletions backend/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express');

const app = express();
const port = process.env.PORT || 3000;

app.get('/', (req, res) => {
res.json({
success: true,
});
});

app.listen(port, () => {});
40 changes: 21 additions & 19 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Airbnb 스타일 가이드를 기반으로 ESLint 설정을 ESM(ECMAScript Module) 방식으로 구성한 파일입니다.
import { FlatCompat } from '@eslint/eslintrc';
import airbnbBase from 'eslint-config-airbnb-base';
import airbnbReact from 'eslint-config-airbnb';
import importPlugin from 'eslint-plugin-import';
import reactPlugin from 'eslint-plugin-react';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import prettierPlugin from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import { FlatCompat } from "@eslint/eslintrc";
import airbnbBase from "eslint-config-airbnb-base";
import airbnbReact from "eslint-config-airbnb";
import importPlugin from "eslint-plugin-import";
import reactPlugin from "eslint-plugin-react";
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import prettierPlugin from "eslint-plugin-prettier";
import prettierConfig from "eslint-config-prettier";
// eslint-disable-next-line import/no-unresolved
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
// eslint-disable-next-line import/no-unresolved
import typescriptParser from '@typescript-eslint/parser';
import storybook from 'eslint-plugin-storybook';
import path from 'path';
import { fileURLToPath } from 'url';
import typescriptParser from "@typescript-eslint/parser";
import storybook from "eslint-plugin-storybook";
import path from "path";
import { fileURLToPath } from "url";

// eslint-disable-next-line no-underscore-dangle
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand All @@ -40,14 +40,16 @@ export default [
'public/', // public 폴더 제외
'**/*.min.js', // 모든 .min.js 파일 제외
path.join(__dirname, 'eslint.config.mjs'), // 절대 경로로 무시
path.join(__dirname, 'FrontEnd', 'vite.config.ts'), // 추가로 무시할 파일이 있으면 동일하게 추가
path.join(__dirname, 'frontend', 'vite.config.ts'), // 추가로 무시할 파일이 있으면 동일하게 추가
],
plugins: {
import: importPlugin,
prettier: prettierPlugin,
},
rules: {
'import/no-extraneous-dependencies': 'error',
'import/no-extraneous-dependencies': ['error', {
"packageDir": ["./", "./backend", "./frontend"]
}],
'import/prefer-default-export': 'off',
'import/no-default-export': 'warn',
'prettier/prettier': 'error',
Expand All @@ -73,18 +75,18 @@ export default [
},
},

// 2. BackEnd 설정 - JavaScript 전용 규칙 적용
// 2. backend 설정 - JavaScript 전용 규칙 적용
{
files: ['BackEnd/**/*.js'],
files: ['backend/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},

// 3. FrontEnd 설정 - React 및 TypeScript 전용 규칙 적용
// 3. frontend 설정 - React 및 TypeScript 전용 규칙 적용
{
files: ['FrontEnd/**/*.ts', 'FrontEnd/**/*.tsx'],
files: ['frontend/**/*.ts', 'frontend/**/*.tsx'],
languageOptions: {
parser: typescriptParser,
ecmaVersion: 'latest',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions FrontEnd/package.json → frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "ddara-frontend",
"private": true,
"workspaces": [
"FrontEnd",
"BackEnd"
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion FrontEnd/postcss.config.js → frontend/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default {
tailwindcss: {},
autoprefixer: {},
},
}
};
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"source": {
"include": ["./BackEnd/src"],
"include": ["./backend/src"],
"includePattern": ".+\\.js(doc|x)?$"
},
"opts": {
"destination": "./docs/BackEnd",
"destination": "./docs/backend",
"recurse": true
}
}
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"jsdoc": "jsdoc -c jsdoc.json"
},
"workspaces": [
"FrontEnd",
"BackEnd"
"frontend",
"backend"
],
"keywords": [],
"author": "",
Expand Down Expand Up @@ -56,7 +56,6 @@
"typedoc": "^0.26.11",
"typescript": "~5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vitest": "^2.1.4"
},
"lint-staged": {
Expand Down
Loading
Loading