Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ pre-commit:
run: |-
# 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)


package_json_files="$(printf '%s\n' {staged_files} | grep -E '(^|/)package\.json$' || true)"




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)

fi


Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,26 @@
"bugs": {
"url": "https://github.com/WillBooster/monaco-react/issues"
},
"license": "MIT",
"author": "WillBooster Inc.",
"repository": {
"type": "git",
"url": "git+https://github.com/WillBooster/monaco-react.git"
},
"files": [
"dist/"
],
"license": "MIT",
"author": "WillBooster Inc.",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"publishConfig": {
"access": "public"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"build": "yarn run build/core",
"build/core": "build-ts lib",
Expand All @@ -45,7 +42,7 @@
"cleanup": "yarn format && yarn lint-fix",
"common/ci-setup": "yarn run build/core",
"format": "sort-package-json && yarn format-code",
"format-code": "oxfmt --write --no-error-on-unmatched-pattern .",
"format-code": "oxfmt --write --no-error-on-unmatched-pattern . '!**/package.json'",
"lint": "oxlint --no-error-on-unmatched-pattern .",
"lint-fix": "yarn lint --fix",
"prepare": "lefthook install || true",
Expand All @@ -70,16 +67,16 @@
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260421.2",
"@willbooster/oxfmt-config": "1.2.1",
"@willbooster/oxlint-config": "1.4.4",
"@willbooster/oxfmt-config": "1.2.2",
"@willbooster/oxlint-config": "1.4.6",
"build-ts": "17.1.8",
"conventional-changelog-conventionalcommits": "9.3.1",
"jsdom": "29.0.2",
"lefthook": "2.1.5",
"next": "16.2.4",
"oxfmt": "0.45.0",
"oxlint": "1.61.0",
"oxlint-tsgolint": "0.21.0",
"oxfmt": "0.47.0",
"oxlint": "1.62.0",
"oxlint-tsgolint": "0.22.1",
"react": "19.2.5",
"react-dom": "19.2.5",
"semantic-release": "25.0.3",
Expand All @@ -90,8 +87,11 @@
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"packageManager": "yarn@4.14.1",
"engines": {
"node": ">=24"
},
"packageManager": "yarn@4.14.1"
"publishConfig": {
"access": "public"
}
}
Loading
Loading