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

Start using a formatter (Prettier or BiomeJS) #7

Open
syrokomskyi opened this issue Nov 3, 2024 · 3 comments
Open

Start using a formatter (Prettier or BiomeJS) #7

syrokomskyi opened this issue Nov 3, 2024 · 3 comments
Labels
enhancement Refinement of an existing feature / component
Milestone

Comments

@syrokomskyi
Copy link

I like OnceUI's architecture and have started working with it on a new NextJS project. Some changes came up and I want to contribute them to open source. But my VS Code uses a formatter, and this formatter (I tried Prettier and BiomeJS) reformats your code. Please note which formatter and options to it you use for development.

And thanks for a good product! You have indeed done a great job.

@lorant-one
Copy link
Member

it's a pleasure to hear you're using Once UI and enjoying it so far @syrokomskyi! we haven't used anything for code formatting so far, but probably it's about time to settle with a standard for our project. you can get close to our formatting style with the following prettier settings:

{
  "arrowParens": "always",
  "bracketSameLine": true,
  "bracketSpacing": false,
  "semi": true,
  "experimentalTernaries": false,
  "singleQuote": false,
  "jsxSingleQuote": false,
  "quoteProps": "as-needed",
  "trailingComma": "all",
  "singleAttributePerLine": true,
  "htmlWhitespaceSensitivity": "css",
  "vueIndentScriptAndStyle": false,
  "proseWrap": "preserve",
  "insertPragma": false,
  "printWidth": 80,
  "requirePragma": false,
  "tabWidth": 4,
  "useTabs": true,
  "embeddedLanguageFormatting": "auto"
}

thank you for you contribution in advance, and feel free to propose changes to these settings! the best way to keep in touch with us is via Discord, but of course we're tracking and answering on all channels :)

@syrokomskyi
Copy link
Author

When you choose, look at biomejs: for webdev it is better than Prettier.

@lorant-one
Copy link
Member

thank you for the suggestion, will take a closer look!

@lorant-one lorant-one added the enhancement Refinement of an existing feature / component label Nov 18, 2024
@zsofiakm zsofiakm changed the title Design system for contributors Start using a formatter (Prettier or BiomeJS) Dec 9, 2024
@zsofiakm zsofiakm added this to the v0.5 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refinement of an existing feature / component
Projects
None yet
Development

No branches or pull requests

3 participants