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
4 changes: 3 additions & 1 deletion .templates/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
1 change: 1 addition & 0 deletions .templates/component/src/Component.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Component } from './Component';

const meta = {
Expand Down
1 change: 1 addition & 0 deletions .templates/component/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [
"biomejs.biome",
"github.vscode-github-actions"
]
"recommendations": ["biomejs.biome", "github.vscode-github-actions"]
}
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
"source.fixAll.biome": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
Expand All @@ -22,5 +21,5 @@
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
}
}
1 change: 1 addition & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const englishOnly = /^[A-Za-z0-9\s!@#$%^&*(),.?":{}|<>_-]+$/;

// https://commitlint.js.org/reference/configuration.html#typescript-configuration
import { RuleConfigSeverity, type UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
// parserPreset: '',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"prepare": "husky",
"cz": "cz",
"format": "biome format --write",
"lint": "biome lint --write",
"lint": "biome lint",
"lint:fix": "biome check --write",
Comment on lines 8 to +10
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 format 스크립드도 있어서 역할을 확실히 분리하거나, 스크립트명 더 명확하게 바꾸면 좋을꺼 같아용~~
음.. fix:biome?

"dev:storybook": "storybook dev -p 6006 public",
"build:storybook": "storybook build public",
"serve:storybook": "serve storybook-static -p 6006",
Expand Down
4 changes: 3 additions & 1 deletion packages/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
4 changes: 3 additions & 1 deletion packages/avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
1 change: 1 addition & 0 deletions packages/avatar/src/Avatar.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style, styleVariants } from '@vanilla-extract/css';

import { AvatarShape, AvatarSize } from './Avatar';

export const root = style({
Expand Down
1 change: 1 addition & 0 deletions packages/avatar/src/Avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { faker } from '@faker-js/faker';
import type { Meta, StoryObj } from '@storybook/react';

import { Avatar } from './Avatar';

const meta = {
Expand Down
1 change: 1 addition & 0 deletions packages/avatar/src/Avatar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { faker } from '@faker-js/faker';
import { render, screen } from '@testing-library/react';
import { describe, expect, it, test } from 'vitest';

import { Avatar, type AvatarShape, type AvatarSize } from './Avatar';

const testImage = faker.image.avatar();
Expand Down
5 changes: 4 additions & 1 deletion packages/avatar/src/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';

import { Slot } from '@radix-ui/react-slot';

import { clsx as cx } from 'clsx';
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';

import * as styles from './Avatar.css';

export interface AvatarProps extends ComponentProps<'div'> {
Expand Down
1 change: 1 addition & 0 deletions packages/avatar/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
6 changes: 1 addition & 5 deletions packages/badge/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import type { StorybookConfig } from '@storybook/react-vite';

export default {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-links',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-links'],
framework: {
name: '@storybook/react-vite',
options: {},
Expand Down
1 change: 1 addition & 0 deletions packages/badge/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'sanitize.css';
import 'sanitize.css/typography.css';

import type { Preview } from '@storybook/react';

export default {
Expand Down
4 changes: 3 additions & 1 deletion packages/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
3 changes: 2 additions & 1 deletion packages/badge/src/Badge.css.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { style, styleVariants } from '@vanilla-extract/css';
import { color as colorToken, fontSize as fontSizeToken } from '@sipe-team/tokens';

import { style, styleVariants } from '@vanilla-extract/css';

// Define the types for our component
export const BadgeSize = {
small: 'small',
Expand Down
1 change: 1 addition & 0 deletions packages/badge/src/Badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Badge, type BadgeSize, type BadgeVariant } from './Badge';
import { BadgeSize as BadgeSizeEnum, BadgeVariant as BadgeVariantEnum } from './Badge.css';

Expand Down
4 changes: 3 additions & 1 deletion packages/badge/src/Badge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { color as colorToken } from '@sipe-team/tokens';

import { render, screen } from '@testing-library/react';
import { expect, test } from 'vitest';

import { Badge } from './Badge';
import { color as colorToken } from '@sipe-team/tokens';

test('children으로 입력한 텍스트를 표시한다.', () => {
render(<Badge>테스트</Badge>);
Expand Down
5 changes: 4 additions & 1 deletion packages/badge/src/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';

import { Typography } from '@sipe-team/typography';

import { clsx as cx } from 'clsx';
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';

import * as styles from './Badge.css';

export type BadgeSize = keyof typeof styles.BadgeSize;
Expand Down
1 change: 1 addition & 0 deletions packages/badge/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
4 changes: 3 additions & 1 deletion packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
1 change: 1 addition & 0 deletions packages/button/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
6 changes: 1 addition & 5 deletions packages/card/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import type { StorybookConfig } from '@storybook/react-vite';

export default {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-links',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-links'],
framework: {
name: '@storybook/react-vite',
options: {},
Expand Down
1 change: 1 addition & 0 deletions packages/card/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'sanitize.css';
import 'sanitize.css/typography.css';

import type { Preview } from '@storybook/react';

export default {
Expand Down
4 changes: 3 additions & 1 deletion packages/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
1 change: 1 addition & 0 deletions packages/card/src/Card.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { color } from '@sipe-team/tokens';

import { recipe } from '@vanilla-extract/recipes';

export const CardVariant = {
Expand Down
1 change: 1 addition & 0 deletions packages/card/src/Card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Card } from './Card';

const meta = {
Expand Down
2 changes: 2 additions & 0 deletions packages/card/src/Card.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { color } from '@sipe-team/tokens';

import { render, screen } from '@testing-library/react';
import { expect, test } from 'vitest';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove extra blank line inside the external import group.

Line 5 splits external-package imports into two groups; keep them contiguous and only separate between major groups.

Proposed fix
 import { render, screen } from '@testing-library/react';
 import { expect, test } from 'vitest';
-
 import { Card } from './Card';

As per coding guidelines, "**/*.{ts,tsx}: Enforce import order: node → react → @sipe-team/* → @vanilla-extract/* → @radix-ui/* → external packages → relative paths, with blank lines between groups".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/card/src/Card.test.tsx` at line 5, In Card.test.tsx, remove the
extra blank line that splits the external-package imports in the top import
block so all external imports are contiguous; locate the import statements for
external packages (the imports after the `@radix-ui/`* / external group) and join
them without an empty line between them while keeping a blank line separating
major groups (node/react/@sipe-team/@vanilla-extract/@radix-ui → external →
relative).

import { Card } from './Card';

test('children으로 넘어간 요소를 반환한다. ', () => {
Expand Down
7 changes: 5 additions & 2 deletions packages/card/src/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';

import { Slot } from '@radix-ui/react-slot';

import { clsx as cx } from 'clsx';
import { type ComponentProps, type ForwardedRef, forwardRef } from 'react';
import { card, type CardVariant, type CardRatio } from './Card.css';

import { type CardRatio, type CardVariant, card } from './Card.css';

export interface CardProps extends ComponentProps<'div'> {
asChild?: boolean;
Expand Down
1 change: 1 addition & 0 deletions packages/card/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
4 changes: 3 additions & 1 deletion packages/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
2 changes: 2 additions & 0 deletions packages/checkbox/src/Checkbox.css.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { color } from '@sipe-team/tokens';

import type { RecipeVariants } from '@vanilla-extract/recipes';
import { recipe } from '@vanilla-extract/recipes';

import { CheckboxSize } from './Checkbox';

export const CHECKBOX_SIZES = {
Expand Down
4 changes: 3 additions & 1 deletion packages/checkbox/src/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { useState } from 'react';

import type { Meta, StoryObj } from '@storybook/react';

import { Checkbox } from './Checkbox';
import { useCheckboxGroup } from './hooks/useCheckboxGroup';

Expand Down
5 changes: 3 additions & 2 deletions packages/checkbox/src/Checkbox.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { describe, expect, test, vi } from 'vitest';
import { Checkbox, CheckboxSize, type CheckBoxRootBaseProps } from './Checkbox';

import { type CheckBoxRootBaseProps, Checkbox, CheckboxSize } from './Checkbox';
import { CHECKBOX_SIZES } from './Checkbox.css';
import userEvent from '@testing-library/user-event';

const RenderBasicCheckbox = ({ label, ...props }: CheckBoxRootBaseProps & { label?: string }) => {
return (
Expand Down
10 changes: 6 additions & 4 deletions packages/checkbox/src/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import clsx from 'clsx';
import {
type ChangeEventHandler,
type ComponentProps,
createContext,
forwardRef,
type Ref,
useContext,
useId,
type ChangeEventHandler,
type ComponentProps,
type Ref,
} from 'react';

import clsx from 'clsx';

import { container, input, label } from './Checkbox.css';
import { useControllableState } from './hooks/useControllableState';

Expand Down
1 change: 1 addition & 0 deletions packages/checkbox/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineProject, mergeConfig } from 'vitest/config';

import defaultConfig from '../../vitest.config';

export default mergeConfig(
Expand Down
4 changes: 3 additions & 1 deletion packages/divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},
"type": "module",
"exports": "./src/index.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"build:storybook": "storybook build",
Expand Down
2 changes: 2 additions & 0 deletions packages/divider/src/Divider.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { color } from '@sipe-team/tokens';

import { style, styleVariants } from '@vanilla-extract/css';

import type { ColorType, OrientationType } from './constants';

export const base = style({
Expand Down
4 changes: 3 additions & 1 deletion packages/divider/src/Divider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Typography } from '@sipe-team/typography';

import type { Meta, StoryObj } from '@storybook/react';
import { Divider } from './Divider';

import { DIVIDER_COLORS, DIVIDER_ORIENTATIONS } from './constants';
import { Divider } from './Divider';

const meta = {
title: 'Components/Divider',
Expand Down
2 changes: 2 additions & 0 deletions packages/divider/src/Divider.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { color } from '@sipe-team/tokens';

import { render, screen } from '@testing-library/react';
import { describe, expect, test } from 'vitest';

import { Divider } from './Divider';

describe('Divider', () => {
Expand Down
Loading
Loading