-
Notifications
You must be signed in to change notification settings - Fork 159
chore: bump biome formatter to next major & reformat #4145
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
base: main
Are you sure you want to change the base?
Conversation
|
@@ -104,7 +104,7 @@ describe('Logger E2E - Advanced uses', () => { | |||
try { | |||
JSON.parse(log); | |||
return true; | |||
} catch (error) { | |||
} catch (_error) { |
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.
How come this isn't just using a bare catch
like the others?
} catch {
return false;
}
@@ -187,7 +187,7 @@ describe('Schema: Kinesis', () => { | |||
|
|||
const transformedInput = { | |||
...testEvent, | |||
Records: testEvent.Records.map((record, index) => { | |||
Records: testEvent.Records.map((record, _index) => { |
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.
Why include index
at all here, testEvent.Records.map((record) => {
would suffice.
@@ -1,6 +1,6 @@ | |||
module.exports = async ({github, context, core}) => { |
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.
Not for this PR but at some point we should move these scripts to user ESM rather than CommonJS.
@@ -10,7 +10,7 @@ app.tool<{ city: string }>( | |||
async ({ city }, { event }) => { | |||
try { | |||
throw new Error('Simulated error for demonstration purposes'); | |||
} catch (error) { | |||
} catch (_error) { |
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.
As mentioned, is there a reaosn we're not doing } catch {
like we are in other places in the code? Same for all the other instances of this pattern in this commit (1f780c5).
Thanks for this, made reviewing the changes much easier. |
Summary
Changes
This PR manually bumps
@biomejs/biome
to the latest version (2.x
) which constitutes a major release upgrade for us since we were stuck at1.x
.The upgrade introduces a couple new rules that are a good thing for the project, but that required some manual attention. The changes focus almost exclusively on import sorting and unused variables.
Since the PR diff is very big, I tried to address each package in a dedicated commit and I suggest reviewers to use the dropdown at the top-left of the PR view to select the commits while reviewing to limit the number of files.
Aside from that, apologies in advance for the big PR, splitting the work in multiple PRs would've required changes to the CI to support both versions at the same time and it wasn't worth it.
I also don't expect reviewers to look at every single file, but rather get a gist of the changes and review it as a whole, knowing that the tests are still passing.
Issue number: closes #4144
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.