Skip to content

Commit

Permalink
Configure storybook and eslint plugin for storybook - last
Browse files Browse the repository at this point in the history
  • Loading branch information
zourdyzou committed Jul 20, 2022
1 parent 5d816e9 commit 2f4e1cf
Show file tree
Hide file tree
Showing 48 changed files with 269,461 additions and 61 deletions.
13 changes: 11 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const path = require('path');

module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.tsx"
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
Expand All @@ -12,5 +14,12 @@ module.exports = {
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-webpack5"
}
},
webpackFinal: (config) => ({
...config,
resolve: {
...config.resolve,
alias: { ...config.resolve.alias, '@': path.resolve(__dirname, 'src') },
},
}),
}
14 changes: 7 additions & 7 deletions package-lock.json

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

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
"@babel/preset-typescript": "^7.17.12",
"@babel/register": "~7.16.7",
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-interactions": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/builder-webpack5": "^6.5.9",
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9",
"@storybook/addon-interactions": "^6.4.19",
"@storybook/addon-actions": "^6.4.19",
"@storybook/addon-essentials": "^6.4.19",
"@storybook/addon-links": "^6.4.19",
"@storybook/builder-webpack5": "^6.4.19",
"@storybook/manager-webpack5": "^6.4.19",
"@storybook/react": "^6.4.19",
"@storybook/testing-library": "^0.0.13",
"@svgr/webpack": "~6.1.2",
"@teamsupercell/typings-for-css-modules-loader": "~2.5.1",
Expand Down
13 changes: 0 additions & 13 deletions src/components/legend/Legend.stories.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions src/components/legend/Legend.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/legend/legend.module.scss

This file was deleted.

1 change: 1 addition & 0 deletions src/stories/Page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const LoggedOut = Template.bind({});
export const LoggedIn = Template.bind({});

// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
// @ts-ignore
LoggedIn.play = async ({ canvasElement }) => {
const canvas = within(canvasElement);
const loginButton = await canvas.getByRole("button", { name: /Log in/i });
Expand Down
Loading

0 comments on commit 2f4e1cf

Please sign in to comment.