diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 00000000..a2fa61c7 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,5 @@ +pre-commit: + commands: + format: + glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,svelte}" + run: pnpm format:check \ No newline at end of file diff --git a/package.json b/package.json index 706d0959..263e43c0 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,8 @@ "name": "monorepo", "private": true, "scripts": { - "format": "biome format . --write", - "lint": "biome lint . --write", - "check": "biome check . --write", + "format": "biome check . --write", + "format:check": "biome check .", "build": "pnpm -r build", "build:watch": "pnpm -r build:watch", "test": "pnpm -r test", @@ -12,7 +11,8 @@ }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@changesets/cli": "^2.27.11" + "@changesets/cli": "^2.27.11", + "lefthook": "^1.10.1" }, "packageManager": "pnpm@9.0.0" } diff --git a/packages/floating-ui-svelte/src/index.ts b/packages/floating-ui-svelte/src/index.ts index 8c5fc818..57236a0f 100644 --- a/packages/floating-ui-svelte/src/index.ts +++ b/packages/floating-ui-svelte/src/index.ts @@ -8,3 +8,5 @@ export * from "./hooks/use-hover.svelte.js"; export * from "./hooks/use-id.js"; export * from "./hooks/use-interactions.svelte.js"; export * from "./hooks/use-role.svelte.js"; + +type Test = any; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 393346cf..ca60ebf6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@changesets/cli': specifier: ^2.27.11 version: 2.27.11 + lefthook: + specifier: ^1.10.1 + version: 1.10.1 packages/docs: dependencies: @@ -1121,6 +1124,60 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + lefthook-darwin-arm64@1.10.1: + resolution: {integrity: sha512-dGi4Oiu2LSve8Xmz7vHWlUbnU5mk6HnhTbC1CnXqaFbb08yNYSYoJBwsalS+LoO4L6I/pqnv32ESCbdIzuhBiQ==} + cpu: [arm64] + os: [darwin] + + lefthook-darwin-x64@1.10.1: + resolution: {integrity: sha512-NkEkBZm5jYH4fqbpJweDyJx/+/jWLst0FEHOCU5QZ8xFm+42hTGj4+6kfbjirU1ubvmRY/TeilYDsq1OIr5jZQ==} + cpu: [x64] + os: [darwin] + + lefthook-freebsd-arm64@1.10.1: + resolution: {integrity: sha512-hX/c4p0+JoCrr55e8zfXC63ReW3Cg4WKzZKP6NA2uNDaKItHlQ4zR3CCOytdVnuPXOa6f93WB9lmRYtIp34dqw==} + cpu: [arm64] + os: [freebsd] + + lefthook-freebsd-x64@1.10.1: + resolution: {integrity: sha512-0suh8/Mx56Rircc/hvr3vU/XKv0E/afD/LkF8lkOPm4besgq6k9HCkpdPgBykP8Q0ve/W3rOlXeBQ7c7oDhX8Q==} + cpu: [x64] + os: [freebsd] + + lefthook-linux-arm64@1.10.1: + resolution: {integrity: sha512-zADf8CSkoV7EfpLsy5U22gq0+famMjUEfKy9nacS6zEgPvMxDk5Q/7QpnMWJeeiwkf9XWgQ+GATWuGahA3Id9A==} + cpu: [arm64] + os: [linux] + + lefthook-linux-x64@1.10.1: + resolution: {integrity: sha512-wdPVMZAN6vi3/4rlhzaWjR5N3AZE5+dUd3lSzfP6mmfXVQtwnJ29HFUlje6TAnwZBSOBI8yoMsz38FrhPuayYg==} + cpu: [x64] + os: [linux] + + lefthook-openbsd-arm64@1.10.1: + resolution: {integrity: sha512-PJ0fHvjcgapaWsn+4uhj3ZMRvkV0Ug+BOrRovF+SdXdA7DiBbRzFPTpUWrGoV3lw7uFjY6pJqGqakDqZ0J7J6g==} + cpu: [arm64] + os: [openbsd] + + lefthook-openbsd-x64@1.10.1: + resolution: {integrity: sha512-Bs0hBWHW4s6Dp0qVG4LXv96Vo1NXsM/y6VrWten3pv2oEO18Yw9PmKd6vl4mGI7yA72wq4HNATBagFx460IIEw==} + cpu: [x64] + os: [openbsd] + + lefthook-windows-arm64@1.10.1: + resolution: {integrity: sha512-xoBiiAChVSv1YYVkwkpfEoAbjNuRblrA0tI8GOtPBhkzlfBP3MaD5JfU2SPzID9IfAG/yV5dOlrLVKhacQA66A==} + cpu: [arm64] + os: [win32] + + lefthook-windows-x64@1.10.1: + resolution: {integrity: sha512-+AwTHtBP8npL604Dd13rnEblWh6a9+sf0lSzoLy22y3jdae4kVENLmYoeZ6bz0Wf6SF18UCjf+byvspQRnnCHg==} + cpu: [x64] + os: [win32] + + lefthook@1.10.1: + resolution: {integrity: sha512-WLwXd8FxAcZ0KJg0d/u1r2nY7F/i2XJlyxQSKJkFkbuzqggNU876ksHuNAluSbsZ4nNdI+tWbBUu1Th3SPvgcQ==} + hasBin: true + lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -2817,6 +2874,49 @@ snapshots: kleur@4.1.5: {} + lefthook-darwin-arm64@1.10.1: + optional: true + + lefthook-darwin-x64@1.10.1: + optional: true + + lefthook-freebsd-arm64@1.10.1: + optional: true + + lefthook-freebsd-x64@1.10.1: + optional: true + + lefthook-linux-arm64@1.10.1: + optional: true + + lefthook-linux-x64@1.10.1: + optional: true + + lefthook-openbsd-arm64@1.10.1: + optional: true + + lefthook-openbsd-x64@1.10.1: + optional: true + + lefthook-windows-arm64@1.10.1: + optional: true + + lefthook-windows-x64@1.10.1: + optional: true + + lefthook@1.10.1: + optionalDependencies: + lefthook-darwin-arm64: 1.10.1 + lefthook-darwin-x64: 1.10.1 + lefthook-freebsd-arm64: 1.10.1 + lefthook-freebsd-x64: 1.10.1 + lefthook-linux-arm64: 1.10.1 + lefthook-linux-x64: 1.10.1 + lefthook-openbsd-arm64: 1.10.1 + lefthook-openbsd-x64: 1.10.1 + lefthook-windows-arm64: 1.10.1 + lefthook-windows-x64: 1.10.1 + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {}