-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
30,831 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: ["plugin:react/recommended", "next/core-web-vitals", "prettier", "plugin:storybook/recommended"], | ||
overrides: [], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json'] | ||
}, | ||
plugins: ['react', 'simple-import-sort', 'import', 'unused-imports'], | ||
rules: { | ||
'react/prop-types': 'off', | ||
// js 사용시 missing in props validation 에러 제거 | ||
'simple-import-sort/imports': 'error', | ||
// import문의 sort 규칙 설정 | ||
'simple-import-sort/exports': 'error', | ||
// export문의 sort 규칙 설정 | ||
'import/first': 'error', | ||
// 모든 import문이 파일 선두에 위치해 있는 것 확인 | ||
'import/newline-after-import': 'error', | ||
// import문 아래 빈 줄 확인 | ||
'import/no-duplicates': 'error', | ||
// 같은 파일의 import문 머지 | ||
'unused-imports/no-unused-imports': 'error' // 미사용 import문 삭제 | ||
}, | ||
|
||
settings: { | ||
react: { | ||
version: 'detect' | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
printWidth: 80, // 1行で表示する文字数 | ||
tabWidth: 2, // インデントのサイズ | ||
useTabs: false, // インデントにスペースの代わりにタブを使うかどうか | ||
semi: true, // 文の後にセミコロンを付けるかどうか | ||
singleQuote: true, // 文字列をシングルクォートで囲むかどうか(falseだとダブルクォート) | ||
quoteProps: "as-needed", // オブジェクトのプロパティ名をクォートで囲むかどうか | ||
jsxSingleQuote: false, // JSX内のクォートをシングルクォートで囲むかどうか | ||
trailingComma: "es5", // 複数行のときの末尾のカンマを付けるかどうか | ||
bracketSpacing: true, // オブジェクトリテラルの{}内の前後にスペースを入れるかどうか | ||
bracketSameLine: false, // JSX内の要素の閉じタグを最後の行に含んで表示するか | ||
arrowParens: "always", // アロー関数の引数が1つのときにカッコで囲むかどうか | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: 'component' | ||
root: 'src/components' | ||
output: '.' | ||
ignore: [] | ||
questions: | ||
name: 'Please enter a component name.' | ||
--- | ||
|
||
# `{{ inputs.name | pascal }}/{{ inputs.name | pascal }}.tsx` | ||
|
||
```typescript | ||
import React from 'react'; | ||
|
||
import styles from './{{ inputs.name | pascal }}.module.css' | ||
|
||
const {{ inputs.name | pascal }} = () => { | ||
return ( | ||
<div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default {{ inputs.name | pascal }}; | ||
|
||
``` | ||
|
||
# `{{ inputs.name | pascal }}/{{ inputs.name | pascal }}.module.css` | ||
|
||
```css | ||
|
||
``` | ||
|
||
# `{{ inputs.name | pascal }}/{{ inputs.name | pascal }}.stories.ts` | ||
|
||
```typescript | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import {{ inputs.name | pascal }} from './{{ inputs.name | pascal }}'; | ||
|
||
const meta: Meta<typeof {{ inputs.name | pascal }}> = { | ||
title: 'Components/{{ inputs.name | pascal }}', | ||
component: {{ inputs.name | pascal }}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof {{ inputs.name | pascal }}>; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
type: 'primary', | ||
children: 'Button', | ||
}, | ||
}; | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
files: ['*'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs'; | ||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { Preview } from '@storybook/react'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
extends: [ | ||
'stylelint-config-recess-order', | ||
'stylelint-config-recommended-scss', | ||
], | ||
rules: { | ||
// ::before, ::after 콜론 2개로 고정 | ||
'selector-pseudo-element-colon-notation': 'double', | ||
// 클래스 명에서 & 사용 금지(&:hover 등은 허용) | ||
'scss/selector-no-union-class-name': true, | ||
// 싱글 쿼테이션으로 통일 | ||
'string-quotes': 'single', | ||
}, | ||
ignoreFiles: ['**/node_modules/**'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.fixAll.stylelint": "explicit" | ||
}, | ||
"stylelint.validate": ["css", "scss"], | ||
"css.validate": false, | ||
"scss.validate": false, | ||
"javascript.validate.enable": false, | ||
"typescript.validate.enable": true, | ||
|
||
"python.formatting.provider": "black", | ||
"python.formatting.blackArgs": ["--line-length", "100"] | ||
} |
Oops, something went wrong.