diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 00000000..a99b4188 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,4 @@ +pre-push: + commands: + lint: + run: pnpm run lint diff --git a/package.json b/package.json index eae98a4c..4c0a907c 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "type": "module", "scripts": { "preinstall": "npx only-allow pnpm", + "postinstall": "lefthook install", "ci": "pnpm run clean && pnpm run lint && pnpm run build && pnpm run test", "lint": "pnpm -r run lint", "build": "pnpm -r run build", @@ -24,7 +25,8 @@ "clean": "pnpm -r run clean" }, "devDependencies": { - "@biomejs/biome": "1.5.1" + "@biomejs/biome": "1.5.1", + "lefthook": "^1.6.1" }, "devDependenciesNotes": { "@biomejs/biome": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b681bef..72811791 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,9 @@ importers: '@biomejs/biome': specifier: 1.5.1 version: 1.5.1 + lefthook: + specifier: ^1.6.1 + version: 1.6.1 packages/export-size: dependencies: @@ -3173,6 +3176,85 @@ packages: engines: {node: '>=6'} dev: true + /lefthook-darwin-arm64@1.6.1: + resolution: {integrity: sha512-q6+sYr2Dpt6YnBGXRjMFcXZUnVB97nH+s7EP/tX8m9ewvQxLPqIiUPyAumfyJ2Siomkc5WgAinG+kT63VjUN3A==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /lefthook-darwin-x64@1.6.1: + resolution: {integrity: sha512-utm7FwtbW8SxGMALIw5/iG4loYS2FI0crDKp/YIamrZgQr6M4pS2C3rxGj5OwiHFIm3arVU+3VZywdvRLJAw0w==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /lefthook-freebsd-arm64@1.6.1: + resolution: {integrity: sha512-F2BoDnGznkJyn6lyhmXpu62yq7SMCeHAl3Bl8c+P6mXfmatjjxEpVmrzRuzKMPd/MRGpy2B/glkuyO4wZZazow==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-freebsd-x64@1.6.1: + resolution: {integrity: sha512-/NBjMUtnwvdc/p821sfPnZCbWZ6FQkAvnvjoaQu6tkajKZbZYSKsl7UtAicO0nT+79BQFt7TbaZjpua2T9tM5w==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-linux-arm64@1.6.1: + resolution: {integrity: sha512-ke+2ni/bmxgYJSRsH+uIYYfTLj2It7WP+mcF4rfJHRbzn5yDYIjFgylUMC2CgW5urS4DSbxcRIbAqLY3OXAHnw==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /lefthook-linux-x64@1.6.1: + resolution: {integrity: sha512-/HLkl9jt3XRjT0RPaLpAgUQmvp4zV/KKZ/8x6xslPl89krv3ZkHKKrqeaHdhiengq3hzx3N+KbOfFcxBRzdT6A==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /lefthook-windows-arm64@1.6.1: + resolution: {integrity: sha512-RyQ8S4/45BpJpRPy7KsOuJeXQ5FOa7MASoPtOYvrXt4A8kayCv1jlGs7MTv3XJbUosCJhfNpw3ReeHVGfw1KIw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /lefthook-windows-x64@1.6.1: + resolution: {integrity: sha512-poYLk2tfg1Ncr4aZeFuhHjv1qH6f9hX3tV1FOK2MfWkXkRTYPl6MF5h/ONMIv71BsLjGbAA7LNXM5Mj4/B//lQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /lefthook@1.6.1: + resolution: {integrity: sha512-1T+tk0V6ubZgiZJGi39QlLMAcgEw+lhoDeSpT3L8Y/f8nUpJW9ntcMOmt+uvMfQ3TVjNcR1r/Lhtm7gTqgdcPg==} + hasBin: true + requiresBuild: true + optionalDependencies: + lefthook-darwin-arm64: 1.6.1 + lefthook-darwin-x64: 1.6.1 + lefthook-freebsd-arm64: 1.6.1 + lefthook-freebsd-x64: 1.6.1 + lefthook-linux-arm64: 1.6.1 + lefthook-linux-x64: 1.6.1 + lefthook-windows-arm64: 1.6.1 + lefthook-windows-x64: 1.6.1 + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'}