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

feat: add eslint-plugin-ssr-friendly #15903

Conversation

alisonjoseph
Copy link
Member

@alisonjoseph alisonjoseph commented Mar 6, 2024

Closes #14283

Changelog

New

  • add eslint-plugin-ssr-friendly

Changed

  • update SliderSkeleton to set document inside useIsomorphicEffect
  • add eslint ignore to test file and storybook files

Testing / Reviewing

Make sure Menu and SliderSkeleton still behave as expected.

Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 4d229ba
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65fb0570038bb50008ae792d
😎 Deploy Preview https://deploy-preview-15903--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tay1orjones
Copy link
Member

I think a lot of the errors could be resolved by putting the various calls to document into useIsomorphicEffect()

@alisonjoseph alisonjoseph marked this pull request as ready for review March 12, 2024 19:07
@alisonjoseph alisonjoseph requested a review from a team as a code owner March 12, 2024 19:07
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Looks good, just one suggestion

packages/react/src/components/Menu/Menu.stories.js Outdated Show resolved Hide resolved
@andreancardona andreancardona added this pull request to the merge queue Mar 27, 2024
Merged via the queue into carbon-design-system:main with commit 325a5b0 Mar 27, 2024
20 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.54.0 was just released that references this issue/PR.

preetibansalui pushed a commit to tay1orjones/carbon that referenced this pull request Apr 24, 2024
* feat: add eslint-plugin-ssr-friendly

* fix: eslint ssr-friendly errors

* chore: ignore test and story files

* chore: remove ignore line from story and test files

* fix: undo menu changes and add comment
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.

Ensure changes made to @carbon/react are SSR compatible with eslint-plugin-ssr-friendly
3 participants