Граф коммитов

1 Коммитов

Автор SHA1 Сообщение Дата
Tyler Butler 6d9b7891fc
build(client): Add biome formatting scripts (#19380)
## Summary

Adds several scripts that can be run to convert projects in the client
release group to use the biome formatter. The process can be effectively
reversed by running another script, so projects can switch between
prettier and biome using the scripts and the build will continue to
work.

After enabling biome formatting, you can manually format using biome
with the `format:biome`script.

Once projects are completely on biome and we no longer need to port
changes between prettier branches and biome branches, then we can remove
prettier completely using the remove-prettier script. We should only do
that once the last release branch using prettier is no longer in
service.

## Scripts

### add-biome.sh

This script adds biome formatting scripts to a project. It also adds a
local biome config file to the project if needed.

The `format:prettier` and `check:prettier` tasks are left intact, and
the `format` task still calls prettier. This
enables one to manually format using biome while leaving the overall
build using prettier.

After running this script, you can clean up the package.json files by
running `pnpm policy-check:fix`.

**This PR includes the changes made by running this script across the
client release group.**

### enable-biome.sh

This script enables biome formatting in a project. It updates the
`format` and `check:format` scripts to call biome. It
should only be run on projects that have already had biome added to it.

### enable-prettier.sh

This script enables prettier formatting in a project. It updates the
`format` and `check:format` scripts to call
prettier. It's the opposite of the enable-biome.sh script.

### remove-prettier.sh

Once a project is completely switched to biome and no longer needs
prettier, this script will remove the prettier
dependency and any related scripts and config files.
2024-06-11 11:13:59 -07:00