-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add BiomeJS for Linting and Formatting JavaScript relates to #1295 #1299
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
Add BiomeJS for Linting and Formatting JavaScript relates to #1295 #1299
Conversation
biome.json
Outdated
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "tab", | ||
"useEditorconfig": true |
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.
Currently, our .editorconfig
has:
indent_style = space
indent_size = 2
Will this conflict since it's using tabs?
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.
good point, indentStyle overrides the imported editorconfig. I removed it, so its consistent across all files.
@oxdev03 thanks for the comprehensive integration here! Haven't used Biome yet, but seems like an overall good fit for the project regarding simplicity and performance. Just jotting down the steps I took to get my local environment setup with VSCode for others:
{
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
}
}
|
.github/workflows/ci.yml
Outdated
shell: bash | ||
|
||
- name: Lint/Format js code | ||
run: npm run style:check |
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.
To keep this as low-overhead as possible, I think we should just enforce the linting:
run: npm run lint
The formatting is a nice addition that I'll be using locally, but don't want that to be a requirement for new contributors and also for pushing hot fixes directly to main
(our internal team does this occasionally to fix tiny bugs)
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.
changed it, even if its not a best practice.
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.
@oxdev03 correct, not best practice and that's 100% fine at our stage/size
yes , the contributor would also need to have nodejs installed. I added the autosave to the vscode/settings.json file to the project. If the DevContainer is used no additional steps are required. |
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 good! Thanks for setting this up!
Summary:
SyntaxError: Private field must be declared in an enclosing class
when minified #1295Why BiomeJS:
Open Points: