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(docs): use named imports for "produce" (instead of default import) #1029

Closed
wants to merge 1 commit into from

Conversation

skratchdot
Copy link

@skratchdot skratchdot commented Mar 29, 2023

I decided to update the docs after my comment here:
#1015 (comment)

All I did was change:

import produce from "immer"

to:

import {produce} from "immer"

The other formatting changes are due to the pre-commit hook:
image

I used {produce} instead of { produce } to follow the other examples in this repo (even though I typically use the "extra spaces for padding").

Let me know if there's anything else I should do. Thanks for the great work on this project!

@skratchdot
Copy link
Author

skratchdot commented Mar 29, 2023

what's odd is prettier seems to "flip-flop" the following html:

</center>
<details>

and:

</center> <details>

i use vscode with "auto format on save" and actually disabled it when making my changes. but the pre-commit hook "re-added" the changes.

i'm just now noticing the diff, and the same "flip-flopping" happened. Perhaps I should make my changes again, and commit with -n so the pre-commit hook doesn't run?

Or we could figure out how to prevent the format flip-flopping? Perhaps a newline between the 2 tags would stop it? 🤷

EDIT:

Here's what happens with "auto format on save" in my editor, and repeatedly typing cmd + s. i guess our pre-commit hook will have the same issue.

formatting-toggle

perhaps upgrading prettier will "fix" the issue?

@skratchdot skratchdot force-pushed the docs-default-import branch from cec1fa9 to 0083ba3 Compare March 29, 2023 04:51
@skratchdot
Copy link
Author

i'm updating the old commit (that used pre-commit):
cec1fa9

and using a new one (that skips the pre-commit):
0083ba3

the diff looks a litter nicer now

@mweststrate
Copy link
Collaborator

I suspect most of these changes are already made in #1028, you'd have to target branch immer-10 to be sure.

@skratchdot
Copy link
Author

@mweststrate - it looks like they are! i will close out this pr. i still see some "flip-flopping" of the </center> <details> in that pr. maybe i'll look into that at some point (but it doesn't seem like a big deal).

@skratchdot skratchdot closed this Mar 29, 2023
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