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

chore(deps): update dependency eslint-plugin-react-hooks to v5 #1052

Merged

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
eslint-plugin-react-hooks (source) ^4.6.0 -> ^5.0.0 age adoption passing confidence

Release Notes

facebook/react (eslint-plugin-react-hooks)

v5.0.0

Compare Source

  • New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means _Button or _component are no longer valid. (@​kassens) in #​25162

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

coderabbitai bot commented Oct 24, 2024

Walkthrough

The package.json file for the client has been updated to modify the version of the eslint-plugin-react-hooks dependency. The version has changed from ^4.6.0 to ^5.0.0, with no other alterations made to dependencies or scripts within the file.

Changes

File Change Summary
Client/package.json Updated eslint-plugin-react-hooks from ^4.6.0 to ^5.0.0

Possibly related PRs

Suggested reviewers

  • ajhollid

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d680593 and 285f8ff.

⛔ Files ignored due to path filters (1)
  • Client/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • Client/package.json (1 hunks)
🔇 Additional comments (1)
Client/package.json (1)

44-44: Yo! Heads up on some breaking changes in this major version bump!

The upgrade to eslint-plugin-react-hooks v5 introduces some spicy changes that might make your palms sweaty:

  • Component names must now start with uppercase (no more _Button or _component)
  • React.use() is now treated the same as use()
  • Hooks in async functions are now disallowed
  • useEvent has been renamed to useEffectEvent

Let's check if any components might break with these new rules:

✅ Verification successful

Yo dawg, looks like we're in the clear with this upgrade! 🍝

Our deep dive into the codebase shows no signs of the breaking changes causing trouble - there's no vomit on this sweater! We checked for:

  • Components starting with lowercase (none found)
  • Hooks chillin' in async functions (nada)
  • Any useEvent usage that needs renaming (clean as mom's kitchen)

The upgrade to eslint-plugin-react-hooks v5 should slide through smoother than spaghetti! Just keep these breaking changes in your back pocket for future development:

  • Keep them component names starting with uppercase
  • No hooks in async functions
  • Remember useEvent is now useEffectEvent
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for potentially affected components
echo "Checking for components starting with underscore..."
rg -g '*.{jsx,tsx}' '(function|const)\s+_[A-Z]\w+' 

echo "Checking for async functions with hooks..."
ast-grep --pattern 'async function $NAME() {
  $$$
  use$_($$$)
  $$$
}'

echo "Checking for useEvent hook usage..."
rg -g '*.{jsx,tsx}' 'useEvent\('

Length of output: 451


Script:

#!/bin/bash
# Let's try a different approach to find potential issues

# Check for components with lowercase names
echo "Checking for lowercase component names..."
rg -g '*.{jsx,tsx}' '(function|const|let)\s+[a-z]\w+\s*=\s*(React\.)?memo\(|export\s+(?:default\s+)?function\s+[a-z]\w+\s*\('

# Check for hooks in async functions (with more context)
echo "Checking for hooks in async functions..."
rg -g '*.{jsx,tsx}' 'async.*\{[\s\S]*use[A-Z]' -A 5

# Check for useEvent with more context
echo "Checking for useEvent (including React.useEvent)..."
rg -g '*.{jsx,tsx}' '(React\.)?useEvent' -A 2

# Check ESLint config to see current rules
echo "Checking ESLint configuration..."
fd -e js -e json -e yaml -e yml -g '*eslint*' --exec cat {}

Length of output: 665


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ajhollid ajhollid merged commit 07a918b into bluewave-labs:develop Oct 24, 2024
1 check passed
@renovate-bot renovate-bot deleted the renovate/major-react-monorepo branch October 24, 2024 03:08
@coderabbitai coderabbitai bot mentioned this pull request Nov 25, 2024
1 task
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

Successfully merging this pull request may close these issues.

2 participants