Skip to content

Commit

Permalink
Fix eslint issues in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 4, 2024
1 parent ece2aae commit 59fc606
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 3 deletions.
16 changes: 16 additions & 0 deletions apps/docs/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ const config = {
find: "ui",
replacement: resolve(__dirname, "../../../packages/ui/"),
},
{
find: "@ui",
replacement: resolve("../../packages/ui/src"),
},
{
find: "@dist",
replacement: resolve("../../packages/ui/dist"),
},
{
find: /#/,
replacement: `${resolve("../../packages/ui/src")}/`,
},
{
find: "@icon",
replacement: resolve("../../packages/icon/dist"),
},
],
},
};
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"devDependencies": {
"@marshallku/eslint-config": "workspace:*",
"@marshallku/typescript-config": "workspace:*",
"@storybook/addon-actions": "^7.6.7",
"@storybook/addon-docs": "^7.6.7",
"@storybook/addon-essentials": "^7.6.7",
Expand All @@ -25,9 +26,9 @@
"@storybook/react-vite": "^7.6.7",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"serve": "^14.2.1",
"storybook": "^7.6.7",
"@marshallku/typescript-config": "workspace:*",
"typescript": "^5.3.3",
"vite": "^5.0.10"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/stories/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Button } from "@marshallku/ui";
import { Button } from "@ui";

const meta: Meta<typeof Button> = {
component: Button,
Expand Down
10 changes: 9 additions & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"extends": "@marshallku/typescript-config/react-app.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"paths": {
"@ui": ["../../packages/ui/src"],
"#*": ["../../packages/ui/src/*"],
"@icon": ["../../packages/icon/dist"],
"@icon/*": ["../../packages/icon/dist/*"]
}
}
}
85 changes: 85 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59fc606

Please sign in to comment.