Skip to content

Commit

Permalink
style: prettier, eslint style 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Jun 22, 2024
1 parent d526183 commit e52e9de
Show file tree
Hide file tree
Showing 32 changed files with 1,712 additions and 1,165 deletions.
10 changes: 5 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ enable:
prs: true

labels:
"chore":
'chore':
include:
- '\bchore\b'
"feat":
'feat':
include:
- '\bfeat\b'
"docs":
'docs':
include:
- '\bdocs\b'
"fix":
'fix':
include:
- '\bfix\b'
"test":
'test':
include:
- '\btest\b'
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"printWidth": 120,
"singleQuote": true
}
}
4 changes: 2 additions & 2 deletions apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@sambad/eslint-config/next.js"],
parser: "@typescript-eslint/parser",
extends: ['@sambad/eslint-config/next.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
Expand Down
44 changes: 7 additions & 37 deletions apps/web/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono',
'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
Expand All @@ -17,22 +16,11 @@
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
);
--secondary-glow: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);
--tile-border: conic-gradient(#00000080, #00000040, #00000030, #00000020, #00000010, #00000010, #00000080);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
Expand All @@ -47,24 +35,11 @@
--background-end-rgb: 0, 0, 0;

--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--secondary-glow: linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
);
--secondary-glow: linear-gradient(to bottom right, rgba(1, 65, 255, 0), rgba(1, 65, 255, 0), rgba(1, 65, 255, 0.3));

--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(
#ffffff80,
#ffffff40,
#ffffff30,
#ffffff20,
#ffffff10,
#ffffff10,
#ffffff80
);
--tile-border: conic-gradient(#ffffff80, #ffffff40, #ffffff30, #ffffff20, #ffffff10, #ffffff10, #ffffff80);

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
Expand All @@ -87,12 +62,7 @@ body {

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));
}

a {
Expand Down
14 changes: 8 additions & 6 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { Inter } from 'next/font/google';

const inter = Inter({ subsets: ["latin"] });
import type { Metadata } from 'next';

import './globals.css';

const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: 'Create Next App',
description: 'Generated by create next app',
};

export default function RootLayout({
Expand Down
18 changes: 6 additions & 12 deletions apps/web/app/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0);
transition: background 200ms, border 200ms;
transition:
background 200ms,
border 200ms;
}

.card span {
Expand Down Expand Up @@ -98,7 +100,7 @@

.center::before,
.center::after {
content: "";
content: '';
left: 50%;
position: absolute;
filter: blur(45px);
Expand Down Expand Up @@ -179,11 +181,7 @@
border-radius: 0;
border: none;
border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
background: linear-gradient(
to bottom,
rgba(var(--background-start-rgb), 1),
rgba(var(--callout-rgb), 0.5)
);
background: linear-gradient(to bottom, rgba(var(--background-start-rgb), 1), rgba(var(--callout-rgb), 0.5));
background-clip: padding-box;
backdrop-filter: blur(24px);
}
Expand All @@ -194,11 +192,7 @@
inset: auto 0 0;
padding: 2rem;
height: 200px;
background: linear-gradient(
to bottom,
transparent 0%,
rgb(var(--background-end-rgb)) 40%
);
background: linear-gradient(to bottom, transparent 0%, rgb(var(--background-end-rgb)) 40%);
z-index: 1;
}
}
Expand Down
7 changes: 4 additions & 3 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from "next/image";
import styles from "./page.module.css";
import { FirstDomainExampleScreen } from "@sambad/domains/first-domain";
import { FirstDomainExampleScreen } from '@sambad/domains/first-domain';
import Image from 'next/image';

import styles from './page.module.css';

export default function Home() {
return (
Expand Down
7 changes: 4 additions & 3 deletions apps/web/app/second/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from "next/image";
import styles from "../page.module.css";
import { SecondDomainExampleScreen } from "@sambad/domains/second-domain";
import { SecondDomainExampleScreen } from '@sambad/domains/second-domain';
import Image from 'next/image';

import styles from '../page.module.css';

export default function Second() {
return (
Expand Down
8 changes: 1 addition & 7 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
}
]
},
"include": [
"next-env.d.ts",
"next.config.js",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "app/B.js", "app/A.js"],
"exclude": ["node_modules"]
}
6 changes: 3 additions & 3 deletions packages/core/sds/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/react-internal.js"],
parser: "@typescript-eslint/parser",
extends: ['@repo/eslint-config/react-internal.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: "./tsconfig.lint.json",
project: './tsconfig.lint.json',
tsconfigRootDir: __dirname,
},
};
2 changes: 1 addition & 1 deletion packages/core/sds/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# `sds`
# `sds`
6 changes: 3 additions & 3 deletions packages/core/ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/react-internal.js"],
parser: "@typescript-eslint/parser",
extends: ['@repo/eslint-config/react-internal.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: "./tsconfig.lint.json",
project: './tsconfig.lint.json',
tsconfigRootDir: __dirname,
},
};
17 changes: 4 additions & 13 deletions packages/core/ui/src/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
"use client";
'use client';

