diff --git a/.vscode/settings.json b/.vscode/settings.json index add5d96..416d8b1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,8 +21,5 @@ }, "[typescriptreact]": { "editor.defaultFormatter": "biomejs.biome" - }, - "[yaml]": { - "editor.defaultFormatter": "biomejs.biome" } } diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..653392d --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,8 @@ +output: false + +pre-commit: + commands: + check: + glob: '*.{js,jsx,cjs,mjs,ts,tsx,d.cts,d.mts,json}' + run: yarn biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files} + stage_fixed: true diff --git a/package.json b/package.json index 0c66f8e..ec8687d 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@types/react": "~18.3.12", "@vitest/browser": "^2.1.8", "jsdom": "^25.0.1", + "lefthook": "^1.8.5", "playwright": "^1.49.0", "react": "18.3.1", "react-dom": "18.3.1", diff --git a/yarn.lock b/yarn.lock index cf73626..b23337b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8550,6 +8550,117 @@ __metadata: languageName: node linkType: hard +"lefthook-darwin-arm64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-darwin-arm64@npm:1.8.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"lefthook-darwin-x64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-darwin-x64@npm:1.8.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"lefthook-freebsd-arm64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-freebsd-arm64@npm:1.8.5" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"lefthook-freebsd-x64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-freebsd-x64@npm:1.8.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"lefthook-linux-arm64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-linux-arm64@npm:1.8.5" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"lefthook-linux-x64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-linux-x64@npm:1.8.5" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"lefthook-openbsd-arm64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-openbsd-arm64@npm:1.8.5" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"lefthook-openbsd-x64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-openbsd-x64@npm:1.8.5" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"lefthook-windows-arm64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-windows-arm64@npm:1.8.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"lefthook-windows-x64@npm:1.8.5": + version: 1.8.5 + resolution: "lefthook-windows-x64@npm:1.8.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"lefthook@npm:^1.8.5": + version: 1.8.5 + resolution: "lefthook@npm:1.8.5" + dependencies: + lefthook-darwin-arm64: "npm:1.8.5" + lefthook-darwin-x64: "npm:1.8.5" + lefthook-freebsd-arm64: "npm:1.8.5" + lefthook-freebsd-x64: "npm:1.8.5" + lefthook-linux-arm64: "npm:1.8.5" + lefthook-linux-x64: "npm:1.8.5" + lefthook-openbsd-arm64: "npm:1.8.5" + lefthook-openbsd-x64: "npm:1.8.5" + lefthook-windows-arm64: "npm:1.8.5" + lefthook-windows-x64: "npm:1.8.5" + dependenciesMeta: + lefthook-darwin-arm64: + optional: true + lefthook-darwin-x64: + optional: true + lefthook-freebsd-arm64: + optional: true + lefthook-freebsd-x64: + optional: true + lefthook-linux-arm64: + optional: true + lefthook-linux-x64: + optional: true + lefthook-openbsd-arm64: + optional: true + lefthook-openbsd-x64: + optional: true + lefthook-windows-arm64: + optional: true + lefthook-windows-x64: + optional: true + bin: + lefthook: bin/index.js + checksum: 10c0/71f16a752c38f732b9bf1163dd552c9e92231df173c4ebb908f7ab634c5c01a813f6b3b325f1e749bc92c07c0cacf44613bb1251f97cd49d160c360344c3aa48 + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -10665,6 +10776,7 @@ __metadata: "@types/react": "npm:~18.3.12" "@vitest/browser": "npm:^2.1.8" jsdom: "npm:^25.0.1" + lefthook: "npm:^1.8.5" playwright: "npm:^1.49.0" react: "npm:18.3.1" react-dom: "npm:18.3.1"