Storybook: .storybook folder is a dotfile and ignored by default by eslint

Created on 4 Jul 2016  路  5Comments  路  Source: storybookjs/storybook

currently config.js and webpack.config.js under ./.storybook is ignored by default by eslint. As the dotfiles option of eslint (https://github.com/eslint/eslint/blob/fca067938fcd54c98945356b41c8c9a7dc404c04/tests/lib/ignored-paths.js#L91) can't be disabled on the command line, these files never get linted.

Most helpful comment

You can pass config directory as a CLI option:

start-storybook -c my-storybook-dir

Alternatively, you can put this line to your .eslintignore file:

!.storybook

All 5 comments

Yep. May be you should change the config directory.
Check this: https://github.com/kadirahq/react-storybook/blob/master/docs/configure_storybook.md#configuration-directory

I'm closing this in favour of above. If you are looking for something else, reopen with more info.

can we reopen this issue? the above link does not work any more

You can pass config directory as a CLI option:

start-storybook -c my-storybook-dir

Alternatively, you can put this line to your .eslintignore file:

!.storybook

And don't forget to add the same line to .prettierignore if you're using that!

Was this page helpful?
0 / 5 - 0 ratings