diff --git a/apps/infoalloggi/biome.json b/apps/infoalloggi/biome.json index 3b0d036..9b6a2dd 100644 --- a/apps/infoalloggi/biome.json +++ b/apps/infoalloggi/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.2/schema.json", "assist": { "actions": { "source": { @@ -123,7 +123,8 @@ } }, "plugins": [ - "biome_plugins/missing.grit", + "biome_plugins/missing_select.grit", + "biome_plugins/missing_where.grit", "biome_plugins/null.grit" ], "vcs": { @@ -132,4 +133,4 @@ "root": "../../", "useIgnoreFile": false } -} \ No newline at end of file +} diff --git a/apps/infoalloggi/biome_plugins/missing.grit b/apps/infoalloggi/biome_plugins/missing.grit deleted file mode 100644 index ff1ea1e..0000000 --- a/apps/infoalloggi/biome_plugins/missing.grit +++ /dev/null @@ -1,25 +0,0 @@ -language js - -`$fn($_)` where { - if ($fn <: contains `selectFrom`) { - or { - $fn <: contains `execute`, - $fn <: contains `executeTakeFirst`, - $fn <: contains `executeTakeFirstOrThrow` - }, - ! $fn <: contains `select`, - ! $fn <: contains `selectAll`, - register_diagnostic(span=$fn, message="select statement must contain select() or selectAll()", severity="error") - } else if (or { - $fn <: contains `updateTable`, - $fn <: contains `deleteFrom` - }) { - or { - $fn <: contains `execute`, - $fn <: contains `executeTakeFirst`, - $fn <: contains `executeTakeFirstOrThrow` - }, - ! $fn <: contains `where`, - register_diagnostic(span=$fn, message="update or delete statements must contain where()", severity="error") - } -} diff --git a/apps/infoalloggi/biome_plugins/missing_select.grit b/apps/infoalloggi/biome_plugins/missing_select.grit new file mode 100644 index 0000000..76cd637 --- /dev/null +++ b/apps/infoalloggi/biome_plugins/missing_select.grit @@ -0,0 +1,9 @@ +language js(typescript) + +`$chain.$exec()` where { + $exec <: or { `execute`, `executeTakeFirst`, `executeTakeFirstOrThrow` }, + $chain <: contains `selectFrom`, + ! $chain <: contains `select`, + ! $chain <: contains `selectAll`, + register_diagnostic(span=$chain, message="select statement must contain select() or selectAll()", severity="error") +} \ No newline at end of file diff --git a/apps/infoalloggi/biome_plugins/missing_where.grit b/apps/infoalloggi/biome_plugins/missing_where.grit new file mode 100644 index 0000000..8bd4554 --- /dev/null +++ b/apps/infoalloggi/biome_plugins/missing_where.grit @@ -0,0 +1,8 @@ +language js(typescript) + +`$chain.$exec()` where { + $exec <: or { `execute`, `executeTakeFirst`, `executeTakeFirstOrThrow` }, + or { $chain <: contains `updateTable`, $chain <: contains `deleteFrom` }, + ! $chain <: contains `where`, + register_diagnostic(span=$chain, message="update or delete statements must contain where()", severity="error") +} \ No newline at end of file diff --git a/apps/infoalloggi/biome_plugins/null.grit b/apps/infoalloggi/biome_plugins/null.grit index eca6b57..6ccecb1 100644 --- a/apps/infoalloggi/biome_plugins/null.grit +++ b/apps/infoalloggi/biome_plugins/null.grit @@ -1,7 +1,6 @@ -language js +language js(typescript) -`$fn($a)` where { - $fn <: contains `where`, +`$chain.where($a)` where { or { $a <: contains `'='`, $a <: contains `'=='`, diff --git a/apps/infoalloggi/package-lock.json b/apps/infoalloggi/package-lock.json index 89dc967..eb9dc42 100644 --- a/apps/infoalloggi/package-lock.json +++ b/apps/infoalloggi/package-lock.json @@ -97,7 +97,7 @@ "zod": "^4.1.12" }, "devDependencies": { - "@biomejs/biome": "^2.3.1", + "@biomejs/biome": "^2.4.2", "@hookform/devtools": "^4.4.0", "@react-email/preview-server": "^5.2.5", "@total-typescript/ts-reset": "^0.6.1", @@ -1016,9 +1016,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.11.tgz", - "integrity": "sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.2.tgz", + "integrity": "sha512-vVE/FqLxNLbvYnFDYg3Xfrh1UdFhmPT5i+yPT9GE2nTUgI4rkqo5krw5wK19YHBd7aE7J6r91RRmb8RWwkjy6w==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -1032,20 +1032,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.3.11", - "@biomejs/cli-darwin-x64": "2.3.11", - "@biomejs/cli-linux-arm64": "2.3.11", - "@biomejs/cli-linux-arm64-musl": "2.3.11", - "@biomejs/cli-linux-x64": "2.3.11", - "@biomejs/cli-linux-x64-musl": "2.3.11", - "@biomejs/cli-win32-arm64": "2.3.11", - "@biomejs/cli-win32-x64": "2.3.11" + "@biomejs/cli-darwin-arm64": "2.4.2", + "@biomejs/cli-darwin-x64": "2.4.2", + "@biomejs/cli-linux-arm64": "2.4.2", + "@biomejs/cli-linux-arm64-musl": "2.4.2", + "@biomejs/cli-linux-x64": "2.4.2", + "@biomejs/cli-linux-x64-musl": "2.4.2", + "@biomejs/cli-win32-arm64": "2.4.2", + "@biomejs/cli-win32-x64": "2.4.2" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.11.tgz", - "integrity": "sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.2.tgz", + "integrity": "sha512-3pEcKCP/1POKyaZZhXcxFl3+d9njmeAihZ17k8lL/1vk+6e0Cbf0yPzKItFiT+5Yh6TQA4uKvnlqe0oVZwRxCA==", "cpu": [ "arm64" ], @@ -1060,9 +1060,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.11.tgz", - "integrity": "sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.2.tgz", + "integrity": "sha512-P7hK1jLVny+0R9UwyGcECxO6sjETxfPyBm/1dmFjnDOHgdDPjPqozByunrwh4xPKld8sxOr5eAsSqal5uKgeBg==", "cpu": [ "x64" ], @@ -1077,9 +1077,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.11.tgz", - "integrity": "sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.2.tgz", + "integrity": "sha512-DI3Mi7GT2zYNgUTDEbSjl3e1KhoP76OjQdm8JpvZYZWtVDRyLd3w8llSr2TWk1z+U3P44kUBWY3X7H9MD1/DGQ==", "cpu": [ "arm64" ], @@ -1094,9 +1094,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.11.tgz", - "integrity": "sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.2.tgz", + "integrity": "sha512-/x04YK9+7erw6tYEcJv9WXoBHcULI/wMOvNdAyE9S3JStZZ9yJyV67sWAI+90UHuDo/BDhq0d96LDqGlSVv7WA==", "cpu": [ "arm64" ], @@ -1111,9 +1111,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.11.tgz", - "integrity": "sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.2.tgz", + "integrity": "sha512-GK2ErnrKpWFigYP68cXiCHK4RTL4IUWhK92AFS3U28X/nuAL5+hTuy6hyobc8JZRSt+upXt1nXChK+tuHHx4mA==", "cpu": [ "x64" ], @@ -1128,9 +1128,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.11.tgz", - "integrity": "sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.2.tgz", + "integrity": "sha512-wbBmTkeAoAYbOQ33f6sfKG7pcRSydQiF+dTYOBjJsnXO2mWEOQHllKlC2YVnedqZFERp2WZhFUoO7TNRwnwEHQ==", "cpu": [ "x64" ], @@ -1145,9 +1145,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.11.tgz", - "integrity": "sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.2.tgz", + "integrity": "sha512-k2uqwLYrNNxnaoiW3RJxoMGnbKda8FuCmtYG3cOtVljs3CzWxaTR+AoXwKGHscC9thax9R4kOrtWqWN0+KdPTw==", "cpu": [ "arm64" ], @@ -1162,9 +1162,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.11.tgz", - "integrity": "sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.2.tgz", + "integrity": "sha512-9ma7C4g8Sq3cBlRJD2yrsHXB1mnnEBdpy7PhvFrylQWQb4PoyCmPucdX7frvsSBQuFtIiKCrolPl/8tCZrKvgQ==", "cpu": [ "x64" ], diff --git a/apps/infoalloggi/package.json b/apps/infoalloggi/package.json index 6676ab6..33b19fc 100644 --- a/apps/infoalloggi/package.json +++ b/apps/infoalloggi/package.json @@ -109,7 +109,7 @@ "zod": "^4.1.12" }, "devDependencies": { - "@biomejs/biome": "^2.3.1", + "@biomejs/biome": "^2.4.2", "@hookform/devtools": "^4.4.0", "@react-email/preview-server": "^5.2.5", "@total-typescript/ts-reset": "^0.6.1", @@ -133,4 +133,4 @@ "ct3aMetadata": { "initVersion": "7.9.0" } -} +} \ No newline at end of file