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

Storybook: add eslint-plugin-storybook and fix issues #446

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

daneah
Copy link
Member

@daneah daneah commented Nov 8, 2022

This change: (check at least one)

  • Adds a new feature
  • Fixes a bug
  • Improves maintainability
  • Improves documentation
  • Is a release activity

Is this a breaking change? (check one)

  • Yes
  • No

Is the: (complete all)

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite(s) passing?
  • Code coverage maximal?
  • Changeset added?
  • Component status page up to date?

What does this change address?

Resolves #286

How does this change work?

  • Install plugin
  • Add plugin to eslint configuration
  • Update eslint command to include appropriate file extensions
  • Fix errors

Additional context

This is currently at odds with storybookjs/storybook#13362 because removing the unused argument to the render function in the React stories causes the Docs tab to show No code available for each example. The web components Storybook doesn't suffer from this issue.

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2022

⚠️ No Changeset found

Latest commit: 07e88c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

size-limit report 📦

Path Size
packages/pharos/lib/index.js 46.46 KB (0%)

Comment on lines +16 to +18
babelOptions: {
presets: ['@babel/preset-react'],
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a necessary addition to get JSX playing nicely; the ecmaFeatures: { jsx: true } } wasn't sufficient on its own.

@@ -21,6 +29,7 @@ module.exports = {
},
rules: {
'no-smart-quotes/no-smart-quotes': 'error',
'react/react-in-jsx-scope': 'off',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed in React 17+.

@daneah daneah marked this pull request as ready for review November 8, 2022 23:41
@daneah daneah requested a review from a team as a code owner November 8, 2022 23:41
@daneah daneah requested review from chrisjbrown, SMQuazi and satya-achanta-venkata and removed request for a team November 8, 2022 23:41
- Fix style attributes that were strings instead of objects
- Fix misconfigured `docs` meta property
@daneah daneah merged commit ba80a3c into develop Nov 10, 2022
@daneah daneah deleted the feat/add-storybook-eslint branch November 10, 2022 01:46
daneah added a commit that referenced this pull request Nov 10, 2022
* develop:
  Tabs: fix initial tab selection in more cases (#449)
  Storybook: add eslint-plugin-storybook and fix issues (#446)
  feat(storybook): install Measure and Outline addons (#445)
  Docs: update copy for Button's on-background usage (#444)
  Storybook: Convert stories to CSF 3 (#435)
  feat(tabs): fire event when tab selected programmatically (#442)
  ToggleButton: indicate toggle button state on underlying button elements (#438)
  Tooltip, DropdownMenu: replace popperjs with floating-ui (#434)
  Site: improve imports (#433)
sirrah-tam pushed a commit to sirrah-tam/pharos that referenced this pull request Dec 1, 2023
* feat(storybook): add eslint-plugin-storybook and fix issues

* fix(storybook): remove unused args from story signatures

* fix(storybook): remove previously ignored linting issues

* fix(storybook): fix missing and erroring React stories

- Fix style attributes that were strings instead of objects
- Fix misconfigured `docs` meta property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate Storybook ESLint plugin
2 participants