matter-labs / zksync-cli

CLI tool that simplifies ZKsync development
MIT License
166 stars 96 forks source link

feat: enhance code quality and consistency #148

Closed roushou closed 3 months ago

roushou commented 4 months ago

What :computer:

This PR adds formatting and linting using biome.

Some benefits:

I added scripts to the package.json and suffixed with :biome when a script name conflicted with an existing one i.e. lint:biome so it doesn't disrupt your current workflow.

I also updated the pr-validation workflow by just adding a step that check the codebase with Biome so it makes clear that errors need to be fixed. Imo if you intend to loosen some rules now and enforce them later, it would be best to just let them enabled and use the CI as an indicator.

Why :hand:

The motivation is to add consistency and improve code practices while making changes easier to be reviewed and automating things that are generally done manually like sorting imports, adding type annotations when importing types etc...

Evidence :camera:

Check CI

Notes :memo:

For the sake of keeping this PR small only linting has been ran. Running format and check scripts output a lot a changes so it would be best to be reviewed separately.

A summary of the current fixes to do

image