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/enhance prettier config #2990

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

kretajak
Copy link
Contributor

Summary

Prettier configuration is tweaked to pretty more files.

Check List

  • pnpm run fix for formatting and linting code and docs

Copy link

vercel bot commented Feb 17, 2025

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

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 11:35pm

@@ -73,7 +73,6 @@
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"tabs": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prettier reported it's ignored.

Copy link

codesandbox-ci bot commented Feb 17, 2025

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.

Copy link

pkg-pr-new bot commented Feb 17, 2025

Open in Stackblitz

More templates

npm i https://pkg.pr.new/jotai@2990

commit: f6b4886

Copy link

github-actions bot commented Feb 17, 2025

LiveCodes Preview in LiveCodes

Latest commit: f6b4886
Last updated: Feb 19, 2025 11:34pm (UTC)

Playground Link
React demo https://livecodes.io?x=id/6ZC4J7S4K

See documentations for usage instructions.

@@ -73,7 +73,6 @@
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"tabs": false,
"trailingComma": "all",
"tailwindConfig": "./tailwind.config.js"
Copy link
Contributor Author

@kretajak kretajak Feb 17, 2025

Choose a reason for hiding this comment

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

This line produces warnings as prettier first of all do not have configured plugins: ["prettier-plugin-tailwindcss"], but even if added, it produces error that prettier-plugin-tailwindcss cannot be found. That's because it's not a monorepo and prettier from root does not sees plugin from website.

Options I see:

  • remove this tailwind prettier plugin and corresponding config (seems not working to me anyway)
  • add website to root .prettierignore, add new test:format command to package.json of website and modify Github workflow to run new test:format inside webside folder.

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove "prettier" config in website/package.json entirely and remove prettier-plugin-tailwindcss for now.

I'll ask @sandren later if they want it and will add it in the root package.json if necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Plugin removed as well as prettier config in website/package.json. ✅

.prettierignore Outdated
@@ -1,4 +1,3 @@
dist
package.json
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 make something too weird if we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed. I do not see any problems with package.json and prettier for now.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

This looks great!

We make all three repos in sync: zustand, jotai and valtio.
Can you please open two PRs for the same change in https://github.com/pmndrs/zustand and https://github.com/pmndrs/valtio ?

I'll merge three of them all at once.

@kretajak
Copy link
Contributor Author

This looks great!

We make all three repos in sync: zustand, jotai and valtio. Can you please open two PRs for the same change in https://github.com/pmndrs/zustand and https://github.com/pmndrs/valtio ?

I'll merge three of them all at once.

@dai-shi dai-shi merged commit 9d46ca2 into pmndrs:main Feb 20, 2025
44 checks passed
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