import { HTMLAttributes, ReactNode } from "react";
import { HTMLAttributes, ReactNode } from 'react';

interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
children: ReactNode;
className?: string;
appName: string;
}

export const Button = ({
children,
className,
appName,
...rest
}: ButtonProps) => {
export const Button = ({ children, className, appName, ...rest }: ButtonProps) => {
return (
<button
className={className}
onClick={() => alert(`Hello from your ${appName} app!`)}
{...rest}
>
<button className={className} onClick={() => alert(`Hello from your ${appName} app!`)} {...rest}>
{children}
</button>
);
Expand Down
8 changes: 1 addition & 7 deletions packages/core/ui/src/Code.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
export function Code({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}): JSX.Element {
export function Code({ children, className }: { children: React.ReactNode; className?: string }): JSX.Element {
return <code className={className}>{children}</code>;
}
6 changes: 3 additions & 3 deletions packages/core/ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { Button } from "./Button";
export { Card } from "./Card";
export { Code } from "./Code";
export { Button } from './Button';
export { Card } from './Card';
export { Code } from './Code';
6 changes: 3 additions & 3 deletions packages/domains/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@sambad/eslint-config/react-internal.js"],
parser: "@typescript-eslint/parser",
extends: ['@sambad/eslint-config/react-internal.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: "./tsconfig.lint.json",
project: './tsconfig.lint.json',
tsconfigRootDir: __dirname,
},
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from "@sambad/ui";
import { PropsWithChildren } from "react";
import { Button } from '@sambad/ui';

import type { PropsWithChildren } from 'react';

interface FirstFeatureOfFirstDomainBoxProps {
displayText: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Button } from "@sambad/ui";
import { HTMLAttributes, ReactNode } from "react";
import { useFirstFeatureOfFirstDomainTestButton } from "../hooks/useFirstFeatureOfFirstDomainTestButton";
import { Button } from '@sambad/ui';

interface FirstFeaturedOfFirstDomainTestButtonProps
extends HTMLAttributes<HTMLButtonElement> {
import { useFirstFeatureOfFirstDomainTestButton } from '../hooks/useFirstFeatureOfFirstDomainTestButton';

import type { HTMLAttributes, ReactNode } from 'react';

interface FirstFeaturedOfFirstDomainTestButtonProps extends HTMLAttributes<HTMLButtonElement> {
children?: ReactNode;
}

export const FirstFeatureOfFirstDomainTestButton = ({
children,
...rest
}: FirstFeaturedOfFirstDomainTestButtonProps) => {
const { testText, handleChangeTestText } =
useFirstFeatureOfFirstDomainTestButton();
const { testText, handleChangeTestText } = useFirstFeatureOfFirstDomainTestButton();

return (
<Button appName="sambad" onClick={handleChangeTestText} {...rest}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
"use client";
'use client';

import { FirstFeatureOfFirstDomainBox } from "../components/FirstFeatureOfFirstDomainTestBox";
import { FirstFeatureOfFirstDomainTestButton } from "../components/FirstFeatureOfFirstDomainTestButton";
import { useFirstFeatureOfFirstDomainService } from "../services/useFirstFeatureOfFirstDomainTestService";
import { FirstFeatureOfFirstDomainBox } from '../components/FirstFeatureOfFirstDomainTestBox';
import { FirstFeatureOfFirstDomainTestButton } from '../components/FirstFeatureOfFirstDomainTestButton';
import { useFirstFeatureOfFirstDomainService } from '../services/useFirstFeatureOfFirstDomainTestService';

export const FirstFeatureOfFirstDomainTestContainer = () => {
const { displayText, handleChangeDisplayText } =
useFirstFeatureOfFirstDomainService();
const { displayText, handleChangeDisplayText } = useFirstFeatureOfFirstDomainService();

return (
<FirstFeatureOfFirstDomainBox
displayText={displayText}
onClick={handleChangeDisplayText}
>
<FirstFeatureOfFirstDomainBox displayText={displayText} onClick={handleChangeDisplayText}>
<FirstFeatureOfFirstDomainTestButton
onClick={() => {
alert("Button is Clicked at Container");
alert('Button is Clicked at Container');
}}
/>
</FirstFeatureOfFirstDomainBox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState } from "react";
import { useState } from 'react';

export const useFirstFeatureOfFirstDomainTestButton = () => {
const [testText, setTestText] = useState<string>("Default Button Text");
const [testText, setTestText] = useState<string>('Default Button Text');

const handleChangeTestText = () => {
setTestText("Test Button is Clicked!!");
setTestText('Test Button is Clicked!!');
};

return {
Expand Down
Loading

0 comments on commit e52e9de

Please sign in to comment.