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

fix: Disable "no-anonymous-default-exports" rule in tests #82

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

bytetyde
Copy link
Contributor

This extends the test glob pattern to include storybook stories. So Component.stories.tsx files are treated like tests and get more relaxed rules applied.
Besides that, the rule no-anonymous-default-exports gets disabled because .stories.tsx files usually default export an anonymous object with the configuration of the story.
Since this configuration object doesn't get used somewhere else in the application just by the storybook pipeline a meaningful name for the object isn't necessary.

So this is allowed with this change:

export default {
	title: "Button",
	component: Button,
	decorators: [withKnobs],
};

Extend test glob pattern to include storybook stories
@bytetyde bytetyde requested a review from jhnns February 19, 2020 17:12
@bytetyde bytetyde self-assigned this Feb 19, 2020
@jhnns jhnns merged commit 01f4cd4 into master Mar 5, 2020
@jhnns jhnns deleted the ignore-anonymous-default-export-in-tests branch March 5, 2020 12:18
github-actions bot pushed a commit that referenced this pull request Mar 5, 2020
# [27.2.0](v27.1.3...v27.2.0) (2020-03-05)

### Bug Fixes

* Disable "no-anonymous-default-exports" rule in tests ([#82](#82)) ([01f4cd4](01f4cd4))

### Features

* Add prefer array shorthand style option ([#81](#81)) ([fb9f50a](fb9f50a))
@github-actions
Copy link

github-actions bot commented Mar 5, 2020

🎉 This PR is included in version 27.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants