On June 17th, [Biome v2 was
released](https://biomejs.dev/blog/biome-v2/). This PR upgrades to the
latest version. Because Biome v2 contains a number of breaking changes,
manual migration might be required. The PR also takes the opportunity to
make some breaking changes to projen's integration.
In Biome v2, a number of configurations an CLI options have changed.
Please refer to the [official v2 migration
guide](https://biomejs.dev/guides/upgrade-to-biome-v2/) to understand
any changes required to Biome Configuration and to understand the
changes of projen's default configuration for Biome.
## projen specific changes
- **Component configuration and Defaults**
- It's now sufficient to set `biome: true` or create a new project with
`projen new typescript --biome`.
- The Biome version now defaults to v2 using `^2`
- All Biome features `linter`, `formatter` and `assist` are now enabled
by default with recommended settings. This better reflects Biome's
philosophy.
- You can easily disable each feature by setting the according option to
`false`, e.g. `assist: false`
- `organizeImports` imports was removed in favor for the new code
assists. Code assists are enabled by default.
- **`projen biome` task**
- The task is now running against all files in the root directory, with
relevant files only added to the Biome configuration.
- The task is now using `--no-errors-on-unmatched` and won't if no files
are matched.
- The task can now receive additional arguments, e.g. `projen biome
--verbose`.
- **File patterns**
- The `Biome.addLintPattern()` method has been renamed to
`Biome.addFilePattern()` to better reflect what it does.
- By default projen now adds much fewer file patterns and exclusion to
the Biome config. Instead it relies on Biome's VCS integration, which
will already ignore any files in `.gitignore`.
- **`biome.jsonc`**
- `biome.jsonc` is now writable, since Biome will always attempt to
write it.
- As a generated file, `biome.jsonc` has any formatting disabled.
- `biome.jsonc` now contains the `$schema` property.
- **Biome Configuration Types**
The interfaces used to type the Biome configuration are automatically
generated from the schema Biome provides. In v2 this Schema has changed
significantly, not only to accommodate new features but also
structurally. This is reflected in some of the updated types.
Furthermore we took the opportunity of the v2 release to switch to a
different schema to code generator, that is more compatible with the
jsii type system. As a consequence the names of most interfaces have
changed.
BREAKING CHANGE: Biome v2 is now used, which comes with a number of
breaking changes. Please refer to the linked pull-request for more
details.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.