-
Notifications
You must be signed in to change notification settings - Fork 324
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
Format all web code #436
Format all web code #436
Conversation
npx prettier --write "{www/src,www/server}/**/*.{tsx,ts,jsx,js,json,scss}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer singleQuote
: true
but otherwise, very nice and very welcome!
Should we add husky to enforce linting on commit?
lint
script should be added to the package.json
and we should then extend node.js.yml
action to run lint tests.
True, i also prefer single quotes. I've changing it in editorconfig for js/ts files. Will check with the others if someone objects :)
Sounds like a great idea, had a short discussion with feralAi about the linting when we moved from CRA to vite. Thanks for checking the PR out @SavageCore! |
@Pelsin I was going to suggest those could come later and I missed linting already being there silly me! LGTM. |
# Conflicts: # www/src/Pages/AddonsConfigPage.jsx # www/src/Pages/SettingsPage.jsx
# Conflicts: # www/src/Pages/AddonsConfigPage.jsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
No changes in code/functionality except the .editorconfig.
This is purely for developer experience, also want to make it clear this is just a suggestion on format according to prettier+editorconfig. Just wanted to normalize so we use the same formatting in all files.
This will help issues like what happened here: #417
Also thought it was a good idea to do it now as there are only a few PRs up touching the web part.
Ran prettier to format the files in the www folder.
npx prettier --write "{www/src,www/server}/**/*.{tsx,ts,jsx,js,json,scss}"
Changed .editorconfig:
Added "format" npm script for those not running a prettier plugin.