-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: MYONG JAEWI <[email protected]>
- Loading branch information
1 parent
6ba2258
commit 32fbd5f
Showing
132 changed files
with
15,149 additions
and
22,607 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,143 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"es2020": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:storybook/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:import/typescript" | ||
], | ||
"ignorePatterns": [ | ||
"dist", | ||
"*.config.ts", | ||
"*.common.js", | ||
"*.prod.js", | ||
"*.dev.js", | ||
"*.polyfills.js" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["react-refresh", "react", "import", "@typescript-eslint"], | ||
"settings": { | ||
"import/core-modules": ["@jest/globals"], | ||
"import/resolver": { | ||
"typescript": { | ||
"project": "../tsconfig.base.json", | ||
"alwaysTryTypes": true | ||
}, | ||
"node": { | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"padding-line-between-statements": [ | ||
"error", | ||
{ "blankLine": "always", "prev": "*", "next": "return" }, | ||
{ | ||
"blankLine": "always", | ||
"prev": ["const", "let", "var", "function", "block-like"], | ||
"next": "*" | ||
}, | ||
{ | ||
"blankLine": "any", | ||
"prev": ["const", "let", "var"], | ||
"next": ["const", "let", "var"] | ||
}, | ||
{ "blankLine": "always", "prev": "case", "next": "*" } | ||
], | ||
"prefer-template": "error", | ||
"object-shorthand": ["error", "always"], | ||
"prefer-arrow-callback": "error", | ||
"func-style": ["error", "expression", { "allowArrowFunctions": true }], | ||
"arrow-body-style": ["error", "as-needed"], | ||
"consistent-return": "error", | ||
"curly": ["error", "all"], | ||
"default-case": "error", | ||
"default-case-last": "error", | ||
"no-fallthrough": "error", | ||
"import/newline-after-import": ["error", { "count": 1 }], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
["builtin", "external"], | ||
["internal"], | ||
["parent", "sibling", "index", "type"] | ||
], | ||
"warnOnUnassignedImports": true, | ||
"alphabetize": { "order": "asc" }, | ||
"newlines-between": "always", | ||
"distinctGroup": false, | ||
"pathGroups": [ | ||
{ | ||
"pattern": "@storybook/**", | ||
"group": "external", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@/**", | ||
"group": "internal", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "../", | ||
"group": "parent", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "./components", | ||
"group": "sibling", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "./hooks", | ||
"group": "sibling", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "./*.style", | ||
"group": "sibling", | ||
"position": "after" | ||
} | ||
] | ||
} | ||
], | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
], | ||
"react-refresh/only-export-components": [ | ||
"error", | ||
{ "allowConstantExport": false } | ||
], | ||
"react/no-unknown-property": ["error", { "ignore": ["css"] }], | ||
"import/no-default-export": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.tsx", "*.d.ts"], | ||
"rules": { | ||
"import/no-default-export": "off", | ||
"import/prefer-default-export": "error" | ||
} | ||
} | ||
] | ||
} |
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
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
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 @@ | ||
storybook-static |
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,66 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
import { Configuration } from 'webpack'; | ||
import path from 'path'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.mdx', '../**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-webpack5-compiler-swc', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
webpackFinal: async (config: Configuration) => { | ||
config.module = config.module || {}; | ||
config.module.rules = config.module.rules || []; | ||
|
||
const imageRule = config.module.rules.find((rule) => | ||
rule?.['test']?.test('.svg') | ||
); | ||
|
||
if (imageRule) { | ||
imageRule['exclude'] = /\.svg$/; | ||
} | ||
|
||
config.module?.rules?.push( | ||
{ | ||
test: /\.(ts|tsx)$/, | ||
use: [ | ||
{ | ||
loader: require.resolve('ts-loader'), | ||
options: { | ||
transpileOnly: true, | ||
compilerOptions: { | ||
jsx: 'react-jsx', | ||
jsxImportSource: '@emotion/react', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
use: ['@svgr/webpack'], | ||
} | ||
); | ||
|
||
config.resolve = { | ||
...config.resolve, | ||
alias: { | ||
...config.resolve?.alias, | ||
'@design': path.resolve(__dirname, '../.'), | ||
'@': path.resolve(__dirname, '../../frontend/src'), | ||
}, | ||
}; | ||
|
||
return config; | ||
}, | ||
|
||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
}; | ||
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,40 @@ | ||
import React from 'react'; | ||
import { ThemeProvider } from '@emotion/react'; | ||
import type { Preview } from '@storybook/react'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import GlobalStyles from '../style/GlobalStyles'; | ||
import { theme } from '../style/theme'; | ||
import { AuthProvider, ToastProvider } from '../../frontend/src/contexts'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
|
||
const queryClient = new QueryClient(); | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
layout: 'centered', | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<QueryClientProvider client={queryClient}> | ||
<AuthProvider> | ||
<ToastProvider> | ||
<ThemeProvider theme={theme}> | ||
<GlobalStyles /> | ||
<MemoryRouter> | ||
<Story /> | ||
</MemoryRouter> | ||
</ThemeProvider> | ||
</ToastProvider> | ||
</AuthProvider> | ||
</QueryClientProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default preview; |
2 changes: 1 addition & 1 deletion
2
...components/AuthorInfo/AuthorInfo.style.ts → design-system/AuthorInfo/AuthorInfo.style.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
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
Oops, something went wrong.