diff --git a/.babelrc b/.babelrc deleted file mode 100644 index d9c3f919..00000000 --- a/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": ["next/babel"], - "plugins": [ - [ - "styled-components", - { "ssr": true, "displayName": true, "preprocess": false } - ] - ] -} diff --git a/.eslintrc.json b/.eslintrc.json index f80a44ac..f707ace2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,28 +9,34 @@ "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "next/core-web-vitals", - "airbnb", - "airbnb/hooks", - "airbnb-typescript", - "prettier", - "plugin:storybook/recommended" + "prettier" ], - "overrides": [], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": "latest", "sourceType": "module", - "project": ["tsconfig.json"] + "project": "tsconfig.json" }, "plugins": ["react", "@typescript-eslint"], + "globals": { "NodeJS": "readonly" }, "rules": { - "react/react-in-jsx-scope": "off", - "react/jsx-props-no-spreading": "off", - "jsx-a11y/label-has-associated-control": [ - 2, + "import/order": [ + "error", { - "labelAttributes": ["htmlFor"] + "groups": [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index" + ], + "newlines-between": "always" } - ] + ], + "react/display-name": "off", + "jsx-a11y/alt-text": "off", + "@next/next/no-img-element": "off", + "no-console": ["error", { "allow": ["warn", "error"] }] } } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..ad43853c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +name: Continuous Integration and Synchronization +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - develop + +jobs: + quality: + name: Check quality + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install --legacy-peer-deps + + - name: Checking + run: npm run lint && npm run lint:type && npm run lint:eslint && npm run lint:prettier + + sync: + name: Sync forked repo + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + + steps: + - name: Checkout develop + uses: actions/checkout@v4 + with: + token: ${{ secrets.AUTO_ACTIONS }} + fetch-depth: 0 + ref: develop + + - name: Add remote-url + run: | + git remote add forked-repo https://lgrin-byte:${{ secrets.AUTO_ACTIONS }}@github.com/lgrin-byte/nextRoomFE + git config user.name lgrin-byte + git config user.email ${{ secrets.EMAIL }} + + - name: Push changes to forked-repo + run: | + git push -f forked-repo develop + + - name: Clean up + run: | + git remote remove forked-repo diff --git a/.husky/pre-commit b/.husky/pre-commit index 4f4343f0..573b579e 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run lint \ No newline at end of file +npm run lint && npm run lint:prettier && npm run lint:eslint && npm run lint:type \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..debf9e44 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +**/*.css +**/*.scss +**/*.sass +**/*.html +**/*.yml +.github +.husky +.next +.swc +.vscode diff --git a/.prettierrc.json b/.prettierrc.json index 5628b32f..b666f711 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,6 +1,6 @@ { - "singleQuote": false, - "semi": true, - "useTabs": false, - "printWidth": 80 - } \ No newline at end of file + "singleQuote": false, + "semi": true, + "useTabs": false, + "printWidth": 80 +} diff --git a/.storybook/main.ts b/.storybook/main.ts deleted file mode 100644 index d7a28da9..00000000 --- a/.storybook/main.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { StorybookConfig } from "@storybook/nextjs"; - -const config: StorybookConfig = { - stories: [ - "../stories/**/*.mdx", - "../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)", - ], - addons: [ - "@storybook/addon-links", - "@storybook/addon-essentials", - "@storybook/addon-onboarding", - "@storybook/addon-interactions", - ], - framework: { - name: "@storybook/nextjs", - options: {}, - }, - docs: { - autodocs: "tag", - }, -}; -export default config; diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx deleted file mode 100644 index ed71cd73..00000000 --- a/.storybook/preview.tsx +++ /dev/null @@ -1,56 +0,0 @@ -"use client"; - -import { ThemeProvider, createTheme } from "@mui/material"; // 여기서 'ThemeProvider'를 임포트합니다. -import themeMui from "../app/style/ThemeMUI.json"; // 이 경로는 실제 JSON 테마 파일의 위치에 따라 달라집니다. -import React from "react"; - -// JSON 테마 객체를 Material-UI 테마로 변환 -const theme = createTheme(themeMui as any); - -// Storybook의 모든 스토리에 테마를 제공하는 데코레이터 -export const decorators = [ - (Story) => ( - - - - ), -]; - -const preview = { - parameters: { - actions: { argTypesRegex: "^on[A-Z].*" }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, - backgrounds: { - default: "main", - values: [ - { - name: "main", - value: "#000000", - }, - { - name: "gray", - value: "#F3F5FB", - }, - { - name: "white", - value: "#FFFFFF", - }, - { - name: "black", - value: "#000000", - }, - { - name: "blue", - value: "#2E48A0", - }, - ], - }, - }, -}; - -export default preview; diff --git a/app/(shared)/(ThemeTextArea)/Container.tsx b/app/(shared)/(ThemeTextArea)/Container.tsx new file mode 100644 index 00000000..8eab063c --- /dev/null +++ b/app/(shared)/(ThemeTextArea)/Container.tsx @@ -0,0 +1,53 @@ +import React from "react"; +import "./textArea.modules.sass"; +import classNames from "classnames"; + +import useTextArea from "./useTextArea"; +import { ThemeInfoTextAreaType } from "./TextAreaType"; + +export default function ThemeTextArea({ + id, + tabIndex, + content, + infoText, + textAreaPlaceholder, + checkErrorText, +}: ThemeInfoTextAreaType) { + const { + textAreaValue, + isFocus, + setIsFocus, + errorText, + textAreaRef, + handleTextAreaChange, + handleTextAreaBlur, + } = useTextArea({ id, content, checkErrorText }); + + return ( +
setIsFocus(true)}> +