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: Correct semicolon placement in devtools middleware #2705

Closed
wants to merge 1 commit into from

Conversation

jiji-hoon96
Copy link

Related Bug Reports or Discussions

Fixes #[Enter issue number here, or remove this line if there's no related issue]

Summary

This PR corrects the semicolon placement in the devtools middleware. Specifically, it adjusts the position of semicolons in the dispatch function redefinition section, improving code readability and preventing potential Automatic Semicolon Insertion (ASI) related issues.

Key changes:

  1. Added semicolon after const originalDispatch declaration
  2. Removed unnecessary semicolon before dispatch function redefinition
  3. Removed unnecessary semicolon before originalDispatch call
  4. Added semicolon after the function definition block

These changes improve code consistency and prevent potential syntax errors.

Check List

  • pnpm run prettier for formatting code and docs

Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zustand-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 2:59am

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

}
;(originalDispatch as any)(...a)
}
originalDispatch(...a);
Copy link
Member

Choose a reason for hiding this comment

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

does it work?

@dai-shi
Copy link
Member

dai-shi commented Aug 27, 2024

I don't disagree with the readability, but it's how prettier formats, and we simply use prettier with minimal config.

@dai-shi dai-shi closed this Aug 27, 2024
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