Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storybooks exceptions to eslint config #1706

Closed
canda opened this issue Jan 24, 2018 · 2 comments
Closed

Add storybooks exceptions to eslint config #1706

canda opened this issue Jan 24, 2018 · 2 comments

Comments

@canda
Copy link

canda commented Jan 24, 2018

Shouldn't we add to the eslint rule import/no-extraneous-dependencies the files that are stories for storybook?
Their dependencies are actually dev dependencies.

the expression could be '**/*.stories.{js,jsx}'

@ljharb
Copy link
Collaborator

ljharb commented Jan 24, 2018

That's not the convention we follow for our storybook files (we do not colocate production files with dev files, so stories, like tests, live in their own top-level directory with a parallel structure to the actual code); also, using storybook itself isn't necessarily universal. I don't think this is useful for the time being.

@ljharb ljharb closed this as completed Jun 21, 2018
@OR13
Copy link

OR13 commented May 6, 2019

One way to handle this, if you do colocate... (modify for jsx as needed).

eslint --ext js --ignore-pattern *.stories.js src

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants