Skip to content

Commit

Permalink
chore: implement storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Oct 21, 2024
1 parent 82d4b91 commit e8e9c3f
Show file tree
Hide file tree
Showing 6 changed files with 13,591 additions and 6,501 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ yarn-error.log*
# firebase emulators
*.log
emulator_data

*storybook.log
16 changes: 16 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
};
export default config;
6 changes: 6 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Preview } from '@storybook/react';
import '../src/index.css';

const preview: Preview = {};

export default preview;
8 changes: 5 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import eslintConfigPrettier from 'eslint-config-prettier';
import prettier from 'eslint-plugin-prettier';
import reactPlugin from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import eslintPluginStorybook from 'eslint-plugin-storybook';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import tsEslint from 'typescript-eslint';

// eslint.config.js
export default tseslint.config(
export default tsEslint.config(
...eslintPluginStorybook.configs['flat/recommended'],
js.configs.recommended,
...tseslint.configs.recommended,
...tsEslint.configs.recommended,
{
...reactPlugin.configs.flat.recommended,
languageOptions: {
Expand Down
Loading

0 comments on commit e8e9c3f

Please sign in to comment.