chore: willboosterify this repo#19
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the lefthook configuration and pre-push scripts to use the wb tool, simplifying the pre-commit logic and removing manual linting and formatting steps. It also updates several dependencies and removes deprecated scripts from package.json. Feedback suggests further updating the remaining scripts in package.json to use wb for better consistency and to eliminate redundancy across the project.
| if [ -n "$package_json_files" ]; then | ||
| node node_modules/.bin/sort-package-json -- $package_json_files | ||
| fi | ||
| yarn wb lint --fix --format -- {staged_files} |
There was a problem hiding this comment.
While this change simplifies the pre-commit hook, for consistency and to fully align with the goal of "willboosterify"-ing the repository, the npm scripts in package.json should also be updated to use wb commands.
Currently, scripts like lint, format, and cleanup still use oxlint and oxfmt directly. This can lead to different behavior between the pre-commit hook and running the scripts manually, which can be confusing for developers.
To complete the migration and eliminate redundancy, consider updating the scripts in package.json. For example:
"scripts": {
...
"cleanup": "yarn wb lint --fix --format .",
"format": "sort-package-json && yarn wb format .",
"format-code": "yarn wb format .",
"lint": "yarn wb lint .",
"lint-fix": "yarn wb lint --fix .",
...
}(Note: The exact commands for wb might need to be verified.)
References
- The repository style guide recommends simplifying code to eliminate redundancy. Having different tools for the same task in git hooks and npm scripts introduces redundancy and inconsistency. (link)
No description provided.