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

build: add biome #109

Merged
merged 7 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
janndriessen marked this conversation as resolved.
Show resolved Hide resolved
}
}
41 changes: 37 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
{
Copy link
Collaborator Author

@janndriessen janndriessen Jan 3, 2025

Choose a reason for hiding this comment

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

Please check the config and let me know if you'd add/edit anything. @0xonramp @tokdaniel

It should be pretty similar to what we had. The only changes as you can see from the altered files is mostly imports and colon for every end of line e.g. props in an object.

"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": {
"enabled": false
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"linter": {
"enabled": false
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "warn"
},
"style": {
"noNonNullAssertion": "off",
Copy link
Collaborator Author

@janndriessen janndriessen Jan 3, 2025

Choose a reason for hiding this comment

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

This one can be turned to warn once it works better to disable lines or files in biome v2: biomejs/biome#4569.

Until then I'd recommend to keep lines like // eslint-disable-next-line @typescript-eslint/no-explicit-any in the project to be able to simple find/replace later on.

Let me know what you think? @0xonramp @tokdaniel

"noUselessElse": "off"
},
"suspicious": {
"noExplicitAny": "off",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same for this rule.

"noFocusedTests": "off"
}
}
},
"javascript": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"quoteProperties": "preserve",
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
}
Loading
Loading