Skip to content

chore: willboosterify this repo#15

Merged
WillBooster-bot merged 1 commit into
mainfrom
wbfy
Apr 27, 2026
Merged

chore: willboosterify this repo#15
WillBooster-bot merged 1 commit into
mainfrom
wbfy

Conversation

@WillBooster-bot
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates project configurations and dependencies, primarily to exclude package.json from oxfmt formatting and upgrade linting tools. Feedback identifies several redundant exclusion patterns in lefthook.yml and .idea/watcherTasks.xml that should be removed to simplify the code and adhere to the repository's style guide.

Comment thread lefthook.yml
# Lefthook expands {staged_files} as shell-escaped args, so paths with spaces stay intact.
oxlint_files="$(printf '%s\n' {staged_files} | grep -E '(\.astro$|\.cjs$|\.cts$|\.js$|\.jsx$|\.mjs$|\.mts$|\.svelte$|\.ts$|\.tsx$|\.vue$)' || true)"
oxfmt_files="$(printf '%s\n' {staged_files} | grep -E '(\.astro$|\.cjs$|\.css$|\.cts$|\.gql$|\.graphql$|\.hbs$|\.htm$|\.html$|\.js$|\.json$|\.json5$|\.jsonc$|\.jsx$|\.less$|\.md$|\.mdx$|\.mjs$|\.mts$|\.scss$|\.svelte$|\.toml$|\.ts$|\.tsx$|\.vue$|\.yaml$|\.yml$)' || true)"
oxfmt_files="$(printf '%s\n' {staged_files} | grep -E '(\.astro$|\.cjs$|\.css$|\.cts$|\.gql$|\.graphql$|\.hbs$|\.htm$|\.html$|\.js$|\.json$|\.json5$|\.jsonc$|\.jsx$|\.less$|\.md$|\.mdx$|\.mjs$|\.mts$|\.scss$|\.svelte$|\.toml$|\.ts$|\.tsx$|\.vue$|\.yaml$|\.yml$)' | grep -v -E '(^|/)package\.json$' || true)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The first grep -E command is redundant because the glob pattern on line 15 already filters {staged_files} to only include files with these extensions. Simplifying this line improves readability and adheres to the repository style guide (Rule 6).

        oxfmt_files="$(printf '%s\n' {staged_files} | grep -v -E '(^|/)package\.json$' || true)"
References
  1. Simplify code as much as possible to eliminate redundancy. (link)

Comment thread lefthook.yml

if [ -n "$oxfmt_files" ]; then
node node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern $oxfmt_files
node node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern '!**/package.json' $oxfmt_files
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The '!**/package.json' argument is redundant here because oxfmt_files has already been filtered to exclude package.json on line 19. Removing it simplifies the command per Rule 6 of the style guide.

          node node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern $oxfmt_files
References
  1. Simplify code as much as possible to eliminate redundancy. (link)

Comment thread .idea/watcherTasks.xml
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="true">
<option name="arguments" value="node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern $FilePathRelativeToProjectRoot$" />
<option name="arguments" value="node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern !**/package.json $FilePathRelativeToProjectRoot$" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The !**/package.json argument is redundant for this task because it only triggers for .astro files (as specified on line 9). This redundancy exists in most of the other TaskOptions as well. According to the style guide (Rule 6), code should be simplified to eliminate redundancy.

Suggested change
<option name="arguments" value="node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern !**/package.json $FilePathRelativeToProjectRoot$" />
<option name="arguments" value="node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern $FilePathRelativeToProjectRoot$" />
References
  1. Simplify code as much as possible to eliminate redundancy. (link)

@WillBooster-bot WillBooster-bot merged commit 065abaa into main Apr 27, 2026
11 checks passed
@WillBooster-bot WillBooster-bot deleted the wbfy branch April 27, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant