Skip to content

Commit

Permalink
Upgrade to Storybook 7 (#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster authored Apr 5, 2023
1 parent ea66d2d commit 487edea
Show file tree
Hide file tree
Showing 4 changed files with 15,512 additions and 37,248 deletions.
13 changes: 11 additions & 2 deletions assets/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'plugin:react/recommended',
'airbnb',
'prettier',
'plugin:storybook/recommended',
],
overrides: [],
parserOptions: {
Expand All @@ -41,15 +42,23 @@ module.exports = {
plugins: ['react', 'jest'],
rules: {
'no-console': 'error',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'react/prop-types': 'off',
camelcase: 'off',
'import/no-cycle': 'off',
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
{
allowShortCircuit: true,
allowTernary: true,
},
],
},
};
12 changes: 9 additions & 3 deletions assets/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
const path = require('path');

module.exports = {
stories: ['../**/*.stories.mdx', '../**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../js/**/*.stories.mdx', '../js/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-actions',
'@storybook/addon-interactions',
],
framework: '@storybook/react',
framework: {
name: '@storybook/react-webpack5',
options: {},
},
webpackFinal: async (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@components': path.resolve(__dirname, '../js/components'),
'@lib': path.resolve(__dirname, '../js/lib'),
'@hooks': path.resolve(__dirname, '../js/hooks'),
'@state': path.resolve(__dirname, '../js/state'),
'@static': path.resolve(__dirname, '../static'),
};
return config;
},
docs: {
autodocs: true,
},
};
Loading

0 comments on commit 487edea

Please sign in to comment.