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

Prettier disabled, how to format? #1

Open
Arinji2 opened this issue Oct 17, 2024 · 4 comments
Open

Prettier disabled, how to format? #1

Arinji2 opened this issue Oct 17, 2024 · 4 comments

Comments

@Arinji2
Copy link

Arinji2 commented Oct 17, 2024

heya, quick question but why is the default formatter disabled for this challenge? I quite like prettier with its vscode extension lol, is there any reason + can we remove your vscode settings and use prettier?

@w3cj
Copy link
Owner

w3cj commented Oct 17, 2024

This repo is set up to use eslint with "auto-fix" on save. As long as you have the eslint extension installed, you'll get a similar experience to prettier's auto format on save. If you want to fix manually, you can press CMD/CTRL+SHIFT+P and search for "Eslint: fix all auto fixable problems"

The eslint config I'm using has all the settings you'd need for formatting via ESLint Stylistic - I've been using this config lately and much prefer it over eslint+prettier or prettier alone.

You can update the formatting settings in here: https://github.com/w3cj/use-x/blob/main/eslint.config.js and see all of the customization options available here

If you still want to use prettier instead, you can enable it in the settings file here: https://github.com/w3cj/use-x/blob/main/.vscode/settings.json#L3 and add the prettier config from here: https://github.com/prettier/eslint-config-prettier

@Arinji2
Copy link
Author

Arinji2 commented Oct 17, 2024

Yea my bad, i didnt know there was an eslint extension xD (its actually awesome lol.. i used to depend on nextjs build linting to check react deps issues lol, so thanks for this)

Anyways i forked the repo and am writing my own implementation :D
Will comment once done.

Thanks for this btw, its really awesome + the test suite is great.

@w3cj
Copy link
Owner

w3cj commented Oct 17, 2024

No worries! Glad its working. Not using prettier is less common these days, so I understand the confusion.

@Arinji2 Arinji2 closed this as completed Oct 17, 2024
@w3cj w3cj changed the title Formatter Prettier disabled, how to format? Oct 17, 2024
@w3cj
Copy link
Owner

w3cj commented Oct 17, 2024

Keeping this open in case anyone else has the same question.

@w3cj w3cj reopened this Oct 17, 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

No branches or pull requests

2 participants