diff --git a/.husky/pre-commit b/.husky/pre-commit index 61c8331..2312dc5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ npx lint-staged -npx lint-staged diff --git a/package.json b/package.json index 93597fa..b48b6c0 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint --cache 'src/**/*.{ts,tsx}'", + "tsc": "tsc --noEmit", "format": "prettier --write --cache 'src/**/*.{ts,tsx}'", "lint-staged": "lint-staged", "preview": "vite preview", @@ -18,15 +19,14 @@ "lint-staged": { "**/*.{tsx,ts,jsx,js}": [ "eslint --fix --cache", - "prettier --write --cache" - ], - "*.js": "eslint --cache --fix", - "*.{ts,tsx}": "prettier --write" + "prettier --write --cache" + ] }, "dependencies": { "@emotion/babel-plugin": "^11.12.0", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", + "@emotion/css": "^11.13.0", "@tanstack/react-query": "^5.56.2", "csstype": "^3.1.3", "react": "^18.3.1", @@ -35,7 +35,6 @@ }, "devDependencies": { "@chromatic-com/storybook": "^2.0.2", - "@emotion/css": "^11.13.0", "@eslint/js": "^9.9.0", "@storybook/addon-essentials": "^8.3.0", "@storybook/addon-interactions": "^8.3.0", diff --git a/src/assets/styles/global/GlobalStyles.tsx b/src/components/providers/GlobalStylesProvider/GlobalStyles.tsx similarity index 100% rename from src/assets/styles/global/GlobalStyles.tsx rename to src/components/providers/GlobalStylesProvider/GlobalStyles.tsx diff --git a/src/assets/styles/StyleProvider.tsx b/src/components/providers/GlobalStylesProvider/index.provider.tsx similarity index 57% rename from src/assets/styles/StyleProvider.tsx rename to src/components/providers/GlobalStylesProvider/index.provider.tsx index c3f4eac..9422bfe 100644 --- a/src/assets/styles/StyleProvider.tsx +++ b/src/components/providers/GlobalStylesProvider/index.provider.tsx @@ -1,13 +1,13 @@ import { ReactNode } from 'react'; import { ThemeProvider } from '@emotion/react'; -import GlobalStyles from './global/GlobalStyles'; -import theme from './theme'; +import GlobalStyles from './GlobalStyles'; +import theme from '@assets/styles/theme'; interface Props { children: ReactNode; } -const StyleProvider = ({ children }: Props) => { +const GlobalStylesProvider = ({ children }: Props) => { return ( @@ -16,4 +16,4 @@ const StyleProvider = ({ children }: Props) => { ); }; -export default StyleProvider; +export default GlobalStylesProvider; diff --git a/src/components/providers/index.tsx b/src/components/providers/index.tsx new file mode 100644 index 0000000..4b12809 --- /dev/null +++ b/src/components/providers/index.tsx @@ -0,0 +1,6 @@ +import { ReactNode } from 'react'; +import GlobalStylesProvider from './GlobalStylesProvider/index.provider'; + +export default function AppProviders({ children }: { children: ReactNode }) { + return {children}; +} diff --git a/src/main.tsx b/src/main.tsx index 7045851..796f90e 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,9 +1,9 @@ import { createRoot } from 'react-dom/client'; import App from './App.tsx'; -import StyleProvider from '@assets/styles/StyleProvider'; +import AppProviders from '@components/providers/index.tsx'; createRoot(document.getElementById('root')!).render( - + - , + , );